Data & Code
Data & Code (PGP)
OpenPrecincts
A collaborative project to collect precinct geographies and election data from across all 50 states, D.C., and the five U.S. territories, to empower citizens in advance of the 2021 redistricting.
Gerrymandering Test Code (MATLAB)
Run the three gerrymandering tests presented on this site, and replicate the analyses reported in Three Tests for Practical Evaluation of Partisan Gerrymandering.
Virginia precincts and demonstrative map
Contains relevant precinct-level results and a demonstrative map for undoing the racially gerrymandered districts in the southeastern corner of Virginia. More detail at our GitHub repository.
Gerrymandering Test Code (Python)
Run the three gerrymandering tests presented on this site, as well as several other common gerrymandering metrics.
Geoprocessing Code
A loose collection of utilities for various geoprocessing operations that are common in the study of redistricting. Work in progress.
State Legislative Election Results, 1971–2018
Contains the results of over 80,000 single-member state legislative election from 1971 to 2016.
Congressional Election Results, 1948–2018
Cleaned results of each Congressional election from 1948 to 2016.
Data & Code (Non-PGP)
State Legislative Election Results
Carl Klarner's collection of state legislature elections from 1967–2016.
Daily Kos Elections Data
Daily Kos Elections maintains an archive of useful data on recent elections, including presidential election results by Congressional and State Legislative district, district maps, demographic information, and much more.
redist
Code by Ben Fifield et al. to generate hundreds of thousands of alternative district plans.
Elections Geodata
An open-source effort to collect precinct-level geographic shapefiles.
Markov chain district sampler
C++ code by Wes Pegden et al. to sample among many similar district maps in order to determine if a map is highly unusual.
OpenElections
An open-source effort to collect precinct-level election results.
GerryChain
Python code by the Metric Geometry and Gerrymandering Group at Tufts to generate alternative districting plans.