如何解决英国geojson显示空白的叶子地图
我正在尝试将以下geojson用于英国地方当局,但它显示空白地图。
我的表格以相同的方式列出了大多数地方政府。不知道它的key_on参考是唯一的问题还是更多。
到目前为止,我的代码如下:
threshold_scale = np.linspace(df_ctbl['Population'].min(),df_ctbl['Population'].max(),6,dtype=int)
threshold_scale = threshold_scale.tolist() # change the numpy array to a list
threshold_scale[-1] = threshold_scale[-1] + 1 # make sure that the last value of the list is greater than the maximum immigration
# let folium determine the scale.
londonf_map = folium.Map(location=[latitudeld,longitudeld],zoom_start=4,tiles='MapBox Bright')
londonf_map.choropleth(
geo_data=uk_geo,data=df_ctbl,columns=['Local Authorityp','Population'],key_on= 'properties.lad13nm',threshold_scale=threshold_scale,fill_color='YlOrRd',fill_opacity=0.7,line_opacity=0.2,legend_name='UK Population in 2019',reset=True
)
londonf_map
有人可以帮忙吗?谢谢
解决方法
您可以查看以下答案:question about Mapbox bright。我认为您的图块名称“ Mapbox Bright”有问题。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。