GerryChain is a library for using Markov Chain Monte Carlo methods to study the problem of political redistricting. Development of the library began during the Voting Rights Data Institute (VRDI). The project is in active development in the MGGG/GerryChain GitHub repository, where bug reports and feature requests, as well as contributions, are welcome.


To install GerryChain from PyPI, just run pip install gerrychain.

User Guide

These guides show you how to get started using GerryChain:

We also strongly recommend the resources prepared by Daryl R. DeFord of MGGG for the 2019 MIT IAP course Computational Approaches for Political Redistricting.

API Reference

This document provides detailed documentation for classes and functions in GerryChain.