Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update geopandas example to support versions >=1.0 (fixes issue #4778)
  • Loading branch information
Sarthak Khanna committed Oct 7, 2024
commit 8bd4722ce5bba59fde12b186235215a48eaeab66
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