首先安装对应的python模块
- $ pip install pyecharts==0.5.10
- $ pip install echarts-countries-pypkg
- $ pip install echarts-china-provinces-pypkg
- $ pip install echarts-china-cities-pypkg
- $ pip install echarts-china-counties-pypkg
世界地图
> from pyecharts import Map
> value = [95.1, 23.2, 43.3, 66.4, 88.5]
> attr = ["China", "Canada", "Brazil", "Russia", "United States"] map0 =
> Map("世界地图示例", width=1200, height=600) map0.add("世界地图", attr, value,
> maptype="world", is_visualmap=True, visual_text_color='#000')
> map0.render(path="世界地图.html")
中国地图
from pyecharts import Map
province_distribution = {
'河南': 45.23, '北京': 37.56, '河北': 21, '辽宁': 12, '江西': 6, '上海': 20, '安徽': 10, '江苏':