Skip to content

Latest commit

 

History

History
10 lines (7 loc) · 740 Bytes

README.md

File metadata and controls

10 lines (7 loc) · 740 Bytes

Persistence of Gerrymandering example code

This is some of the code used for the paper "The (Homological) Persistence of Gerrymandering" by Duchin, Needham and Weighill.

  • tdaredistricting.py: the main functions needed to convert districting plans into persistence diagrams.
  • generate_ensemble.py: an example script for generating an ensemble of Congressional plans for Pennsylvania.
  • make_graphics.ipynb: a jupyter notebook for generating some plots from the output of generate_ensemble.py.

All of the code requires the open-source ensemble generation code GerryChain and the gudhi library. The PA shapefile is from the mggg-states github.