Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dataset used in example on scatter plots page is removed in geopandas 1.0 #4778

Open
LiamConnors opened this issue Oct 4, 2024 · 1 comment · May be fixed by #4782
Open

Dataset used in example on scatter plots page is removed in geopandas 1.0 #4778

LiamConnors opened this issue Oct 4, 2024 · 1 comment · May be fixed by #4782
Labels
documentation written for humans good first issue suitable for newcomers

Comments

@LiamConnors
Copy link
Member

LiamConnors commented Oct 4, 2024

This example here won't run with later versions of geopandas

https://plotly.com/python/scatter-plots-on-maps/#basic-example-with-geopandas

import plotly.express as px
import geopandas as gpd

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

px.set_mapbox_access_token(open(".mapbox_token").read())
fig = px.scatter_geo(geo_df,
                    lat=geo_df.geometry.y,
                    lon=geo_df.geometry.x,
                    hover_name="name")
fig.show()
     20     error_msg = (
     21         "The geopandas.dataset has been deprecated and "
     22         "was removed in GeoPandas 1.0. New sample datasets are now available "
     23         "in the geodatasets package (https://geodatasets.readthedocs.io/en/latest/)"
     24     )

It would be good to have an example that works with earlier and later versions of geopandas

@LiamConnors LiamConnors added documentation written for humans good first issue suitable for newcomers labels Oct 4, 2024
sarthak-12 pushed a commit to sarthak-12/plotly.py that referenced this issue Oct 7, 2024
sarthak-12 pushed a commit to sarthak-12/plotly.py that referenced this issue Oct 7, 2024
@sarthak-12 sarthak-12 linked a pull request Oct 7, 2024 that will close this issue
23 tasks
@live2awesome
Copy link

is this issue is resolved ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation written for humans good first issue suitable for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants