最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Python可視化神器pyecharts之繪制地理圖表練習(xí)

 更新時(shí)間:2022年07月06日 16:17:47   作者:王小王_123???????  
這篇文章主要介紹了Python可視化神器pyecharts之繪制地理圖表,文章圍繞主題展開詳細(xì)的內(nèi)容介紹,具有一定的參考價(jià)值,需要的小伙伴可以參考一下

炫酷地圖

前期我們介紹了很多的地圖模板,不管是全球的還是中國(guó)的,其實(shí)我感覺(jué)都十分的炫酷,哈哈哈,可是還有更加神奇的,更加炫酷的地圖模板,下面讓我們一起一飽眼福吧!

3D炫酷地圖模板系列

重慶市3D地圖展示

from pyecharts import options as opts
from pyecharts.charts import Map3D
from pyecharts.globals import ChartType
# 經(jīng)緯度
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("區(qū)縣3D地圖.html")
)

中國(guó)3D地圖

數(shù)組里面分別代表:經(jīng)緯度,數(shù)值

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]),
("內(nèi)蒙古", [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("中國(guó)3D地圖.html")
)

中國(guó)3D數(shù)據(jù)地圖(適合做數(shù)據(jù)可視化)

如果說(shuō)前面的那個(gè)你看起來(lái)不太舒服,那么這個(gè)絕對(duì)適合做數(shù)據(jù)可視化展示喲!

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]),
("內(nèi)蒙古", [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="數(shù)據(jù)",
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="城市數(shù)據(jù)"))
.render("帶有數(shù)據(jù)展示地圖.html")
)

看完直呼這個(gè)模板,適合做城市之間的數(shù)據(jù)對(duì),同時(shí)也展示了經(jīng)緯度。

全國(guó)行政區(qū)地圖(帶城市名字)

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="全國(guó)行政區(qū)劃地圖-Base"),
visualmap_opts=opts.VisualMapOpts(is_show=False),
tooltip_opts=opts.TooltipOpts(is_show=True),
)
.render("全國(guó)標(biāo)簽地圖.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")
)

其實(shí)pyecharts還可以做百度地圖,可以縮放定位到每一個(gè)區(qū)域,但是其實(shí)我們?cè)谌粘I钪锌赡苡貌簧?,如果要用可以去百度地圖展示效果或者學(xué)習(xí)練習(xí)也是可的

到此這篇關(guān)于Python可視化神器pyecharts之繪制地理圖表的文章就介紹到這了,更多相關(guān)Python繪制地理圖表內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

  • Python實(shí)現(xiàn)采集網(wǎng)站ip代理并檢測(cè)是否可用

    Python實(shí)現(xiàn)采集網(wǎng)站ip代理并檢測(cè)是否可用

    這篇文章主要介紹了如何利用Python爬蟲實(shí)現(xiàn)采集網(wǎng)站ip代理,并檢測(cè)IP代理是否可用。文中的示例代碼講解詳細(xì),感興趣的可以試一試
    2022-01-01
  • Python實(shí)現(xiàn)指定區(qū)域桌面變化監(jiān)控并報(bào)警

    Python實(shí)現(xiàn)指定區(qū)域桌面變化監(jiān)控并報(bào)警

    在這篇博客中,我們將使用Python編程語(yǔ)言和一些常用的庫(kù)來(lái)實(shí)現(xiàn)一個(gè)簡(jiǎn)單的區(qū)域監(jiān)控和變化報(bào)警系統(tǒng),文中有詳細(xì)的代碼示例供大家參考,需要的朋友可以參考下
    2023-07-07
  • wxPython之wx.DC繪制形狀

    wxPython之wx.DC繪制形狀

    這篇文章主要為大家詳細(xì)介紹了wxPython之wx.DC繪制形狀,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2019-11-11
  • Python3如何使用tabulate打印數(shù)據(jù)

    Python3如何使用tabulate打印數(shù)據(jù)

    這篇文章主要介紹了Python3如何使用tabulate打印數(shù)據(jù),文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友可以參考下
    2020-09-09
  • 使用Python Tkinter創(chuàng)建文件生成工具的操作步驟

    使用Python Tkinter創(chuàng)建文件生成工具的操作步驟

    我們將使用Python的Tkinter模塊創(chuàng)建一個(gè)簡(jiǎn)單的文件生成工具,這個(gè)工具可以用來(lái)創(chuàng)建Excel、文本、Python腳本和Word文檔等不同類型的文件,感興趣的朋友可以參考下
    2024-04-04
  • Python實(shí)現(xiàn)求一個(gè)集合所有子集的示例

    Python實(shí)現(xiàn)求一個(gè)集合所有子集的示例

    今天小編就為大家分享一篇Python 實(shí)現(xiàn)求一個(gè)集合所有子集的示例,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧
    2018-05-05
  • python用quad、dblquad實(shí)現(xiàn)一維二維積分的實(shí)例詳解

    python用quad、dblquad實(shí)現(xiàn)一維二維積分的實(shí)例詳解

    今天小編大家分享一篇python用quad、dblquad實(shí)現(xiàn)一維二維積分的實(shí)例詳解,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧
    2019-11-11
  • 通過(guò)代碼實(shí)例了解Python3編程技巧

    通過(guò)代碼實(shí)例了解Python3編程技巧

    這篇文章主要介紹了通過(guò)代碼實(shí)例了解Python3編程技巧,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友可以參考下
    2020-10-10
  • Django框架安裝及項(xiàng)目創(chuàng)建過(guò)程解析

    Django框架安裝及項(xiàng)目創(chuàng)建過(guò)程解析

    這篇文章主要介紹了Django框架安裝及項(xiàng)目創(chuàng)建過(guò)程解析,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友可以參考下
    2020-09-09
  • 關(guān)于python中第三方庫(kù)交叉編譯的問(wèn)題

    關(guān)于python中第三方庫(kù)交叉編譯的問(wèn)題

    這篇文章主要介紹了python及第三方庫(kù)交叉編譯,通過(guò)交叉編譯工具,我們就可以在CPU能力很強(qiáng)、存儲(chǔ)控件足夠的主機(jī)平臺(tái)上(比如PC上)編譯出針對(duì)其他平臺(tái)的可執(zhí)行程序,需要的朋友可以參考下
    2022-09-09

最新評(píng)論

瑞安市| 宜君县| 襄樊市| 错那县| 桑日县| 沅陵县| 阿瓦提县| 玉山县| 莒南县| 贵南县| 个旧市| 社会| 康保县| 枞阳县| 全椒县| 镇原县| 永德县| 梅州市| 西乡县| 庐江县| 普兰县| 出国| 宁夏| 瑞安市| 鹿泉市| 亚东县| 张家川| 额尔古纳市| 垣曲县| 雷波县| 离岛区| 敦煌市| 海淀区| 宾阳县| 高尔夫| 玛多县| 石门县| 鲁甸县| 涿州市| 淮安市| 深水埗区|