Skip to content

Geopandas is removing the dataset module #11

@FeLoe

Description

@FeLoe

For examples 2.5 and 2.8 the geopandas dataset is used to get a world map to plot on. It already gives a warning that in the next version there will be no dataset module in geopandas anymore, meaning that the code will stop working. There is a work-around but it is kind of ugly and involves installing additional packages, so maybe there is a nicer way to solve it:

import fsspec

url = "https://www.naturalearthdata.com/http//www.naturalearthdata.com/" \
      "download/110m/cultural/ne_110m_admin_0_countries.zip"
    
with fsspec.open(f"simplecache::{url}") as file:
    world = gpd.read_file(file)

Depending on the system one is working on, these packages need to be installed to make it run:

!pip install requests
!pip install aiohttp
!pip install fsspec

As said, this is for now just a deprecation warning and the solution is pretty ugly, so I did not create any pull request yet -- but it probably will come up soon-ish once people start installing the version of geopandas that does not support the dataset module anymore.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions