爬虫部分(getdata/index.py)
- 先爬取台风列表数据,即get_typhoon_list函数
- 再爬取台风详细数据,即get_typhoon_info函数
- main函数负责两个爬取函数直接的逻辑
数据清理部分(handle/handle.py)
数据预处理
数据分析部分(handle/anaylse.py)
- wind_speed_top10 台风风速TOP10
- time_top10 台风持续时间TOP10
- month_count 各月台风数量折线图
- hPa_boxplot 各月份中心气压箱线图
- typhoon_level_pie 台风类型占比图
后端接口部分
服务器地址(默认http://127.0.0.1:5000) + 路由路径(@app.route('路由路径') = 接口地址
- /bar1 -> wind_speed_top10
- /bar2 -> time_top10
- /line -> month_count
- /pie -> typhoon_level_pie
- /boxplot -> hPa_boxplot
前端绘图(index.js)
用jquery库的ajax向后端接口请求数据
