计算机毕业设计Hadoop+Hive地震预测系统 地震数据分析可视化 地震爬虫 大数据毕业设计 Spark 机器学习 深度学习 Flink 大数据

本文主要是介绍计算机毕业设计Hadoop+Hive地震预测系统 地震数据分析可视化 地震爬虫 大数据毕业设计 Spark 机器学习 深度学习 Flink 大数据,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

2024  届本科毕业论文(设计)

 基于Hadoop的地震预测的

分析与可视化研究

姓    名:____田伟情_________

系    别:____信息技术学院___

专    业:数据科学与大数据技术

学    号:__2011103094________

指导教师:_____王双喜________

年   月   日

目 录

1 绪论

2  相关技术与工具

2.1  大数据技术概述

2.2  hadoop介绍

3 地震数据分析

3.1 数据收集与处理

4 地震数据可视化

4.1 可视化技术概述

4.2 可视化设计原则

4.3 可视化实现与评估

5 系统设计与实现

5.1 登录页面

5.2

5.3 地震数据分析页面

5.4 地震数据维护页面

6 结果讨论

6.1 结果总结

6.2 结果分析

6.3 存在问题

6.4 结果展望

参考文献

致 谢

基于Hadoop的地震预测的分析与可视化研究

田伟情    指导教师:王双喜

(商丘师范学院信息技术学院,河南商丘  476000)   

  

摘  要:08年四川5·12汶川地震、10年青海玉树地震、13年四川雅安地震,到23年甘肃积石山地震,大大小小的地震无数次的上演,带给我们的不仅是肉体上的疼痛,还有无法治愈的心灵创伤。在睡梦中因地震而惊醒,轰隆隆的地裂声还有那些肉眼可见的消失的村庄恐怕是无数遭遇地震的人的噩梦,也是所有人共同的悲哀。即使没有亲身经历过,但新闻报道中倒坍的房屋,埋头救人的官兵,隔着屏幕也能感受到疼痛。 因此,准确地预测地震的发生时间、地点和震级对于人们的生命安全和财产安全具有重要意义。然而,地震预测是一个复杂而困难的问题,受到多种因素的影响,如地质构造、地下水位变化、地壳运动等。传统的地震预测方法往往依赖于经验和专家判断,准确度和效率有限。随着大数据技术的快速发展,越来越多的地震数据被收集和存储起来。大数据分析和处理技术能够对这些海量的地震数据进行高效的分析和建模,为地震预测提供更准确的预测模型。然而,大数据在地震预测中的应用也面临着一些挑战。首先,地震数据具有高维度和复杂的特征,需要选择合适的特征参数进行分析和建模。其次,地震数据的规模庞大,传统的数据处理方法无法满足实时性要求。此外,地震数据的可视化也是一个重要问题,如何将海量的地震数据以直观的方式展示给用户,提高地震预测的可理解性和可操作性,也是一个需要解决的问题。 因此,本研究基于Hadoop的大数据技术,对地震数据进行分析和可视化,提高地震预测的准确性和效率。具体而言,本研究将使用Hadoop框架对地震数据进行分析和建模,利用线性回归预测算法构建地震预测模型。同时,本研究利用echarts的可视化技术和工具,将地震数据以直观的方式展示给用户,提高地震预测的可理解性和可操作性。

关键词:地震、地震预测、Hadoop、线性回归预测算法

Analysis and visualization of earthquake prediction based on Hadoop          

TIAN Weiqing      Supervisor: WANG Shuangxi

(College of Information Technology, Shangqiu Normal University, Shangqiu 476000, China)

Abstract :The 5.12 Wenchuan earthquake in Sichuan in 08, the Yushu earthquake in Qinghai in 10, the Ya'an earthquake in Sichuan in 13, and the Jishishan earthquake in Gansu in 23 years, earthquakes of all sizes have been staged countless times, bringing us not only physical pain, but also incurable psychological wounds. Waking up in your sleep by the earthquake, the rumbling sound of the ground cracking, and the visible disappearance of the villages are probably the nightmare of countless people who have been hit by the earthquake, and it is also the sorrow shared by everyone. Even if you haven't experienced it yourself, you can feel the pain through the screen of the collapsed houses in the news reports and the officers and soldiers who buried their heads in saving people. Therefore, it is of great significance to accurately predict the time, place and magnitude of earthquakes for the safety of people's lives and property. However, earthquake prediction is a complex and difficult problem that is affected by a variety of factors, such as geological structure, changes in groundwater level, crustal movements, etc. Traditional earthquake prediction methods often rely on experience and expert judgment, and their accuracy and efficiency are limited. With the rapid development of big data technology, more and more seismic data is collected and stored. Big data analysis and processing technology can efficiently analyze and model these massive seismic data, and provide more accurate prediction models for earthquake prediction. However, the application of big data in earthquake prediction also faces some challenges. First of all, seismic data has high-dimensional and complex features, and it is necessary to select appropriate feature parameters for analysis and modeling. Secondly, the scale of seismic data is huge, and traditional data processing methods cannot meet the real-time requirements. In addition, the visualization of seismic data is also an important problem, and how to display massive seismic data to users in an intuitive way and improve the comprehensibility and operability of earthquake prediction is also a problem that needs to be solved. Therefore, this study analyzes and visualizes earthquake data based on Hadoop's big data technology to improve the accuracy and efficiency of earthquake prediction. Specifically, this study will use the Hadoop framework to analyze and model seismic data, and use the linear regression prediction algorithm to construct an earthquake prediction model. At the same time, this study uses the visualization technology and tools of ECHARTS to present earthquake data to users in an intuitive way, so as to improve the comprehensibility and operability of earthquake prediction.

Key words:earthquake, earthquake prediction、Hadoop、Linear regression prediction algorithm

核心算法代码分享如下:

import csv
import random
import re
import time
import datetime
import pymysql
import requests
#将数据保存到mysql方便制作表格查询
provinces = ['北京', '天津', '河北', '山西', '内蒙古', '辽宁', '吉林', '黑龙江', '上海', '江苏', '浙江', '安徽','福建', '江西', '山东', '河南', '湖北', '湖南','广东', '广西', '海南', '重庆', '四川', '贵州', '云南', '西藏', '陕西', '甘肃', '青海', '宁夏','新疆', '香港', '澳门', '台湾'
]
long_provinces = ['北京市', '天津市', '河北省', '山西省', '内蒙古自治区', '辽宁省', '吉林省', '黑龙江省', '上海市', '江苏省', '浙江省', '安徽省','福建省', '江西省', '山东省', '河南省', '湖北省', '湖南省','广东省', '广西壮族自治区', '海南', '重庆市', '四川省', '贵州省', '云南省', '西藏自治区', '陕西省', '甘肃省', '青海省', '宁夏回族自治区','新疆维吾尔自治区', '香港特别行政区', '澳门特别行政区', '台湾省'
]
with open('./world.csv', 'r',encoding='utf-8') as world_file :world_reader = csv.reader(world_file)errors=0line=0for row in world_reader:#magnitude ,stime_long, latitude, longitude, depth, addr ,stime_short,provincemagnitude = row[0]stime_long = row[1]latitude = row[2]longitude = row[3]depth = row[4]addr = row[5]stime_short = row[6]stime_year = row[7]stime_month = row[8]stime_clock= row[9]data_type='外国'addr=addr.replace(',',',')for province in provinces:if province in addr:data_type=province# magnitude, stime_long, latitude, longitude, depth, addr, stime_short,data_typeprint(magnitude, stime_long, latitude, longitude, depth, addr, stime_short,data_type)#tb_earthquakeconn = pymysql.connect(host='bigdata', user='root', password='123456', port=3306, db='hive_earthquake')cursor = conn.cursor()data = (magnitude, stime_long, latitude, longitude, depth, addr, stime_short,data_type)sql = "replace into tb_earthquake (magnitude, stime_long, latitude, longitude, depth, addr, stime_short,data_type) " \"values (%s,%s,%s,%s,%s,%s,%s,%s)"cursor.execute(sql,data)conn.commit()cursor.close()if data_type != '外国':for long_province in long_provinces:if data_type in long_province:earthquake_file = open("earthquake_hdfs.csv", mode="a+", newline='', encoding="utf-8")earthquake_writer = csv.writer(earthquake_file)earthquake_writer.writerow([magnitude, stime_long, latitude, longitude, depth, addr, stime_short,data_type,long_province,stime_year,stime_month,stime_clock])earthquake_file.close()else:earthquake_file = open("earthquake_hdfs.csv", mode="a+", newline='', encoding="utf-8")earthquake_writer = csv.writer(earthquake_file)earthquake_writer.writerow([magnitude, stime_long, latitude, longitude, depth, addr, stime_short,data_type,'无(外国)',stime_year,stime_month,stime_clock])earthquake_file.close()

这篇关于计算机毕业设计Hadoop+Hive地震预测系统 地震数据分析可视化 地震爬虫 大数据毕业设计 Spark 机器学习 深度学习 Flink 大数据的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1005409

相关文章

MySQL 删除数据详解(最新整理)

《MySQL删除数据详解(最新整理)》:本文主要介绍MySQL删除数据的相关知识,本文通过实例代码给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友参考下吧... 目录一、前言二、mysql 中的三种删除方式1.DELETE语句✅ 基本语法: 示例:2.TRUNCATE语句✅ 基本语

深度解析Java DTO(最新推荐)

《深度解析JavaDTO(最新推荐)》DTO(DataTransferObject)是一种用于在不同层(如Controller层、Service层)之间传输数据的对象设计模式,其核心目的是封装数据,... 目录一、什么是DTO?DTO的核心特点:二、为什么需要DTO?(对比Entity)三、实际应用场景解析

深度解析Java项目中包和包之间的联系

《深度解析Java项目中包和包之间的联系》文章浏览阅读850次,点赞13次,收藏8次。本文详细介绍了Java分层架构中的几个关键包:DTO、Controller、Service和Mapper。_jav... 目录前言一、各大包1.DTO1.1、DTO的核心用途1.2. DTO与实体类(Entity)的区别1

MyBatisPlus如何优化千万级数据的CRUD

《MyBatisPlus如何优化千万级数据的CRUD》最近负责的一个项目,数据库表量级破千万,每次执行CRUD都像走钢丝,稍有不慎就引起数据库报警,本文就结合这个项目的实战经验,聊聊MyBatisPl... 目录背景一、MyBATis Plus 简介二、千万级数据的挑战三、优化 CRUD 的关键策略1. 查

python实现对数据公钥加密与私钥解密

《python实现对数据公钥加密与私钥解密》这篇文章主要为大家详细介绍了如何使用python实现对数据公钥加密与私钥解密,文中的示例代码讲解详细,感兴趣的小伙伴可以跟随小编一起学习一下... 目录公钥私钥的生成使用公钥加密使用私钥解密公钥私钥的生成这一部分,使用python生成公钥与私钥,然后保存在两个文

mysql中的数据目录用法及说明

《mysql中的数据目录用法及说明》:本文主要介绍mysql中的数据目录用法及说明,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录1、背景2、版本3、数据目录4、总结1、背景安装mysql之后,在安装目录下会有一个data目录,我们创建的数据库、创建的表、插入的

深度解析Python装饰器常见用法与进阶技巧

《深度解析Python装饰器常见用法与进阶技巧》Python装饰器(Decorator)是提升代码可读性与复用性的强大工具,本文将深入解析Python装饰器的原理,常见用法,进阶技巧与最佳实践,希望可... 目录装饰器的基本原理函数装饰器的常见用法带参数的装饰器类装饰器与方法装饰器装饰器的嵌套与组合进阶技巧

深度解析Spring Boot拦截器Interceptor与过滤器Filter的区别与实战指南

《深度解析SpringBoot拦截器Interceptor与过滤器Filter的区别与实战指南》本文深度解析SpringBoot中拦截器与过滤器的区别,涵盖执行顺序、依赖关系、异常处理等核心差异,并... 目录Spring Boot拦截器(Interceptor)与过滤器(Filter)深度解析:区别、实现

Navicat数据表的数据添加,删除及使用sql完成数据的添加过程

《Navicat数据表的数据添加,删除及使用sql完成数据的添加过程》:本文主要介绍Navicat数据表的数据添加,删除及使用sql完成数据的添加过程,具有很好的参考价值,希望对大家有所帮助,如有... 目录Navicat数据表数据添加,删除及使用sql完成数据添加选中操作的表则出现如下界面,查看左下角从左

深度解析Spring AOP @Aspect 原理、实战与最佳实践教程

《深度解析SpringAOP@Aspect原理、实战与最佳实践教程》文章系统讲解了SpringAOP核心概念、实现方式及原理,涵盖横切关注点分离、代理机制(JDK/CGLIB)、切入点类型、性能... 目录1. @ASPect 核心概念1.1 AOP 编程范式1.2 @Aspect 关键特性2. 完整代码实