Inequalipy
Github Link
Python Pip Link
GitHub Link for R version
Inequalipy contains functions for the calculating the inequality of a distribution:
- Kolm-Pollak Equally-Distributed Equivalent (EDE) and Index
- Atkinson EDE and Index
- Gini Index
The Atkinson and Gini approaches are traditionally used for evaluating the inequality of income distribution. The Kolm-Pollak has recently been modified so that it is suitable for quantities that are undesirable, e.g., exposure to health risks or environmental burdens. This means it is suitable for use in urban planning contexts.
The Kolm-Pollak functions are also separable, meaning they can be used to evaluate
subgroups and thus evaluate the inequity of the distribution.
When using this code, please cite the following two papers:
- Sheriff, G., & Maguire, K. B. (2020). Health Risk, Inequality Indexes, and Environmental Justice. Risk Analysis: An Official Publication of the Society for Risk Analysis. https://doi.org/10.1111/risa.13562
- Logan, T. M., Anderson, M. J., Williams, T. G., & Conrow, L. (2021). Measuring inequalities in urban systems: An approach for evaluating the distribution of amenities and burdens. Computers, Environment and Urban Systems, 86, 101590. https://doi.org/10.1016/j.compenvurbsys.2020.101590
This library contains the following functions:
kolmpollak.ede(a, epsilon, kappa, weights)for calculating the Kolm-Pollak equally-distributed equivalent (EDE)kolmpollak.index(a, epsilon, kappa, weights)for calculating the Kolm-Pollak inequality indexatkinson.ede(a, epsilon, weights)for calculating the Atkinson equally-distributed equivalentatkinson.index(a, epsilon, weights)for calculating the Atkinson inequality indexgini(a, weights)for calculating the Gini index
Usage
Installation
pip install inequalipy
Usage
Import the package and call the required function:
import inequalipy as ineq
ineq.kolmpollak.ede(a, epsilon, weights)
ineq.gini(a)
Alternatively, you may import all of the packages:
from inequalipy import *
gini(a)
atkinson.index(a)
Examples
Check out example.ipynb for examples or https://github.com/MitchellAnderson112/access_inequality_index for the function applied in a non-trivial context.
Metadata
Release files for inequalipy 1.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| inequalipy-1.0.5.tar.gz | 14.7 kB | Without provenance | Details for inequalipy-1.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| inequalipy-1.0.5-py3-none-any.whl | Python 3 | none | any | Details for inequalipy-1.0.5-py3-none-any.whl |
Total release size: 37.4 kB
Release files / inequalipy-1.0.5.tar.gz
| Download URL | inequalipy-1.0.5.tar.gz |
|---|---|
| Size | 14.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
57e6631db53fbdbc83202261dec0aa19e1bcd2280df5f11eeb8579e6dc088270
|
|
BLAKE2b-256 checksum How to use checksums |
05340e3ee1acbfe9c20fb082087b0a1c9c8d3ed58c17c309072699fe3f8599c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.7.0
|
Release files / inequalipy-1.0.5-py3-none-any.whl
| Download URL | inequalipy-1.0.5-py3-none-any.whl |
|---|---|
| Size | 22.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9b24e096e6cd33c5286654c2e534f0d87d39eb205f9582c529d7efb030d16ad8
|
|
BLAKE2b-256 checksum How to use checksums |
55a73b0c22615d3d9aa43dd630ee8e31b2bb75001fac16ad2d6316a095aaf7ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.7.0
|
Security for inequalipy 1.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.