python - Geopandas - 试图在 shapemap 上获取确切位置
问题描述
我正在尝试将这些社区中心的位置放在我的形状图上。目前,我的地图上唯一显示的是来自我已链接的现有 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);
解决方案
推荐阅读
- vb6 - 在数据网格视图中第二次删除一行不起作用
- jython - 如何根据值的 MD5 哈希在 Openrefine 中创建 UUID
- javascript - JavaScript 为 stringToColour 函数添加透明度选项
- c - 使用 pthread 和信号量的 C 语言中的读写器问题
- ios - Swift 5 - 导航页面
- php - 了解php错误处理和代码执行
- c++ - 如何在 Visual Studio 2017 中为 C++ 控制台应用程序添加头文件
- aws-lambda - aws lambda 上没有名为“psycopg2”的模块。解决这个问题的最佳方法是什么?
- authentication - Kafka 授权和认证端口
- java - 通过 XSLT 和 Java 产生不同的当前时间