Skip to content

Geopandas example for tile maps fails with geopandas>1.0 #5289

@ndrezn

Description

@ndrezn

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

Metadata

Metadata

Assignees

Labels

P1needed for current cyclebugsomething broken

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions