Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.7k
Update geopandas example#4782
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Thanks@sarthak-12 for the PR!
But we also may need to look at the datasets available on
returns the following for me
|
It looks like the geopandas team simultaneously separated data sets into a separate projectand removed the cities data set from their example library The data appear to be available here:https://www.naturalearthdata.com/downloads/110m-cultural-vectors/ if this code needs a file inside that zip, would you want it committed to the plotly data repo? |
Thanks@rl-utility-man I think we could avoid committing the zip file. It looks like something like this would just work:
What do you think? |
rl-utility-man commentedJul 9, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
if gpd.read_file() just works on a ZIP, I like this solution. If we'd have to clutter the codebase with downloading and unzipping and need to deal with potential differences in the local file system, then perhaps putting a small geopandas point data set in the data repo would be cleaner. I feel no deep expertise or strong opinions here; I just hoped my prior comment would provide some context to move this toward a resolution. |
Please uncomment this block and take a look at this checklist if your PR is making substantial changes todocumentation/impacts files in the
doc
directory. Check all that apply to your PR, and leave the rest unchecked to discuss with your reviewer! Not all boxes must be checked for every PR :)If your PR modifies code of the
plotly
package, we have a different checklistbelow :-).
Documentation PR
doc/README.md
filedoc-prod
branch OR it targets themaster
branchpx
example if at all possibleplotly.graph_objects as go
/plotly.express as px
/plotly.io as pio
df
fig = <something>
call is high up in each new/modified example (eitherpx.<something>
ormake_subplots
orgo.Figure
)fig.add_*
andfig.update_*
rather thango.Figure(data=..., layout=...)
in every new/modified examplefig.add_shape
andfig.update_xaxes
are used instead of bigfig.update_layout
calls in every new/modified examplefig.show()
is at the end of each new/modified exampleplotly.plot()
andplotly.iplot()
are not used in any new/modified exampleCode PR
plotly.graph_objects
, my modifications concern thecodegen
files and not generated files.modified existing tests.
new tutorial notebook (please see the doc checklist as well).
Notes:
projection="natural earth"
to avoid the need for a Mapbox access token.Testing:
Related Issues:
Let me know if there are any questions or if further changes are needed.