Skip to content

Redistrict the United States using Voronoi Tesselations

Notifications You must be signed in to change notification settings

valerierose/voronoi_district

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Voronoi District

Solve gerrymandering once and for all by redistricting the United States using Voronoi tesselations, an unbiased way of dividing a space into random regions.

By Elkanah Tisdale (1771-1835) (often falsely attributed to Gilbert Stuart)[1] (Originally published in the Boston Centinel, 1812.) [Public domain], via Wikimedia Commons VS. Massachusetts redistricted with Voronoi cells

Redistricting the entire U.S.

Methodology

  1. Lay random points over all states with more than one district according to population density.
  2. Create Voronoi cells from the random points. These cells become Congressional districts.
  3. Estimate the party balance in the House of Representatives using past voting data.
  4. Calculate different tessllations and party membership for a large number of different random number seeds to find probabilities of different levels of party membership.
  5. Compare to current level of party membership.

Current Status

This is a work in progress. Currently able to scatter random points on the U.S. map without using population density and figuring out how to divide a state into Voronoi cells.

Steps

  • Plot the United States.
  • Put random points in a state.
  • Put random points in all states.
  • Create Voronoi cells based on random points.
  • Find where Voronoi cells intersect state lines, creating districts.
  • Divide all states into Voronoi cells.
  • Color voronoi cells in visualization.
  • Distribute random points based on population density.
  • Find voting or party data by location.
  • Color districts by likely party affiliation.
  • Create redistricting results for many random number seeds.
  • Plot probabilities of possible House of Representatives party splits.
  • Find probability of current House split.

Dependencies

  1. Jupyter
  2. Numpy
  3. Scipy
  4. Matplotlib
  5. Basemap (To install with pip, you may need a direct link: matplotlib/basemap#251)
  6. Shapely (If installing with pip, this issue may apply: shapely/shapely#260)

Releases

No releases published

Packages

No packages published