Solve gerrymandering once and for all by redistricting the United States using Voronoi tesselations, an unbiased way of dividing a space into random regions.
- Lay random points over all states with more than one district according to population density.
- Create Voronoi cells from the random points. These cells become Congressional districts.
- Estimate the party balance in the House of Representatives using past voting data.
- Calculate different tessllations and party membership for a large number of different random number seeds to find probabilities of different levels of party membership.
- Compare to current level of party membership.
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.
- 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.
- Jupyter
- Numpy
- Scipy
- Matplotlib
- Basemap (To install with pip, you may need a direct link: matplotlib/basemap#251)
- Shapely (If installing with pip, this issue may apply: shapely/shapely#260)