District
The area a contest is voted in: a state, a congressional or legislative district, a county, a city, a ward or a school district.
- Returned by
GET /v1/contests,GET /v1/contests/{id},GET /v1/elections/{slug}/export- Found in
- Contest (
district)
How it connects
- Many contests share a district.
idmatches an officeholder’sdistrict_id, which links a contest to whoever holds the seat now. ocd_idis the Open Civic Data division id, the same id other civic data uses; filter contests withdistricts={ocd_id}.
Good to know
typeis open: it comes from the election offices’ own classifications, so new values can appear as we load more places.ocd_idisnullfor a few local districts that have no Open Civic Data division.
Fields
| Field | Type | Meaning | Example |
|---|---|---|---|
id | integer | District id. Matches an officeholder’s district_id. | 1 |
ocd_id | stringor null | Open Civic Data division id, used in districts= filters. | ocd-division/country:us/state:ca |
name | string | District name. | California |
level | string | Level of government.federal, state, county, city, school, special meanings | state |
type | string | Kind of district: statewide, congressional, state_upper, state_lower, county, council, school, …151 values so far: meanings | statewide |
state | stringor nullTwo capital letters (USPS code) | USPS state code. | CA |