Use Markov chain Monte Carlo to analyze districting plans and gerrymanders
Project description
GerryChain is a Python library for building ensembles of districting plans using Markov chain Monte Carlo.
The basic workflow is to start with the geometry of an initial plan, perhaps one that is currently enacted in your state or municipality, and generate a large collection of sample plans for comparison. Usually, we will constrain these sampled plans in such a way that they perform at least as well as the initial plan according to traditional districting principles, such as population balance or compactness. Comparing the initial plan to the ensemble provides quantitative tools for measuring whether or not it is an outlier similar plans.
The development of this package began at the Voting Rights Data Institute as a Python rewrite of the chain C++ program, originally by Maria Chikina, Alan Frieze and Wesley Pegden for their paper “Assessing significance in a Markov chain without mixing.”
Getting started
See our Getting started guide for the basics of using GerryChain.
Useful links
Installation
To install GerryChain from PyPI, just run pip install gerrychain.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for gerrychain-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8775cca64506cdee6fcc17aa8e7af16f8108330fd37cae6f4674774e834c9568 |
|
MD5 | 102d80a05c1d70dde574036a19d176e6 |
|
BLAKE2b-256 | bfb2c5d9c247c9e667f489f20654d13e30b53e722910a172e2ae2738069de4ad |
Hashes for GerryChain-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 355e4788aa504361456cf899e60f62857c18dc9aec9386e09f10104cedb9f189 |
|
MD5 | 5f4a16f55963dcd60a26eb8847b646c9 |
|
BLAKE2b-256 | 21ea67969d4105d4600d09be67c86170a917015f927a10f8db11090209781d40 |