# State Government Atlas (50 states)

Documentation for **how each state organizes government**, seat counts for key chambers, leadership, majority strength, and election timing.

## What this is

- **Data:** `data/ten_largest.json` and `data/remaining_states.json` (merged by the build script)
- **HTML:** `output/index.html` and `output/*.html` — run `scripts/build_atlas.py`
- **Electoral College:** `scripts/build_electoral_college.py` → `output/electoral_college.html`

**Readable in the browser:** open `README.html` next to this file (styled). This `.md` file is the same content for editors and git.

## Authoritative sources

| Need | Start here |
|------|------------|
| Legislature size, sessions | [NCSL — Legislatures](https://www.ncsl.org/legislatures) |
| Governor / next election | [NGA](https://www.nga.org/governors/) or [List of governors (Wikipedia)](https://en.wikipedia.org/wiki/List_of_United_States_governors) |
| Live seat counts | State legislature or Secretary of State |
| Trifectas | [Ballotpedia — trifectas](https://ballotpedia.org/State_government_trifectas) |
| Courts | [NCSC](https://www.ncsc.org/) or state judicial site |

There is no single federal API for every field in every state; this atlas aggregates common answers and links out for live numbers.

## Data freshness

- Chamber **totals** change rarely (law/constitution).
- **Governor** and **election years** in JSON carry a `data_as_of` date.
- **Majority seats** move with specials — verify on official sites before relying on snapshots.

## Regenerate HTML

```bash
cd state_government_atlas/scripts
python3 build_atlas.py
python3 build_electoral_college.py
```

Python 3.8+ required (see repo for any extra dependencies).
