-
-
Notifications
You must be signed in to change notification settings - Fork 811
docs(example): Add Faceted map using Species Habitat dataset #3809
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
Conversation
This commit introduces a new example to the Altair documentation showcasing choropleth maps faceted by category. The example visualizes the distribution of suitable habitat for different species across US counties, using the proposed new Species Habitat dataset from vega-datasets (vega/vega-datasets#684). Key features of this example: - Demonstrates the use of `alt.Chart.mark_geoshape()` for geographical visualizations. - Shows how to create faceted maps for comparing categorical data across geographic regions. - Utilizes the `transform_lookup` and `transform_calculate` transforms for data manipulation within Altair. - Uses a CSV data file temporarily hosted in the vega-datasets repository branch (pending dataset merge). This example addresses issue #1711, which requested a faceted map example for the Altair documentation. Co-authored-by: Mattijn van Hoek <[email protected]>
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 for this PR! Added two comments. Is this a replacement of https://altair-viz.github.io/gallery/us_incomebrackets_by_state_facet.html? Btw, why the facet is working in that example, I thought that didn’t work yet 🧐
Appreciate the suggestions @mattijn and good quetsion about the existing example. This would be intended to supplement rather than replace that example.
Will try to address the question on faceting separately. |
@dangotbanned in 387f978 I need to use the following link to bring in the dataset as it's not available in the vega_datasets package on pypi.
but i notice in CONTRIBUTE.md it says:
How should I proceed? |
This commit introduces a new example to the Altair documentation showcasing choropleth maps faceted by category.
Important
This example depends on the new Species Habitat dataset being added in vega/vega-datasets#684. That PR must be merged first before this example will work correctly.
The example visualizes the distribution of suitable habitat for different species across US counties, using the proposed new Species Habitat dataset from vega-datasets (vega/vega-datasets#684).
Key features of this example:
alt.Chart.mark_geoshape()
for geographical visualizations.transform_lookup
andtransform_calculate
transforms for data manipulation within Altair.This example addresses issue #1711, which requested a faceted map example for the Altair documentation.