Redistricting analytics data
Project description
rdadata
Redistricting analytics data
Installation
$ git clone https://github.com/alecramsay/rdadata
$ cd rdadata
$ pip install -r requirements.txt
Also, make sure the rdadata
directory is on your PYTHONPATH
.
Data
The data are stored in the data
directory by state.
These pages describe each dataset:
- Data: Census and election data by precinct.
- Shapes: Shape properties by precinct.
- Graph: Precinct adjacency graph.
Some application helpers are described here:
- Scripts: Scripts to re-format the data for specific applications.
- Functions: Functions to re-format the data for specific applications.
Sources
The data comes from the following sources:
- The total census population & VAP demographics data comes from the 2020_census_XX-N.csv in the DRA vtd_data GitHub repository, where XX is the state abbreviation and N is the suffix. We take the latest version of the data, which is the one with the highest N.
- The election data comes from the 2020_election_XX-N.csv in the same repo.
- The shapes are copies of tl_2020_FF_vtd20.zip from the Census Bureau, where FF is the state FIPS code, e.g., 37 for North Carolina.
Some things to be aware of:
- If it exists, we use the adjusted population data instead of the official 2020 census total population data.
- For Florida, the official VTDs from the Census Bureau are bad. We used DRA's corrected precinct shapes (GeoJSON), removed the intersections, and then converted it to a shapefile.
- We simplify the precinct shapes (see
extract_shape_data.py
) to approximate the simplification that DRA does, so compactness measurements align.
Testing
$ pytest
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
rdadata-1.0.0.tar.gz
(12.5 kB
view details)
Built Distribution
rdadata-1.0.0-py3-none-any.whl
(12.9 kB
view details)
File details
Details for the file rdadata-1.0.0.tar.gz
.
File metadata
- Download URL: rdadata-1.0.0.tar.gz
- Upload date:
- Size: 12.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 | 74566362aaedc56d6a9325f6a708ac5c8dfae90851511c8eeda1164e961a9baa |
|
MD5 | 8f0d5446f02225252b1e218f1b249650 |
|
BLAKE2b-256 | 729fa5648723b019b65552e949072aab771e24fa2dadf017d5a1b41451633008 |
File details
Details for the file rdadata-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: rdadata-1.0.0-py3-none-any.whl
- Upload date:
- Size: 12.9 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 | f387d47fdb6d4a2c3a92ac443964b537a9dfeb0110af1affaac99355a1550445 |
|
MD5 | 5c8aad657a250a5bc5ca32d89a330192 |
|
BLAKE2b-256 | ce6d4bd7b633ad6efa6e7c4498f24a361f13326a8526d5dd23f90144102906dc |