Claude/GitHub pages dashboard filter yqpxgx#61
Open
frankies2727 wants to merge 12 commits into
Open
Conversation
attain updated repo
- docs/src/dashboard/index.html: self-contained static dashboard (no external deps) with filters for jurisdiction, session, chamber, topic tags, and free-text search; stat tiles, bills-by-jurisdiction and bills-by-topic bar charts (click to filter), activity-by-month chart, and a sortable bills table with source links - scripts/build_dashboard_data.py: aggregates metadata.json from cloned govbot repos into docs/src/dashboard/data.json, joining topics from govbot tag output (tags/*.tag.json) with a keyword fallback - scripts/dashboard_tags.json: demo keyword tag definitions (govbot.yml tags: shape) used to build the committed sample data from the mocks - docs/src/dashboard-guide.md + SUMMARY.md: docs chapter linking the dashboard and describing how to regenerate data.json Deployed automatically by the existing deploy-docs.yml workflow, since mdBook copies non-markdown files in docs/src verbatim into the book. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012Ank9k5ifCqmNpNKP1rYkZ
…-filter-yqpxgx Add legislation dashboard with filterable bill data visualization
…on deploy - deploy-docs.yml: before mdbook build, shallow-clone every *-legislation repo from the govbot-openstates-scrapers org and regenerate docs/src/dashboard/data.json so the published dashboard covers all jurisdictions; falls back to the committed sample data with a warning if fetching or aggregation fails - add a daily 8am UTC schedule (after the 6am scrapes) so Pages data stays fresh without manual redeploys - build_dashboard_data.py: add --source-label for a readable footer source; regenerate sample data.json with it - dashboard-guide.md: document the CI data flow Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012Ank9k5ifCqmNpNKP1rYkZ
…-filter-yqpxgx feat: build dashboard data from all govbot-openstates-scrapers repos …
The Pages deploy cloned all 56 govbot-openstates-scrapers repos but found no bills because the aggregator assumed the mocks' exact directory layout (**/bills/*/metadata.json at a fixed depth). - build_dashboard_data.py: discover metadata.json at any depth in each repo, identify bills by content (identifier + title + jurisdiction), take the session from the bill's own legislative_session field with a path fallback, and find govbot tag output by walking ancestors for a tags/ directory instead of assuming it sits beside bills/ - deploy-docs.yml: when aggregation still finds nothing, print a layout sample of the cloned repos in the job log for debugging - log per-repo bill counts for CI visibility Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012Ank9k5ifCqmNpNKP1rYkZ
…-filter-yqpxgx fix: make dashboard data aggregation layout-agnostic
The govbot-openstates-scrapers repos hold raw scraper output (_data/<locale>/bill_<uuid>.json per schemas/openstates.bill.schema.json), not the OCD-files metadata.json layout, so the deploy-time aggregation found zero bills and fell back to sample data. - build_dashboard_data.py: also discover bill_*.json files; accept jurisdiction as either the OCD-files dict or a raw OCD ID string; map jurisdiction codes to display names (raw output has no name); dedupe repeated scrapes of the same bill keeping the latest action; sort output for deterministic files - index.html: make the jurisdiction/topic bar lists scroll past ~20 rows so 50+ jurisdictions don't stretch the page - rename the workflow to 'Deploy docs & dashboard to GitHub Pages' so it's recognizable in the Actions tab Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012Ank9k5ifCqmNpNKP1rYkZ
The first full-data deploy produced a 90MB data.json (10MB gzipped), close to the 100MB GitHub Pages per-file limit and slow to parse. - build_dashboard_data.py: emit only fields the page reads (drop state_name/classification/first_action), truncate titles and action descriptions to display length, cap sponsors at 3, and serialize with compact separators — 90MB -> ~60MB raw, ~7.7MB gzipped - index.html: loading indicator while the dataset downloads, debounced search (each render scans the full dataset), cap the activity chart at the last 24 months so one stale action date can't stretch the axis across decades, widen the y-axis gutter that clipped 4-digit tick labels Verified with Playwright against the real 141,969-bill dataset: 3.1s load, <500ms filter interactions, no page errors. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012Ank9k5ifCqmNpNKP1rYkZ
Surfaces data.json's generated_at (the daily snapshot build time) as a visible badge under the header, formatted as 'Data as of July 5, 2026, 21:02 UTC'. formatAsOf handles ISO timestamps, bare dates, and bad values gracefully. Footer reworded to 'Snapshot built …'. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012Ank9k5ifCqmNpNKP1rYkZ
Some org repos (IL, AR, AZ, NH, NM, VA) clone but publish zero bills because their upstream OpenStates scrapers aren't producing output. The dashboard silently omitted them, which read as 'missing' rather than 'pending'. - build_dashboard_data.py: emit empty_jurisdictions (repos that cloned but yielded no bills) in data.json - index.html: show a note under the jurisdiction chart listing pending jurisdictions; they appear automatically once data lands - dashboard-guide.md: document the badge and pending note Verified with the real 50-jurisdiction dataset plus the six known empty repos. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012Ank9k5ifCqmNpNKP1rYkZ
Places the freshness badge on the same row as the H1 (wrapping below it on narrow viewports) instead of under the description line. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012Ank9k5ifCqmNpNKP1rYkZ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.