admin管理员组文章数量:1400182
i'm currently working with geopandas and geodatasets to plot the countries from gnomad data. I have a gdf dataframe containing the countries, latitude, longitude, counts (of individuals) and geometry points. On the other side, I have the world map from .1/catalog/datasets/natural-earth-countries-1_110m/exports/geojson?lang=en&timezone=America%2FArgentina%2FBuenos_Aires
So I merge those two dataframes with
worldn = world.merge(gdf, left_on='name', right_on='countries', how='left')
The plot is functioning but that are some countries that are not present in the world dataframe such as: ["Puerto Rico", "Barbados", "Palestine" and "Scotland"]
How do I deal with that? the geometry points in gdf are writed as
POINT (104.1954 35.8617)
and in world dataframe is
POLYGON ((22.55814 49.08574, 22.28084 48.82539...
or
MULTIPOLYGON (((-122.84 49, -120 49, -117.0312...
本文标签: pythonHow to manage missing countries in geodatasetsStack Overflow
版权声明:本文标题:python - How to manage missing countries in geodatasets - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744177642a2594076.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论