首页 > 解决方案 > Geopandas - 试图在 shapemap 上获取确切位置

问题描述

我正在尝试将这些社区中心的位置放在我的形状图上。目前,我的地图上唯一显示的是来自我已链接的现有 csv 文件的不同级别的收入因素。但正如我所说,我想链接这些我有纬度/经度的位置:

社区中心 csv 图片

显示我所在城市的 shapefile 的当前代码。

# set a variable that will call whatever column we want to visualise on the map
variable = 'D2_Empl_rank'
# set the range for the choropleth
vmin, vmax = 0, 420
# create figure and axes for Matplotlib
fig, ax = plt.subplots(1, figsize=(20,10))
merged.plot(column=variable, cmap='Blues', linewidth=0.8, ax=ax, edgecolor='0.8')
merged.apply(lambda x: ax.annotate(s=x.WARDNAME, xy=x.geometry.centroid.coords[0], ha='center'),axis=1);

我试图在其中添加位置的城市图片

标签: pythonpandasgeopandas

解决方案


推荐阅读