实时疫情数据可视化分析

导入模块

import requests
import pandas as pd
import time

一、数据获取

具体网站:疫情秘书|全球新冠肺炎疫情实时大数据报告,请收藏!

1.数据获取

data_中国=requests.get('http://dzq.wenlvnews.com/index.php/yiqing/push.html')
data_外国=requests.get('http://dzq.wenlvnews.com/index.php/yiqing/glbpush.html')

2.数据解析[最小单位为省份]

2-1.国内信息

data_中国=pd.DataFrame(data_中国.json()['allData']['area'])[['provinceName','confirmedCount','curedCount','deadCount']]
data_中国.columns=['省','累积确诊','累积痊愈','累积死亡']
data_中国['国家']='中国'                               
data_中国=data_中国[['国家','省','累积确诊','累积痊愈','累积死亡'

你可能感兴趣的:(python,opencv)