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
- 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 use these functions.
Installation
pip install rdapy
Usage
import rdapy
Email questions to feedback.
Project details
Release history Release notifications | RSS feed
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.0.4.tar.gz
(38.9 kB
view details)
Built Distribution
rdapy-1.0.4-py3-none-any.whl
(28.8 kB
view details)
File details
Details for the file rdapy-1.0.4.tar.gz
.
File metadata
- Download URL: rdapy-1.0.4.tar.gz
- Upload date:
- Size: 38.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc0d52afbb515412b41a7a7eacffcbc7992286370921960c50616e78616b5d1f |
|
MD5 | dc3236e8d2856671a7d4d01753582e5f |
|
BLAKE2b-256 | a2e8a9b3e85efbc6d94e3ad73ab93783d35b6cfad7e452485cc6f69ab06d1c41 |
File details
Details for the file rdapy-1.0.4-py3-none-any.whl
.
File metadata
- Download URL: rdapy-1.0.4-py3-none-any.whl
- Upload date:
- Size: 28.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 124a6aa3a617919ffdd6db018e4b5abc1ec0b616afff6600a288b140019f4c8c |
|
MD5 | 7d1c23eea9901b0786e2337b41d0e55d |
|
BLAKE2b-256 | 6193c12a66eaefeb58c48d14a6da8dd1fb30111e1c1b439008fc9bb357ea6ec7 |