An election is run on the geometry to generate output data structures. It handles casting votes and applying a social choice function.


Election runs one of two election functions: electionRun or districtElection.

The function districtElection compiles district and statewide votes and results.

Election may be called by ElectionSampler to run multiple elections.


Election Results

The election results are all the data you need for making explanations. They are output by the election step in the sim. They are input for the visualizers. They are composed of several parts:

The districtElectionResults have additional variables by tract and district.