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.11.tar.gz (53.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.11-py2.py3-none-any.whl (47.9 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: gerrychain-0.2.11.tar.gz
  • Upload date:
  • Size: 53.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for gerrychain-0.2.11.tar.gz
Algorithm Hash digest
SHA256 dd6bfc06c6abdbe00a6b7c16f7b3f46145329d2f861a75f7e17db178c0e4a17a
MD5 824ca24dc50c2dd5fb60b97236122e1a
BLAKE2b-256 97183cf2e4c3a2fc4be68e06928a37cd22ebaeb96e257ea5f20a37f07fe5ba03

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gerrychain-0.2.11-py2.py3-none-any.whl
  • Upload date:
  • Size: 47.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for gerrychain-0.2.11-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 78edb9509b96045e22ac95e7edaf0ddea6c14a4d4fec1af21e6a7810a839cd78
MD5 b0e5febbabccc6eba9d8decc39d52d28
BLAKE2b-256 dc72700c0c6d3b19020500740c662fab4d43d4873fd93b073107e39c7af1b8ab

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