Code demo for the Applied Mathematics senior seminar at Columbia University, Fall 2022. Based on templates and code from the GerryChain package:
- https://github.com/mggg-states/PA-shapefiles
- https://github.com/uwescience/dssg2021-redistricting/blob/main/Georgia/GA_gerrychain.py
- https://github.com/gerrymandr/december-2018-workshop
To replicate the code that generates the ensemble and maps as seen in presentation slides:
- Download the PA.zip files from https://github.com/mggg-states/PA-shapefiles.
- Put the "Gerrychain Demo" notebook in the same folder as the data (do not forget to extract the files).
- Run the notebook. The chain can take over two hours to run. If you want to reduce this time, run it with fewer steps.