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

geom_histogram should not try to handle geometries in GeoDataFrame #281

Closed
alshan opened this issue Jan 5, 2021 · 1 comment
Closed
Assignees

Comments

@alshan
Copy link
Collaborator

alshan commented Jan 5, 2021

ggplot() + geom_histogram(aes(x='price'), data=merged_areas)

Fails with the error: "geometry not found in data".

ggplot(merged_areas) + geom_histogram(aes(x='price'))

Works just fine.

The 'merged_areas' is a GeoDataFrame containing the 'price' column, geometry (polygons) and other columns.

@alshan
Copy link
Collaborator Author

alshan commented Jan 5, 2021

Similar situation:

ggplot() + geom_point(aes(x='neighbourhood', y='price'), data=gdf_listings)

Shows a map. Meanwhile, the expected plot was:
image

Expression:

ggplot(data=gdf_listings) + geom_point(aes(x='neighbourhood', y='price'))

works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants