Ver a proveniência

generated the world/China discription map

master
杨浩然 há 3 anos
ascendente
cometimento
da40af15a6
5 ficheiros alterados com 1310 adições e 313 eliminações
  1. BIN
      COVID-19/Project/.vs/Project/v16/.suo
  2. +46
    -78
      COVID-19/Project/Project/China.html
  3. +36
    -14
      COVID-19/Project/Project/Project.py
  4. +1007
    -0
      COVID-19/Project/Project/world.html

BIN
COVID-19/Project/.vs/Project/v16/.suo Ver ficheiro


COVID-19/Project/Project/province.html → COVID-19/Project/Project/China.html Ver ficheiro

@ -8,11 +8,11 @@
</head>
<body>
<div id="c11071484495441fb56547337c4c9980" class="chart-container" style="width:900px; height:500px;"></div>
<div id="2994d21d5f1e472d9bd72a8e63405c9d" class="chart-container" style="width:900px; height:500px;"></div>
<script>
var chart_c11071484495441fb56547337c4c9980 = echarts.init(
document.getElementById('c11071484495441fb56547337c4c9980'), 'white', {renderer: 'canvas'});
var option_c11071484495441fb56547337c4c9980 = {
var chart_2994d21d5f1e472d9bd72a8e63405c9d = echarts.init(
document.getElementById('2994d21d5f1e472d9bd72a8e63405c9d'), 'white', {renderer: 'canvas'});
var option_2994d21d5f1e472d9bd72a8e63405c9d = {
"animation": true,
"animationThreshold": 2000,
"animationDuration": 1000,
@ -50,7 +50,6 @@
"series": [
{
"type": "map",
"name": "\u786e\u8bca",
"label": {
"show": true,
"position": "top",
@ -59,135 +58,135 @@
"mapType": "china",
"data": [
{
"name": "Tibet",
"name": "\u897f\u85cf",
"value": 315.0
},
{
"name": "Qinghai",
"name": "\u9752\u6d77",
"value": 5645.0
},
{
"name": "Macau",
"name": "\u6fb3\u95e8",
"value": 11994.0
},
{
"name": "Ningxia",
"name": "\u5b81\u590f",
"value": 23057.0
},
{
"name": "Jilin",
"name": "\u5409\u6797",
"value": 42570.0
},
{
"name": "Guizhou",
"name": "\u8d35\u5dde",
"value": 45186.0
},
{
"name": "Gansu",
"name": "\u7518\u8083",
"value": 47108.0
},
{
"name": "Hainan",
"name": "\u6d77\u5357",
"value": 52669.0
},
{
"name": "Shanxi",
"name": "\u5c71\u897f",
"value": 58587.0
},
{
"name": "Yunnan",
"name": "\u4e91\u5357",
"value": 60036.0
},
{
"name": "Liaoning",
"name": "\u8fbd\u5b81",
"value": 62055.0
},
{
"name": "Tianjin",
"name": "\u5929\u6d25",
"value": 64101.0
},
{
"name": "Inner Mongolia",
"name": "\u5185\u8499\u53e4",
"value": 67454.0
},
{
"name": "Guangxi",
"name": "\u5e7f\u897f",
"value": 79283.0
},
{
"name": "Shaanxi",
"name": "\u9655\u897f",
"value": 106005.0
},
{
"name": "Hebei",
"name": "\u6cb3\u5317",
"value": 106109.0
},
{
"name": "Fujian",
"name": "\u798f\u5efa",
"value": 116024.0
},
{
"name": "Xinjiang",
"name": "\u65b0\u7586",
"value": 136161.0
},
{
"name": "Chongqing",
"name": "\u91cd\u5e86",
"value": 180853.0
},
{
"name": "Sichuan",
"name": "\u56db\u5ddd",
"value": 193293.0
},
{
"name": "Jiangsu",
"name": "\u6c5f\u82cf",
"value": 202713.0
},
{
"name": "Beijing",
"name": "\u5317\u4eac",
"value": 235333.0
},
{
"name": "Shanghai",
"name": "\u4e0a\u6d77",
"value": 241459.0
},
{
"name": "Shandong",
"name": "\u5c71\u4e1c",
"value": 245706.0
},
{
"name": "Heilongjiang",
"name": "\u9ed1\u9f99\u6c5f",
"value": 259973.0
},
{
"name": "Jiangxi",
"name": "\u6c5f\u897f",
"value": 289122.0
},
{
"name": "Anhui",
"name": "\u5b89\u5fbd",
"value": 306312.0
},
{
"name": "Hunan",
"name": "\u6e56\u5357",
"value": 316247.0
},
{
"name": "Zhejiang",
"name": "\u6d59\u6c5f",
"value": 393984.0
},
{
"name": "Henan",
"name": "\u6cb3\u5357",
"value": 395577.0
},
{
"name": "Guangdong",
"name": "\u5e7f\u4e1c",
"value": 516608.0
},
{
"name": "Hong Kong",
"name": "\u9999\u6e2f",
"value": 834002.0
},
{
"name": "Hubei",
"name": "\u6e56\u5317",
"value": 20670801.0
}
],
@ -204,12 +203,12 @@
"legend": [
{
"data": [
"\u786e\u8bca"
""
],
"selected": {
"\u786e\u8bca": true
"": true
},
"show": true,
"show": false,
"padding": 5,
"itemGap": 10,
"itemWidth": 25,
@ -235,16 +234,16 @@
},
"title": [
{
"text": "\u75ab\u60c5\u56fe-\u786e\u8bca\u4eba\u6570",
"text": "\u4e2d\u56fd\uff08\u5927\u9646\uff09\u75ab\u60c5\u56fe-\u603b\u786e\u8bca\u4eba\u6570",
"padding": 5,
"itemGap": 10
}
],
"visualMap": {
"show": true,
"type": "piecewise",
"type": "continuous",
"min": 0,
"max": 100,
"max": 200000,
"inRange": {
"color": [
"#50a3ba",
@ -258,42 +257,11 @@
"orient": "vertical",
"showLabel": true,
"itemWidth": 20,
"itemHeight": 14,
"borderWidth": 0,
"pieces": [
{
"min": 1000,
"label": ">1000\u4eba",
"color": "#6F171F"
},
{
"min": 500,
"max": 1000,
"label": "500-1000\u4eba",
"color": "#C92C34"
},
{
"min": 100,
"max": 499,
"label": "100-499\u4eba",
"color": "#E35B52"
},
{
"min": 10,
"max": 99,
"label": "10-99\u4eba",
"color": "#F39E86"
},
{
"min": 1,
"max": 9,
"label": "1-9\u4eba",
"color": "#FDEBD0"
}
]
"itemHeight": 140,
"borderWidth": 0
}
};
chart_c11071484495441fb56547337c4c9980.setOption(option_c11071484495441fb56547337c4c9980);
chart_2994d21d5f1e472d9bd72a8e63405c9d.setOption(option_2994d21d5f1e472d9bd72a8e63405c9d);
</script>
</body>
</html>

+ 36
- 14
COVID-19/Project/Project/Project.py Ver ficheiro

@ -128,7 +128,7 @@ dataWorld = dataWorld.sort_values(by=['Country/Region','group_var']).reset_index
dataWorld = dataWorld.pivot_table(index=['Country/Region'], columns='group_var')
dataWorld.columns = dataWorld.columns.droplevel().rename(None)
#中国省份
#中国省份(bottom 12)
dataChina.sort_values('Confirmed', inplace=True)
xData = []
yConfirmed = []
@ -150,20 +150,42 @@ ax5.legend()
plt.show()
ChinaConfirmed=[]
worldConfirmed=[]
#中国疫情图
ChinaConfirmed = []
ChinaProvince = []
worldConfirmed = []
provinceNameMap = {'Tibet':'西藏', 'Qinghai':'青海', 'Macau':'澳门', 'Ningxia':'宁夏', 'Jilin':'吉林', 'Guizhou':'贵州',
'Gansu':'甘肃', 'Hainan':'海南', 'Shanxi':'山西', 'Yunnan':'云南', 'Liaoning':'辽宁', 'Tianjin':'天津',
'Inner Mongolia':'内蒙古', 'Guangxi':'广西', 'Shaanxi':'陕西', 'Hebei':'河北', 'Fujian':'福建', 'Xinjiang':'新疆',
'Chongqing':'重庆', 'Sichuan':'四川', 'Jiangsu':'江苏', 'Beijing':'北京', 'Shanghai':'上海', 'Shandong':'山东',
'Heilongjiang':'黑龙江', 'Jiangxi':'江西', 'Anhui':'安徽', 'Hunan':'湖南', 'Zhejiang':'浙江', 'Henan':'河南',
'Guangdong':'广东', 'Hong Kong':'香港', 'Hubei':'湖北'}
for i in range(33):
ChinaConfirmed.append((dataChina.index[i],dataChina['Confirmed'][i]))
ChinaConfirmed.append(dataChina['Confirmed'][i])
ChinaProvince.append(provinceNameMap[dataChina.index[i]])
map_China = Map()
map_China.set_global_opts(title_opts=options.TitleOpts(title="疫情图-确诊人数"),
visualmap_opts=options.VisualMapOpts(is_piecewise=True,
pieces=[
{"min": 1000, "label": '>1000人',"color": "#6F171F"},
{"min": 500, "max": 1000,"label": '500-1000人', "color": "#C92C34"},
{"min": 100, "max": 499,"label": '100-499人', "color": "#E35B52"},
{"min": 10, "max": 99,"label": '10-99人', "color": "#F39E86"},
{"min": 1, "max": 9, "label": '1-9人', "color": "#FDEBD0"}]))
map_China.add("确诊", ChinaConfirmed, maptype='china')
map_China.render("province.html")
map_China.set_global_opts(title_opts=options.TitleOpts(title="中国(大陆)疫情图-总确诊人数"),
legend_opts=options.LegendOpts(is_show=False),
visualmap_opts=options.VisualMapOpts(max_=200000))
map_China.add("",[list(z) for z in zip(ChinaProvince, ChinaConfirmed)], maptype='china')
map_China.render("China.html")
#世界地图
worldConfirmed = []
worldName = []
for i in range(dataWorld.shape[0]):
worldConfirmed.append(dataWorld['Confirmed'][i])
if dataWorld.index[i] == 'US':
worldName.append('United States')
else:
worldName.append(dataWorld.index[i])
map_world = Map()
map_world.set_global_opts(title_opts=options.TitleOpts(title="世界疫情图-总确诊人数"),
legend_opts=options.LegendOpts(is_show=True),
visualmap_opts=options.VisualMapOpts(min_=10000,max_=80000000))
map_world.add("",[list(z) for z in zip(worldName, worldConfirmed)], maptype='world')
map_world.render("world.html")

+ 1007
- 0
COVID-19/Project/Project/world.html
A apresentação das diferenças no ficheiro foi suprimida por ser demasiado grande
Ver ficheiro


Carregando…
Cancelar
Guardar