Python可视化地图:2019年中国各省GDP情况(pyecharts地理图表) 您所在的位置:网站首页 中国各省历年gdp排名表图 Python可视化地图:2019年中国各省GDP情况(pyecharts地理图表)

Python可视化地图:2019年中国各省GDP情况(pyecharts地理图表)

2024-05-24 10:04| 来源: 网络整理| 查看: 265

大家好!

今天来分享一下如何用Python工具来帮助我们制作一张展示2019年中国各省GDP的可视化地图。

案例中数据表格结构如下:

代码及演示:

import numpy as np import pandas as pd from pyecharts.globals import ThemeType from pyecharts import options as opts from pyecharts.charts import Map df_map = pd.read_excel("D:\\01\\会Excel的隔壁老王\\Excel报表\\20200506-Python地图可视化:2019年中国各省GDP情况\\Python地图可视化:2019年中国各省GDP情况.xlsx") df_mapc = ( Map(init_opts=opts.InitOpts(width="1000px", height="600px",theme = ThemeType.DARK)) .add("2019年中国各省GDP", df_map[["地区","2019年省GDP总量(亿)"]].values.tolist(), "china") .set_global_opts( title_opts=opts.TitleOpts(title="2019年中国各省GDP总量(亿)(微信公众号:会Excel的隔壁老王)",pos_bottom = "90%", pos_right = "20%"), visualmap_opts=opts.VisualMapOpts(type_= "color",max_=110000, range_text = ['GDP总量(亿)颜色区间:', ''],is_piecewise=1,pos_top= "middle",pos_left="left",orient="vertical",split_number=10), #tooltip_opts = opts.TooltipOpts(formatter="{c} %") ) #.render("map_visualmap_piecewise.html") ) c.render_


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有