GerryTools¶
GerryTools
Prepare redistricting data, analyze districting plans, and produce publication-ready figures.
GerryTools is a companion to GerryChain. It collects the data, geometry, plotting, LaTeX, and ensemble-runner tools used in practical redistricting workflows. The guides are organized by public module.
Install¶
Most users can install GerryTools from PyPI:
pip install gerrytools
The Docker-backed ensemble runners are an optional extra:
pip install "gerrytools[mgrp]"
See Installation and environments for uv, virtual-environment, Jupyter, and Docker instructions.
Start here¶
Set up Python, Jupyter, and the optional Docker-backed runners.
See how the public modules relate and open the guide for the interface you need.
Look up signatures, parameters, and public objects by module.
Guides by module¶
Retrieve PL 94-171, ACS, and CVAP tables plus processed 2020 geographic products.
Move between tabular, geographic, graph, and district-plan representations.
Build ensemble distributions, seats-votes figures, maps, and composable Matplotlib layouts.
Use named colors, district palettes, colormaps, and palette previews.
Run ReCom, Forest, and SMC samplers through the Docker-backed MGRP runners.
Record GerryChain runs as compact, self-describing BENDL ensemble files.
Score a few GerryChain plans in memory or stream a complete BENDL ensemble.
Produce report tables and TeX-native figures with rendered examples.