How Govbot Works
How the three dashboards on this site are built — from raw government data, through automated pipelines, to the pages you're reading. The plain-English version ↗ · GitHub repo ↗
This site has three dashboards and three separate backend pipelines that feed them.
They run automatically twice a day on GitHub Actions, write plain .json
files into the site, and never break the page when a government source goes down —
they fall back to the last good data. Here's how each one works. 👇
From government to something you can read
Government sources
50+ legislatures, agencies and election boards — the official record.
Govbot pipelines
Automated scrapers pull the data twice a day on GitHub Actions.
Validate + normalize
Schema-checked, de-duplicated and standardized across jurisdictions.
AI topic tagging
A model reads each bill and labels it by topic — clearly marked as context.
Open data
Plain JSON and open RSS feeds written straight into the site.
Your dashboards
Legislation, Hearings and Illinois Elections — what you actually use.
How it stays trustworthy
The full picture — how each pipeline works
The diagrams below show exactly what runs, in order, for each dashboard.
Explore Legislation data.json
Bills from 50+ states & territories. An AI model reads each bill and tags it by topic. Powers the searchable, filterable bill table and charts.
Hearings & Public Comment hearings.json
Upcoming hearings & public-comment windows scraped straight from state legislatures and the federal register — with RSS feeds you can subscribe to.
Illinois Elections elections.json
Every office on upcoming Chicago & Illinois ballots — citywide, all 50 wards, CPS board, Police District Councils — with candidates from official candidate lists.
One static site, two data pipelines
Everything you see is static HTML + JSON hosted on GitHub Pages — no server, no database at request time. Two scheduled jobs refresh the data files behind the scenes; your browser just downloads them and draws the page.
data.jsonhearings.json + RSSelections.json + RSSmdbook buildchihacknight.github.io/govbotExplore Legislation
Git repositories are the dataset here: govbot mirrors each jurisdiction's bills as a git repo.
The pipeline clones them, lets a small AI model read every new bill and label it by topic, then
flattens the result into one data.json the page can search instantly.
govbot clone allfilter_new_bills.py — a seen-bills ledger, so only fresh bills get re-taggedgovbot tag — AI topic tagginggovbot-dashboard.yml; keyword fallback if the model is unavailablebuild_dashboard_data.pydata.jsonpeople.json- Clone the data. Each state's bills live in their own git repo (git repos are the dataset).
govbot clone allpulls them all down. - Skip what's unchanged. A ledger of already-seen bills means only new bills go through the expensive tagging step — the rest are reused.
- Tag with a tiny AI model. An embedding model compares each bill's text to a curated list of topics and attaches the closest matches. If the model can't load, a keyword list stands in.
- Flatten to one file. Everything is merged into
data.json— the single file the dashboard downloads. - Render in the browser. Govbot Explore Bills ↗ reads the per-state files split from it and builds the map, filters, table, and per-bill details modal (which fetches the live govbot record on demand).
Hearings & Public Comment
A completely separate scraper that taps legislature websites directly — not through Open States —
plus federal public-comment periods. It produces a rolling near-future window of hearings and a family
of RSS feeds so you can follow a single bill, a whole state, or one hearing. It runs every 12 hours in its own
repository, govbot-public-hearings ↗, and Govbot copies its
hearings.json and feeds into this site on every deploy.
govbot.hearings.schema.json); federal comes from the keyless Federal Register API- Go straight to the source. Instead of a third-party aggregator, the scraper reads each legislature's own site plus the Federal Register's public API for federal rules open to comment.
- Normalize to one shape. Every source is mapped onto a shared hearings schema so the page treats them all the same.
- Fan out to feeds. Beyond the dashboard's
hearings.json, it emits a whole-calendar RSS and granular per-bill / per-jurisdiction / per-hearing feeds you can subscribe to. - Keep the last good copy. If a source is down and zero hearings come back, the previous committed data stays — the panel never blanks out.
python3 scraper/test_scrape_hearings.py in that repository), so parsing works without
hitting the network — exactly the offline-first principle the project is built on.
Illinois Elections
The ballot's structure — every office, district, ballot date, and a plain-English “why this race exists” note — is stable, so it lives in a committed seed. Scrapers only populate candidates onto that seed from official candidate lists. A race with nobody listed yet keeps an empty slot and a link to its official source — never a guess.
elections_seed.jsonillinois-elections.html- Start from the ballot's shape. A committed seed lists every race, its district, ballot date, and why it exists — this never depends on a scrape succeeding.
- Read official candidate lists. Best-effort parsers read the Chicago Board of Elections pages and the Illinois SBE “Who Is Running” list.
- Match, don't invent. Each candidate attaches to a race only when its office and district resolve unambiguously; unplaceable rows are dropped with a warning.
- Fan out to feeds. Beyond
elections.json, it emits a whole-ballot RSS plus per-office-group and per-race feeds you can follow.
Pipelines that talk to each other
The three dashboards are independent, but they cross-reference each other so a bill and its hearing feel connected.
🏛️ A bill's details modal
Opens a bill on the Legislation Dashboard and checks the hearings feed…
🗓️ …shows if it's on a calendar
“On the committee calendar — see the Committee Hearings tab.” And hearings link bills back with a pre-filtered deep link.
What it's built with
Deliberately boring, portable, and dependency-light — everything runs as plain scripts.
govbot CLI
Python — build & scrape scripts
all-MiniLM-L6-v2 — embeddings
GitHub Actions — scheduler
mdBook — site builder
GitHub Pages — hosting
Git repos — the datasets
Vanilla JS — no framework
JSON Schema — validation
Want the plain-English version? How It Works ↗ on the About page covers the same pipeline, and every action folder in the GitHub repo ↗ is a self-contained module you can run as a shell script or a GitHub Action.