You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace matplotlib with Altair and add live charts to docs (#305)
* Replace matplotlib with Altair across all docs and add rendered Vega-Lite charts
Switch all visualization examples from matplotlib to Altair for a more
declarative, interactive charting experience. Add mkdocs-charts-plugin to
render Vega-Lite specs directly in the docs so readers can see live,
interactive charts with tooltips—not just code blocks.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Address PR review: add admonitions, DC data, and altair dep
- Add `altair` to docs optional dependencies in pyproject.toml
- Add DC (id: 11) to choropleth datasets in quickstart, decennial, and
population-estimates pages that were missing it
- Add `!!! example` admonitions above all rendered vegalite charts to
clarify they show state-level sample data, not the exact output of the
code above them
- Update chart titles to remove "(sample data)" suffix now that
admonitions explain the context
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Update uv.lock with mkdocs-charts-plugin and altair deps
The lockfile was out of sync with pyproject.toml after adding
mkdocs-charts-plugin and altair to the docs extras. ReadTheDocs
uses `uv sync --frozen` which requires the lockfile to match.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add CLAUDE.md with project context for Claude Code
Documents project structure, common commands, dependency
management (including the uv.lock gotcha with ReadTheDocs),
docs conventions, CI pipeline, and test markers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Fix dot density map: extract geometry coords for Altair
Altair cannot resolve nested attribute access like geometry.x
in field references. Extract lon/lat into separate columns
before passing to alt.Chart().
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
4.**county** -- `"037"` is the FIPS code for Los Angeles County. Use `pypums.datasets.fips.lookup_fips(state="California", county="Los Angeles County")` to look up codes.
85
85
5.**geometry** -- When `True`, PyPUMS fetches TIGER/Line cartographic boundary shapefiles and merges them with the data. The result is a `GeoDataFrame` with a `geometry` column.
86
86
87
-
Now plot it:
87
+
Now plot it with [Altair](https://altair-viz.github.io/):
0 commit comments