Skip to content

Commit

Permalink
Update geopandas example to support versions >=1.0 (fixes issue plotl…
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarthak Khanna committed Oct 7, 2024
1 parent b509b4a commit 8bd4722
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/python/scatter-plots-on-maps.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ import plotly.express as px
import geopandas as gpd

if gpd.__version__ < '1.0':
geo_df = gpd.read_file(gpd.datasets.get_path('naturalearth_cities'))
df = gpd.read_file(gpd.datasets.get_path('naturalearth_cities'))
else:
import geodatasets
geo_df = gpd.read_file(geodatasets.get_path('naturalearth_cities'))
df = gpd.read_file(geodatasets.get_path('naturalearth_cities'))

px.set_mapbox_access_token(open(".mapbox_token").read())
fig = px.scatter_geo(geo_df,
Expand Down

0 comments on commit 8bd4722

Please sign in to comment.