Skip to main content

Use Markov chain Monte Carlo to analyze districting plans and gerrymanders

Project description

Build Status Code Coverage Documentation Status PyPI Package conda-forge Package

GerryChain is a Python library for building ensembles of districting plans using Markov chain Monte Carlo. It is developed and maintained by the Metric Geometry and Gerrymandering Group and our network of volunteers. It is distributed under the 3-Clause BSD License.

The basic workflow is to start with the geometry of an initial plan 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 among the sampled plans.

Getting started

See our Getting started guide for the basics of using GerryChain.

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

Installation

Using pip

To install GerryChain from PyPI, run pip install gerrychain from the command line.

This approach often fails due to compatibility issues between our different Python GIS dependencies, like geopandas, pyproj, fiona, and shapely. For this reason, we recommend installing from conda-forge for most users.

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.17.tar.gz (60.8 kB view details)

Uploaded Source

Built Distribution

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

gerrychain-0.2.17-py2.py3-none-any.whl (54.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file gerrychain-0.2.17.tar.gz.

File metadata

  • Download URL: gerrychain-0.2.17.tar.gz
  • Upload date:
  • Size: 60.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.6.9

File hashes

Hashes for gerrychain-0.2.17.tar.gz
Algorithm Hash digest
SHA256 4af309b21aa047a584caf21e8151d4024d91e6a8584efae160d1110fe86dfc7d
MD5 65f5bd64e33a0e6ba4dbd08c8ef4f5b0
BLAKE2b-256 dcf3811be272ae2bc44267089889c887568a1f91f079fac989dd9b0df436e52e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gerrychain-0.2.17-py2.py3-none-any.whl
  • Upload date:
  • Size: 54.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.6.9

File hashes

Hashes for gerrychain-0.2.17-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d41a7b5c0f9a0930a46dceaf2de97d4d1e7e37b0b9ba1dcfa764e13a247e3313
MD5 6a9eed971f3c3bdbfb9fa266dce38709
BLAKE2b-256 ab11e30deec49c3725151b59b7399ec1cb04c6b976b4c8cbe0ff52448f3ff26e

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