pip install pyecharts
pip install echarts-countries-pypkg
pip install echarts-china-provinces-pypkg
pip install echarts-china-cities-pypkg
python
from pyecharts import options as opts
from pyecharts.charts import Geo
from pyecharts.faker import Faker
python
data = [
# ...
]
python
geo = (
Geo()
.add_schema(maptype="china")
.add(
data,
label_opts=opts.LabelOpts(is_show=False),
)
.set_global_opts(
visualmap_opts=opts.VisualMapOpts(max_=100),
)
)
python
geo.render("geo_map.html")
python
from pyecharts import options as opts
from pyecharts.charts import Geo
from pyecharts.faker import Faker
data = [
# ...
]
geo = (
Geo()
.add_schema(maptype="china")
.add(
data,
label_opts=opts.LabelOpts(is_show=False),
)
.set_global_opts(
visualmap_opts=opts.VisualMapOpts(max_=100),
)
)
geo.render("geo_map.html")