Geopandas-试图在Shapemap上获得准确的位置

时间:2018-11-07 15:14:13

标签: python pandas geopandas

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

Image of community centre 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);

Image of city I've trying to add the locations in

0 个答案:

没有答案