Unbiased competitive political district plans build on a principled measure of compactness. Built by science, not a lobbyist.
Plans are built to minimize the real world distance between all residents within a district, while perfectly balancing the population of all districts. Compact districts mean all voters live in districts that best match their neighborhood. Phase one shows the idealized "power diagram" district plan while phase two shows a realizable plan based on the 2010 census with perfect population balance down to the person.
The code for the first and second phases can be found at https://github.com/pnklein/district. The main branch contains only code for the first phase. The DP branch contains code for the first and second phases. It includes a makefile for fetching the relevant data and building the files. Note that the second phase currently requires use of a commercial solver, Gurobi. You might be able to get a free license to use Gurobi for research purposes. We have also developed and implemented an algorithm for the second phase. This implementation does not depend on commercial tools. The dynamic program takes an existing district plan that is not necessarily population-balanced, and perturbs the districts at the boundary so as to minimize the population disparities. Contact us if you are interested in using this code.
Philip Klein at klein@brown.edu
Archer Wheeler at archer_wheeler@brown.edu