<em>Mac</em>Book项目 2009年学校开始实施<em>Mac</em>Book项目,所有师生配备一本<em>Mac</em>Book,并同步更新了校园无线网络。学校每周进行电脑技术更新,每月发送技术支持资料,极大改变了教学及学习方式。因此2011
2021-06-01 09:32:01
前期我們介紹了很多的地圖模板,不管是全球的還是中國的,其實我感覺都十分的炫酷,哈哈哈,可是還有更加神奇的,更加炫酷的地圖模板,下面讓我們一起一飽眼福吧!
from pyecharts import options as opts from pyecharts.charts import Map3D from pyecharts.globals import ChartType # 經緯度 example_data = [ [[119.107078, 36.70925, 1000], [116.587245, 35.415393, 1000]], [[117.000923, 36.675807], [120.355173, 36.082982]], [[118.047648, 36.814939], [118.66471, 37.434564]], [[121.391382, 37.539297], [119.107078, 36.70925]], [[116.587245, 35.415393], [122.116394, 37.509691]], [[119.461208, 35.428588], [118.326443, 35.065282]], [[116.307428, 37.453968], [115.469381, 35.246531]], ] c = ( Map3D(init_opts=opts.InitOpts(width="1400px", height="700px")) .add_schema( maptype="重慶", itemstyle_opts=opts.ItemStyleOpts( color="rgb(5,101,123)", opacity=1, border_width=0.8, border_color="rgb(62,215,213)", ), light_opts=opts.Map3DLightOpts( main_color="#fff", main_intensity=1.2, is_main_shadow=False, main_alpha=55, main_beta=10, ambient_intensity=0.3, ), view_control_opts=opts.Map3DViewControlOpts(center=[-10, 0, 10]), post_effect_opts=opts.Map3DPostEffectOpts(is_enable=False), ) .add( series_name="", data_pair=example_data, type_=ChartType.LINES3D, effect=opts.Lines3DEffectOpts( is_show=True, period=4, trail_width=3, trail_length=0.5, trail_color="#f00", trail_opacity=1, ), linestyle_opts=opts.LineStyleOpts(is_show=False, color="#fff", opacity=0), ) .set_global_opts(title_opts=opts.TitleOpts(title="Map3D")) .render("區縣3D地圖.html") )
陣列裡面分別代表:經緯度,數值
from pyecharts import options as opts from pyecharts.charts import Map3D from pyecharts.globals import ChartType from pyecharts.commons.utils import JsCode example_data = [ ("黑龍江", [127.9688, 45.368, 100]), ("內蒙古", [110.3467, 41.4899, 100]), ("吉林", [125.8154, 44.2584, 100]), ("遼寧", [123.1238, 42.1216, 100]), ("河北", [114.4995, 38.1006, 100]), ("天津", [117.4219, 39.4189, 100]), ("山西", [112.3352, 37.9413, 100]), ("陝西", [109.1162, 34.2004, 100]), ("甘肅", [103.5901, 36.3043, 100]), ("寧夏", [106.3586, 38.1775, 100]), ("青海", [101.4038, 36.8207, 100]), ("新疆", [87.9236, 43.5883, 100]), ("西藏", [91.11, 29.97, 100]), ("四川", [103.9526, 30.7617, 100]), ("重慶", [108.384366, 30.439702, 100]), ("山東", [117.1582, 36.8701, 100]), ("河南", [113.4668, 34.6234, 100]), ("江蘇", [118.8062, 31.9208, 100]), ("安徽", [117.29, 32.0581, 100]), ("湖北", [114.3896, 30.6628, 100]), ("浙江", [119.5313, 29.8773, 100]), ("福建", [119.4543, 25.9222, 100]), ("江西", [116.0046, 28.6633, 100]), ("湖南", [113.0823, 28.2568, 100]), ("貴州", [106.6992, 26.7682, 100]), ("廣西", [108.479, 23.1152, 100]), ("海南", [110.3893, 19.8516, 100]), ("上海", [121.4648, 31.2891, 100]), ] c = ( Map3D(init_opts=opts.InitOpts(width="1400px", height="700px")) .add_schema( itemstyle_opts=opts.ItemStyleOpts( color="rgb(5,101,123)", opacity=1, border_width=0.8, border_color="rgb(62,215,213)", ), map3d_label=opts.Map3DLabelOpts( is_show=False, formatter=JsCode("function(data){return data.name + " " + data.value[2];}"), ), emphasis_label_opts=opts.LabelOpts( is_show=False, color="#fff", font_size=10, background_color="rgba(0,23,11,0)", ), light_opts=opts.Map3DLightOpts( main_color="#fff", main_intensity=1.2, main_shadow_quality="high", is_main_shadow=False, main_beta=10, ambient_intensity=0.3, ), ) .add( series_name="Scatter3D", data_pair=example_data, type_=ChartType.SCATTER3D, bar_size=1, shading="lambert", label_opts=opts.LabelOpts( is_show=False, formatter=JsCode("function(data){return data.name + ' ' + data.value[2];}"), ), ) .set_global_opts(title_opts=opts.TitleOpts(title="Map3D")) .render("中國3D地圖.html") )
如果說前面的那個你看起來不太舒服,那麼這個絕對適合做資料視覺化展示喲!
from pyecharts import options as opts from pyecharts.charts import Map3D from pyecharts.globals import ChartType from pyecharts.commons.utils import JsCode example_data = [ ("黑龍江", [127.9688, 45.368, 100]), ("內蒙古", [110.3467, 41.4899, 300]), ("吉林", [125.8154, 44.2584, 300]), ("遼寧", [123.1238, 42.1216, 300]), ("河北", [114.4995, 38.1006, 300]), ("天津", [117.4219, 39.4189, 300]), ("山西", [112.3352, 37.9413, 300]), ("陝西", [109.1162, 34.2004, 300]), ("甘肅", [103.5901, 36.3043, 300]), ("寧夏", [106.3586, 38.1775, 300]), ("青海", [101.4038, 36.8207, 300]), ("新疆", [87.9236, 43.5883, 300]), ("西藏", [91.11, 29.97, 300]), ("四川", [103.9526, 30.7617, 300]), ("重慶", [108.384366, 30.439702, 300]), ("山東", [117.1582, 36.8701, 300]), ("河南", [113.4668, 34.6234, 300]), ("江蘇", [118.8062, 31.9208, 300]), ("安徽", [117.29, 32.0581, 300]), ("湖北", [114.3896, 30.6628, 300]), ("浙江", [119.5313, 29.8773, 300]), ("福建", [119.4543, 25.9222, 300]), ("江西", [116.0046, 28.6633, 300]), ("湖南", [113.0823, 28.2568, 300]), ("貴州", [106.6992, 26.7682, 300]), ("廣西", [108.479, 23.1152, 300]), ("海南", [110.3893, 19.8516, 300]), ("上海", [121.4648, 31.2891, 1300]), ] c = ( Map3D(init_opts=opts.InitOpts(width="1400px", height="700px")) .add_schema( itemstyle_opts=opts.ItemStyleOpts( color="rgb(5,101,123)", opacity=1, border_width=0.8, border_color="rgb(62,215,213)", ), map3d_label=opts.Map3DLabelOpts( is_show=False, formatter=JsCode("function(data){return data.name + " " + data.value[2];}"), ), emphasis_label_opts=opts.LabelOpts( is_show=False, color="#fff", font_size=10, background_color="rgba(0,23,11,0)", ), light_opts=opts.Map3DLightOpts( main_color="#fff", main_intensity=1.2, main_shadow_quality="high", is_main_shadow=False, main_beta=10, ambient_intensity=0.3, ), ) .add( series_name="資料", data_pair=example_data, type_=ChartType.BAR3D, bar_size=1, shading="lambert", label_opts=opts.LabelOpts( is_show=False, formatter=JsCode("function(data){return data.name + ' ' + data.value[2];}"), ), ) .set_global_opts(title_opts=opts.TitleOpts(title="城市資料")) .render("帶有資料展示地圖.html") )
看完直呼這個模板,適合做城市之間的資料對,同時也展示了經緯度。
from pyecharts import options as opts from pyecharts.charts import Map3D from pyecharts.globals import ChartType c = ( Map3D(init_opts=opts.InitOpts(width="1400px", height="700px")) .add_schema( itemstyle_opts=opts.ItemStyleOpts( color="rgb(5,101,123)", opacity=1, border_width=0.8, border_color="rgb(62,215,213)", ), map3d_label=opts.Map3DLabelOpts( is_show=True, text_style=opts.TextStyleOpts( color="#fff", font_size=16, background_color="rgba(0,0,0,0)" ), ), emphasis_label_opts=opts.LabelOpts(is_show=True), light_opts=opts.Map3DLightOpts( main_color="#fff", main_intensity=1.2, is_main_shadow=False, main_alpha=55, main_beta=10, ambient_intensity=0.3, ), ) .add(series_name="", data_pair="", maptype=ChartType.MAP3D) .set_global_opts( title_opts=opts.TitleOpts(title="全國行政區劃地圖-Base"), visualmap_opts=opts.VisualMapOpts(is_show=False), tooltip_opts=opts.TooltipOpts(is_show=True), ) .render("全國標籤地圖.html") )
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="1400px", height="700px")) .add_schema() .add( maptype="world", series_name="World Population", data_pair=POPULATION[1:], is_map_symbol_show=False, label_opts=opts.LabelOpts(is_show=False), ) .set_global_opts( visualmap_opts=opts.VisualMapOpts( min_=low, max_=high, range_text=["max", "min"], is_calculable=True, range_color=["lightskyblue", "yellow", "orangered"], ) ) .render("地球.html") )
其實pyecharts還可以做百度地圖,可以縮放定位到每一個區域,但是其實我們在日常生活中可能用不上,如果要用可以去百度地圖展示效果或者學習練習也是可的
到此這篇關於Python視覺化神器pyecharts之繪製地理圖表的文章就介紹到這了,更多相關Python繪製地理圖表內容請搜尋it145.com以前的文章或繼續瀏覽下面的相關文章希望大家以後多多支援it145.com!
相關文章
<em>Mac</em>Book项目 2009年学校开始实施<em>Mac</em>Book项目,所有师生配备一本<em>Mac</em>Book,并同步更新了校园无线网络。学校每周进行电脑技术更新,每月发送技术支持资料,极大改变了教学及学习方式。因此2011
2021-06-01 09:32:01
综合看Anker超能充系列的性价比很高,并且与不仅和iPhone12/苹果<em>Mac</em>Book很配,而且适合多设备充电需求的日常使用或差旅场景,不管是安卓还是Switch同样也能用得上它,希望这次分享能给准备购入充电器的小伙伴们有所
2021-06-01 09:31:42
除了L4WUDU与吴亦凡已经多次共事,成为了明面上的厂牌成员,吴亦凡还曾带领20XXCLUB全队参加2020年的一场音乐节,这也是20XXCLUB首次全员合照,王嗣尧Turbo、陈彦希Regi、<em>Mac</em> Ova Seas、林渝植等人全部出场。然而让
2021-06-01 09:31:34
目前应用IPFS的机构:1 谷歌<em>浏览器</em>支持IPFS分布式协议 2 万维网 (历史档案博物馆)数据库 3 火狐<em>浏览器</em>支持 IPFS分布式协议 4 EOS 等数字货币数据存储 5 美国国会图书馆,历史资料永久保存在 IPFS 6 加
2021-06-01 09:31:24
开拓者的车机是兼容苹果和<em>安卓</em>,虽然我不怎么用,但确实兼顾了我家人的很多需求:副驾的门板还配有解锁开关,有的时候老婆开车,下车的时候偶尔会忘记解锁,我在副驾驶可以自己开门:第二排设计很好,不仅配置了一个很大的
2021-06-01 09:30:48
不仅是<em>安卓</em>手机,苹果手机的降价力度也是前所未有了,iPhone12也“跳水价”了,发布价是6799元,如今已经跌至5308元,降价幅度超过1400元,最新定价确认了。iPhone12是苹果首款5G手机,同时也是全球首款5nm芯片的智能机,它
2021-06-01 09:30:45