[Python] How to get maps in GeoPandas after datasets are removed?

Discussão em 'Python' iniciado por Stack, Março 16, 2025.

  1. Stack

    Stack Membro Participativo

    I have found very easy and useful to load world map from geopandas datasets, as probably many others, for example:

    import geopandas as gpd
    world = gpd.read_file(gpd.datasets.get_path('naturalearth_lowres'))


    However, this gives a FutureWarning that the dataset module is deprecated and will be removed in the future. There are maps available for download, for example from https://www.naturalearthdata.com/downloads/110m-cultural-vectors/ but the files are zipped and it does not seem like a convenient workflow to either get and process files from there or neither include processed files with the source.

    Is there an alternative? What is the best way to do this, especially if I want my code to work with future versions of GeoPandas?

    Continue reading...

Compartilhe esta Página