python - How to manage missing countries in geodatasets - Stack Overflow

i'm currently working with geopandas and geodatasets to plot the countries from gnomad data. I hav

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...

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744177642a4561830.html

相关推荐

  • python - How to manage missing countries in geodatasets - Stack Overflow

    i'm currently working with geopandas and geodatasets to plot the countries from gnomad data. I hav

    9天前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信