shapefile - 地理绘图英国(ONS)县形状文件(shp)的问题
问题描述
我正在尝试绘制从 UK ONS 下载的多边形 shapefile,而我的脚本在使用 geoplot 和 geopandas 时只会产生一个空白。我认为这是来自 ONS 的 shp 文件的问题,因为当从单独的数据源尝试美国各州时,它似乎工作正常。
这是我的脚本,非常简单:
import geopandas as gpd
import geoplot as gplt
nb = r'C:\Users\XX\Downloads\[![Counties_and_Unitary_Authorities_(December_2017)_Boundaries_UK.shp][1]][1]'
regions = gpd.read_file(nb)
regions.sample(5)
gplt.polyplot(regions)
读取 shapefile 时,数据似乎可以通过几何列进行地理绘图(见图),但也许我遗漏了一些东西?
解决方案
推荐阅读
- python - Python matlib text on bar chart
- apache - .htaccess 下 ipv6 子网的 RewriteCond
- c# - 如何替换文本文件中以特定单词开头并以 C# 中的特殊字符结尾的字符串?
- angular - Angular HttpClient TypeError: Object(...) is not a function
- python - xlrd.biffh.XLRDError:Excel xlsx 文件;不支持
- python - 有没有一种更简单的方法可以将列表随机拆分为子列表而不在 python 中重复元素?
- python - 删除分号作为行分隔符使用 pandas.read_csv 读取 csv 文件
- haskell - 如果是模棱两可的类型,如何确定类型?
- html - 材质-UI。如何用我的自定义一类覆盖库二类选择器
- python-3.x - 如何删除给定字符串中“更多:”之后出现的句子?