For the visualization, see https://github.com/Anti-Gerrymandering/visualization. This repo contains various data scraping and processing scripts to generate data for that application.
- The "electiondata" folder contains a script to download data from electionreturns.pa.gov and format it as required by the visualization app.
- The "compactness" folder contains a script for calculating the compactness of districts in a GEOJSON file.