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.20.tar.gz (62.1 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.20-py3.8.egg (132.5 kB view details)

Uploaded Egg

gerrychain-0.2.20-py2.py3-none-any.whl (56.1 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: gerrychain-0.2.20.tar.gz
  • Upload date:
  • Size: 62.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.13

File hashes

Hashes for gerrychain-0.2.20.tar.gz
Algorithm Hash digest
SHA256 f7d194b0a097fb72b60bffabd8c4bdc9fbb192be23a99f72686a5f2d65f91613
MD5 e3878708517d598cab4f1116b443aad0
BLAKE2b-256 cc1e70cb1f878d45544682adf753d5683fd887c7f9a5109584ade8e2e1f59e77

See more details on using hashes here.

File details

Details for the file gerrychain-0.2.20-py3.8.egg.

File metadata

  • Download URL: gerrychain-0.2.20-py3.8.egg
  • Upload date:
  • Size: 132.5 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.13

File hashes

Hashes for gerrychain-0.2.20-py3.8.egg
Algorithm Hash digest
SHA256 8ed5c0c5fa55dfd260c463c1a0145e2ee0d14d808f64203f779d22bd70c70f57
MD5 4544b4744fe0e3432204962e59559153
BLAKE2b-256 0dc4f04a1d6f22a639c366674e63c241a799955d7dac2d88c08bc8f573caaaeb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gerrychain-0.2.20-py2.py3-none-any.whl
  • Upload date:
  • Size: 56.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.13

File hashes

Hashes for gerrychain-0.2.20-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f2ce0ef33b57cd7d0b9e11998357b03896371ce7194b8e27eecb43f29f6d6fad
MD5 4269619f42e920af8c9f11c5b9fa5a33
BLAKE2b-256 adcbea22dd7fa47f0ad7e9b72122230fd724b40d3d3311f4ffe935663a577002

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