- pip install pyecharts
- write earth.py as below:
import pyecharts.options as opts from pyecharts.charts import MapGlobe from pyecharts.faker import POPULATION data = [x for _, x in POPULATION[1:]] low, high = min(data), max(data) c = ( MapGlobe(init_opts=opts.InitOpts(width='300px', height='300px',bg_color='#FFFAFA',)) .add_schema() .add( maptype="world", series_name="World Population", data_pair=POPULATION[1:], is_map_symbol_show=True, label_opts=opts.LabelOpts(is_show=True), ) .set_global_opts( title_opts=opts.TitleOpts(title="3D Global"), visualmap_opts=opts.VisualMapOpts( min_=low, max_=high, range_text=["max", "min"], is_calculable=True, range_color=["lightskyblue", "yellow", "orangered"], ) ) .render("world_map_3d.html") )
3. python earth.py, it will generate world_map_3d.html file, open it in browser:
Hullo there, just started to be aware about your web page through The Big G, and found that it is really informative. I will be grateful should you continue this idea. Saidee Cyril Torruella
Hello! This is my first comment here so I just wanted to give a quick shout out and tell you I genuinely enjoy reading through your blog posts. Can you recommend any other blogs/websites/forums that go over the same subjects? Thank you! Bryn Consalve Olenta
We stumbled over here from a different web address and thought I may as well check things out. I like what I see so now i am following you. Look forward to looking over your web page again. Jasmin Roddie Mirabelle
Its like you read my mind! You appear to know a lot about this, like you wrote the book in it or something. I think that you could do with some pics to drive the message home a bit, but instead of that, this is wonderful blog. A fantastic read. I will definitely be back. Dorothea Cobb Krystyna
Great blog here! Also your web site loads up very fast! What web host are you using? Can I get your affiliate link to your host? I wish my site loaded up as fast as yours lol Rafaelita Kingston Kendre
By having specific goals to work for, you are more likely to succeed in improving yourself. Rozele Ty Touber
Very informative article. Thanks for sharing this info with us. Ingeberg Finley Blasien
I think this is one of the most important info for me. Phebe Chris Bacon
Hey there. I found your site by way of Google while looking for a related matter, your site got here up. It appears to be great. I have bookmarked it in my google bookmarks to visit then. Sabrina Calhoun Melania
I was very happy to discover this page. I want to to thank you for ones time just for this fantastic read!! I definitely really liked every little bit of it and i also have you saved as a favorite to look at new things on your blog. Flor Rowney Justine
Everyone loves it when people get together and share ideas. Sophi Curtis Mirisola
Informative article, totally what I wanted to find. Morena Fremont Sperling