Skip to main content

Redistricting analytics in Python

Project description

rdapy

Redistricting analytics in Python

This repository (rdapy) re-implements the main analytics used in Dave's Redistricting, ignoring a few DRA-specific aspects (in particular, the five [0-100] ratings). Unlike the analytics used in the app (dra-analytics) which are implememented in TypeScript, these are implemented in Python.

Categories

The analytics are organized by area:

  • Compactness: Various measures of compactness
  • Equal: Population deviation
  • Graph: Checks for contiguity & embeddedness
  • Minority: Minority opportunity metrics
  • Partisan: Various measures of partisan bias & responsiveness, as well as support for rank-vote graphs and seats-votes curves
  • Splitting: County- & district-splitting and COI splitting

The samples directory contains some simple examples of how to exercies these functions and how to preprocess raw block-level data into the formats required by the analytics.

Installation

pip install rdapy

Usage

import rdapy

Email questions to feedback.

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

rdapy-1.1.3.tar.gz (47.9 kB view details)

Uploaded Source

Built Distribution

rdapy-1.1.3-py3-none-any.whl (34.3 kB view details)

Uploaded Python 3

File details

Details for the file rdapy-1.1.3.tar.gz.

File metadata

  • Download URL: rdapy-1.1.3.tar.gz
  • Upload date:
  • Size: 47.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for rdapy-1.1.3.tar.gz
Algorithm Hash digest
SHA256 fb95f6517f4b4f5dbeb1f8cd7b889dee8faa3cc577d2a6ad276a48aacda7c513
MD5 0a6812145fe9ab3e8c1e9842ebc92016
BLAKE2b-256 098e2717c2233211fe7113e798c71490a178a6b96a979d13a3204ab4cf914bd6

See more details on using hashes here.

File details

Details for the file rdapy-1.1.3-py3-none-any.whl.

File metadata

  • Download URL: rdapy-1.1.3-py3-none-any.whl
  • Upload date:
  • Size: 34.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for rdapy-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 157d7156dce264c8e31793cbaa6363d7e37186eef6c382a33372bfb56013bed8
MD5 a23003a8f251948f2335ba9f95ab78ad
BLAKE2b-256 413e2b3031a2360a4f8db6d032f61de40da2db410ed5606b96399e1db2556a75

See more details on using hashes here.

Supported by

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