python 画一张中国地图 geopandas 城市地图 DATAV.GeoAtlas
发布日期:2021-05-07 10:27:22 浏览次数:18 分类:精选文章

本文共 469 字,大约阅读时间需要 1 分钟。

地图json获取:

DATAV.GeoAtlas

import requestsfrom geopandas import GeoDataFramefrom shapely.geometry import shapeimport matplotlib.pyplot as pltdef get_bound_and_save_json():    url = "https://geo.datav.aliyun.com/areas_v2/bound/100000.json"    r = requests.get(url)    return r.json()['features'][0]['geometry']b = shape(get_bound_and_save_json())geodf = GeoDataFrame([{   'geometry': b}])geodf.plot()plt.title("China")plt.xlabel('lon')plt.ylabel('lat')plt.grid()plt.show()

在这里插入图片描述

上一篇:python 数据挖掘 关联规则挖掘 实践 Apriori FP-Tree mlxtend
下一篇:tqdm python 指示进度的简单用法 ftplib 指示下载进度

发表评论

最新留言

初次前来,多多关照!
[***.217.46.12]2025年03月23日 11时25分53秒