-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
categorical choropleths #2057
categorical choropleths #2057
Conversation
missing docs, of course |
locationmode=locationmode, | ||
featureidkey=featureidkey, | ||
geojson=geojson | ||
if not hasattr(geojson, "__geo_interface__") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a comment here to explain why this is needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, this is a special hook for geopandas
... if you have a geopandas frame, it has a special property .geometry
which has a special .__geo_interface__
property which returns GeoJSON, so doing this here allows the user to say px.choropleth(df, geojson=df.geometry,...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, I was wondering whether this explanation could be added to the source code as a comment, for future maintainers
Looks good to me, and the example with the |
it does work for me... although it is odd that it's just that one hint we give to users |
💃 |
💃 |
No description provided.