Set of tools to measure and test for violations of the 1982 Voting Rights Amendment
Project description
Machine Learning Voting Right Act Tests
Centernoid X-Symetry
Uses weighted centernoid and K-Mean Clustering to determin the compactness of a district by mesuring the distance from Geographic Center and Boundry
weighted_centroind(df, District_ID, GEOID='GEOID20', Population='POP100', Lat='INTPTLAT20', Lon='INTPTLON20', dist_geo='geometry')
kmean_xSymetry(df, district_id, pop, lat, lon, geoid, district_geometry)
Ecological Inference
Uses Elecologic Ingernce Model from King 1999 using a default covariate as target vote share and lmbda as 0.5 to match what was writen in King's Paper
ecological_inference(Total_Population_Col, Target_Population_Col,
Target_Vote_Share_Percentage, covariate=None, lmbda=0.5)
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
MLVRAtests-0.1.0.tar.gz
(5.3 kB
view details)
Built Distribution
File details
Details for the file MLVRAtests-0.1.0.tar.gz
.
File metadata
- Download URL: MLVRAtests-0.1.0.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/3.10.0 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cf18ce08c09c8c8cc106cf814f84115ae038105d0f89cbbb00e0f698effc056 |
|
MD5 | 45d441359f120f16c30cbfc5c0286fc6 |
|
BLAKE2b-256 | 8d0e26a620290d4e611cbb09c7995dcedfc9d01c4c22fd4bdb5c904f4da286f5 |
File details
Details for the file MLVRAtests-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: MLVRAtests-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/3.10.0 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59de49aaf87a15c12b53d11c8816a326d987767cea0ef90e364659cfc432d561 |
|
MD5 | c5457e64161dff7a8961c4fd6df12b0b |
|
BLAKE2b-256 | 44b14de20610da732e3180c3dbc63063a60e87bef7ad3e9d499d6655628acad1 |