Skip to main content

Use Markov chain Monte Carlo to analyze districting plans and gerrymanders

Project description

Build Status Code Coverage Documentation Status

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.

Installation

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

GerryChain-0.2.0.tar.gz (46.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

gerrychain-0.2.0-py2.py3-none-any.whl (51.3 kB view details)

Uploaded Python 2Python 3

GerryChain-0.2.0-py2.py3-none-any.whl (51.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file GerryChain-0.2.0.tar.gz.

File metadata

  • Download URL: GerryChain-0.2.0.tar.gz
  • Upload date:
  • Size: 46.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.6.6

File hashes

Hashes for GerryChain-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ce28099d4957e0af86e2a52d18a40e3d0f0246e8b0a38e145a856e3f445e8233
MD5 fa436550e880a2de5f7fd8d44b180c75
BLAKE2b-256 a4785c4b2fe7c66f637cf71fb9021740c07fe6edf0072474ccc6159e7cbb46a3

See more details on using hashes here.

File details

Details for the file gerrychain-0.2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: gerrychain-0.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 51.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.6.6

File hashes

Hashes for gerrychain-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8775cca64506cdee6fcc17aa8e7af16f8108330fd37cae6f4674774e834c9568
MD5 102d80a05c1d70dde574036a19d176e6
BLAKE2b-256 bfb2c5d9c247c9e667f489f20654d13e30b53e722910a172e2ae2738069de4ad

See more details on using hashes here.

File details

Details for the file GerryChain-0.2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: GerryChain-0.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 51.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.6.6

File hashes

Hashes for GerryChain-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 355e4788aa504361456cf899e60f62857c18dc9aec9386e09f10104cedb9f189
MD5 5f4a16f55963dcd60a26eb8847b646c9
BLAKE2b-256 21ea67969d4105d4600d09be67c86170a917015f927a10f8db11090209781d40

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page