VRA Results Tests
Voter Power Indexes
Vote Power Index provides tools to run both Banzhaf Power Index and Shapley–Shubik Index to analyse 2 party poltical geographies like US Congresstional Districts to see if the reapproation process maintained Mintorities communties to elect their candidate of choice
Usage
power_index(df, OtherPopCol, TargetPopCol, Party1, Party2, vIndex=None, filename=None)
Parameters
df - Pandas Dataframe
OtherPopCol - Majority community
TargetPopCol - Minority community
OtherParty - None colitlition party of choice
ColilitionParty - Colitlition party of choice
vIndex (ssi/bpi/none):
- None both indexes
- ssi Shapley–Shubik Index
- bpi Banzhaf Power Inde
filename - optional
Racial Block Voting Tools
Homogeneous Precinct Analysis
Homogeneous_Precinct(df, MajorityPopCol, MinorityPopCol, TotalPopCol, MajorityParty, MinorityParty)
Ecological Regression Analysis
Ecological_Regression(df, TotalPopCol, MinorityPopCol, MajorityParty, MinorityParty)
df - pandas Dataframe
MajorityPopCol - Column name for column that has Majority population
MinorityPopCol - Column name for column that has Minority population
TotalPopCol - Column name for column that has Total population
MajorityParty - Column name for column that has Majority Vote
MinorityParty - Column name for column that has Minority Vote
Metadata
Release files for VRAresultsTest 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| VRAresultsTest-0.1.0.tar.gz | 5.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| VRAresultsTest-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.6 kB
Release files / VRAresultsTest-0.1.0.tar.gz
| Download URL | VRAresultsTest-0.1.0.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
61b8d141899d2c388ae8e7e01f1492c2dd820c6ff9d20ee769e65644ab876430
|
|
BLAKE2b-256 checksum How to use checksums |
f31c819f2b22c3f257d91a75124b5e9ab2d51b1e6204082a60346b441b4dca23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / VRAresultsTest-0.1.0-py3-none-any.whl
| Download URL | VRAresultsTest-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
263916e8c038a89d11d882849a19f88c788ab6757da4a790cdfa24e4118c4955
|
|
BLAKE2b-256 checksum How to use checksums |
8e741c38139039010c06ec6845eb9332d5af1e8afd266d1a9b7d24241838162b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|