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
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.3.tar.gz
(38.5 kB
view details)
Built Distribution
rdapy-1.0.3-py3-none-any.whl
(28.8 kB
view details)
File details
Details for the file rdapy-1.0.3.tar.gz
.
File metadata
- Download URL: rdapy-1.0.3.tar.gz
- Upload date:
- Size: 38.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3725b8fe23ca35af0f601b9633b12cc2c4b58758a0262461a7930c528bf787c7 |
|
MD5 | ee9b649409737e9e89fbea4bffa3a324 |
|
BLAKE2b-256 | 99a2ac13e312c26db8ad25fa93da1ac1be73aa465588effee053012a7a902dd8 |
File details
Details for the file rdapy-1.0.3-py3-none-any.whl
.
File metadata
- Download URL: rdapy-1.0.3-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 | 1bfea2eee1e14a2d5fa6f2c6a0f4e3893dc165573a7b351c12a3b5abcfe3a061 |
|
MD5 | b1aab859a7e33c873e04aa89f6ba04f4 |
|
BLAKE2b-256 | 81f133dfd2f2a99407095c65fb312bf5e2f2f709000aaacfbaf9b0d428e541bc |