plotly.py icon indicating copy to clipboard operation
plotly.py copied to clipboard

Geopandas example for tile maps fails with geopandas>1.0

Open ndrezn opened this issue 5 months ago • 1 comments

In https://plotly.com/python/tile-scatter-maps/#basic-example-with-geopandas, the example:

import plotly.express as px
import geopandas as gpd

geo_df = gpd.read_file(gpd.datasets.get_path("naturalearth_cities"))

fig = px.scatter_map(
    geo_df,
    lat=geo_df.geometry.y,
    lon=geo_df.geometry.x,
    hover_name="name",
)
fig.show()

Gives:

AttributeError: The geopandas.dataset has been deprecated and was removed in GeoPandas 1.0. You can get the original 'naturalearth_cities' data from https://www.naturalearthdata.com/downloads/110m-cultural-vectors/.

I assume we pin an old geopandas but it would need to be updated to work with the latest

ndrezn avatar Jul 22 '25 13:07 ndrezn

@emilykl please check and update pin

gvwilson avatar Aug 01 '25 12:08 gvwilson