RaceDistrict Model

class elections.models.RaceDistrict

Each RaceDistrict object contains either the information associated with a particular race in a particular district of a state, or the statewide district summary for that race.

test_live

Required CharField(1)

Single character flag indicating test (t) vs. live (l) election results data.

race_district_id

Required BigIntegerField Primary Key

The race_county_id value is for use as a unique identifier for reference from the DistrictResult model.

race_number

Required IntegerField

AP-assigned race number. Race numbers are guaranteed to be unique only within a state.

election_date

Required DateField

Date of the election.

state_postal

Required CharField(2)

Two character state abbreviation (e.g., IA, LA, ).

district_type

CharField(16)

Abbreviation of the district type

  • AL At-large delegate
  • PL PLEO delegate
  • CD Congressional District
  • DD Delegate District
  • SD State Senate District
cd_number

IntegerField

A unique district ID with one (1) indicating statewide summaries.

district_name

CharField(64)

Name of the district (e.g., CD 4, At-Large, etc.)

office_id

Required CharField(1)

Single character office type ID. Only Top-of-the-ticket races (President [P], Governor [G], US Senate [S], and US House [H]) are guaranteed to be unique on a national level. All other office types are guaranteed to be unique only within a state. There are other characters used, depending on the state and local races.

race_type_id

Required CharField(1)

National, state or local race type identifier. National identifiers are:

  • D: Dem Primary
  • E: Dem Caucus
  • R: GOP Primary
  • S: GOP Caucus
  • G: General

Other characters may be used, depending on the state and local races.

seat_number

Required IntegerField

Integer indicating district number or an initiative number. This may be zero (0) for a statewide race.

office_name

CharField(64)

Name of the office (e.g., U.S. House, Governor, etc.).

seat_name

CharField(64)

The district or initiative name (e.g., District 46, 1A-Gay Marriage, etc.) This may be empty for a statewide race (e.g., a Governor race).

race_type_party

CharField(16)

Party abbreviation for the race (e.g., Dem, GOP, Lib, etc.). This may be empty for a General Election.

race_type

CharField(32)

Description of the type of race (e.g., Primary, Runoff, General).

office_description

CharField(64)

Further description of the office type.

number_of_winners

Required IntegerField()

The maximum number of winners.

precincts_reporting

Required IntegerField

The number of precincts currently reporting during the election.

total_precincts

Required IntegerField

The total number of precincts.

Previous topic

Candidate Model

Next topic

DistrictResult Model