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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: rdapy-1.1.2.tar.gz
  • Upload date:
  • Size: 47.8 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.2.tar.gz
Algorithm Hash digest
SHA256 f7e859b354c14fbb041d4f55ad1b3987a5a2131f155ccce9e20fdb1183fb39af
MD5 3ad7806e8fda8f3274495969d00cd8a1
BLAKE2b-256 5c9bdc376d6cacbe3511b05a93ee3153830a5d9b7fc7e571c4c28fdaed2398d6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rdapy-1.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dfe6238a5ceb1a251c612b171ba6684f0423da0a4ead7b6f5ee07a3657598fc5
MD5 a0ad34ccefdab9293c37d5d14a924923
BLAKE2b-256 3795db0d0d5f6350d85896196e47805ed00ac572ed85cbd2a3d32352686a6549

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