Documentation
API Endpoints
Precincts
See examples of Precinct objects.
Precinct objects contain geographic information for individual
"precincts" (i.e. areas that have the same ballot). These are
the lowest-level division for elections, so they are usually
fairly small areas. If you want district maps, you can use the
extra=merge_geos
parameter to combine precincts into a district map for a specific
contest.
-
For the most part, our Precinct objects mirror real-world precinct
divisions. However, sometimes real-world precincts aren't actually
the lowest-level division, so we have to split that real-world precinct
into multiple Precinct objects in our API. Check the
ocd_id
for a Precinct's real-world identifier. -
Since real-world precincts can change from election to election,
we create a completely set of new precincts for each election. So
even if a precinct hasn't changed from the previous election, we
will still create a new Precinct with a new
id
and put it under the newelection_id
. If you want to track how a real-world precinct changes election-to-election, theocd_id
can help you map the same precinct across elections.
API Endpoints
-
GET
/precincts
- List precincts (can be searched and filtered). -
GET
/precincts/{id}
- Get a specific precinct.
Attributes
Attribute | Format | Description | Example |
---|---|---|---|
type
|
ObjectType | This object's data type. Will always be "precinct". |
"precinct"
|
id
|
String | This is the unique id we assign to the Precinct. NOTE: Our precincts don't always match one-to-one with real-world precincts (read more). |
"a74635..."
|
ocd_id
|
OCD-ID
or null
|
This is the
Open Civic Data Identifier
(OCD-ID) for this Precinct. If there is no OCD-ID, this
value will be null .
|
"ocd-jurisdiction/country:us/..."
|
election_id
|
String | This is the Election.id to which this Precinct belongs. NOTE: We create new precincts for each election, (read more). |
"985ukj.."
|
voting_info
|
VotingInfo | This object contains voting information, such as polling locations and times for this Precinct. |
{"polling_locations": [...], ...}
|
geo
|
GeoJSON | This is a geographic map of the precinct boundaries. |
{"type": "Polygon", "coordinates": [...], ...}
|
...
|
We may add more Precinct attributes in the future, so be able to handle unknown attributes. |
Examples
An individual precinct:
{ "type": "precinct", "id": "345-6", "ocd_id": null, "election_id": "123-4", "voting_info": {...}, "geo": {"type": "Polygon", ...}, }
Voting Info Object
TODO