US state legislatures in SQL: current and former state legislators, their terms and committee rosters from the Open States people data, state legislative election returns since 1967, Shor-McCarty legislator ideology scores, and live bills, votes and events from the Open States API.
Legislators, committees, elections, ideology, bills and votes for the 50 US states, DC and Puerto Rico, queryable from DuckDB.
Most of the catalog works without any account: the Open States people data (CC0), Carl Klarner's State Legislative Election Returns (CC0) and the Shor-McCarty ideology data (CC BY-NC-SA 4.0) are downloaded on first use into a per-user cache and reused. Live bills, roll-call votes and events come from the Open States API v3 and need a free API key stored as a DuckDB secret:
CREATE SECRET (TYPE openstates, API_KEY 'your-key');
Identifiers follow Open States (ocd-person/..., ocd-jurisdiction/...), states are USPS codes with two-digit FIPS codes, and chamber is upper, lower or legislature (Nebraska's unicameral Legislature and the DC Council).