Skip to main content
Inequality Coefficients:
=====================================================================

This is small library with some implemented coefficients (or indices) intended
to measure inequality or concentration of the values in a population.

Implemented coefficients
------------
- Gini Coefficient
- Ratio top / rest

Installation
------------
This library is hosted on PyPI, so installation is straightforward. The easiest way to install type this at the command line (Linux, Mac, or Windows)::

pip install inequality_coefficients

This library also depends on numpy, but ``pip`` should take of that for you already.

Basic Usage
------------
For the simplest, typical use cases, this tells you everything you need to
know.::

import inequality_coefficients as ineq
data = array([1.7, 3.2 ...]) # data can be list of nums or numpy array
gini_coeff = ineq.gini_coeff(data)
ratio_top_rest = ineq.ratio_top10_rest(data)


Acknowledgements
-----------------
Many thanks to Felipe Ortega to open source his implementation of the Gini coefficient, available here: (https://github.com/ryanwitt/wikixray/blob/master/graphics.py).

My code is based on that implementation, although I have made some changes and added a correction for small datasets based on [Deltas, 2003](https://doi.org/10.1162/rest.2003.85.1.226).

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

inequality_coefficients-1.0.0.linux-x86_64.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

inequality_coefficients-1.0.0-py3.6.egg (3.9 kB view details)

Uploaded Egg

File details

Details for the file inequality_coefficients-1.0.0.linux-x86_64.tar.gz.

File metadata

  • Download URL: inequality_coefficients-1.0.0.linux-x86_64.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.5.2

File hashes

Hashes for inequality_coefficients-1.0.0.linux-x86_64.tar.gz
Algorithm Hash digest
SHA256 67cdebb38a0c249aa8f07529c3514ca81fb71fa8a02c3c982f3a59938b41fd80
MD5 7de5f685d316c0e001a136e721c902f5
BLAKE2b-256 262019a3d49f809a103f32131f1f1b3ebcf6d189c3059263bb4bc83e42ed5485

See more details on using hashes here.

File details

Details for the file inequality_coefficients-1.0.0-py3.6.egg.

File metadata

  • Download URL: inequality_coefficients-1.0.0-py3.6.egg
  • Upload date:
  • Size: 3.9 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.5.2

File hashes

Hashes for inequality_coefficients-1.0.0-py3.6.egg
Algorithm Hash digest
SHA256 d04d1e1886741f36fd8fc7596889325fb79e39ed82069f564968638e4d36fa79
MD5 a6dd6bdc76a2538152bfd364363cd7af
BLAKE2b-256 311ee1f25cb31f1445ed55d65ae8356afc0f53194af6c33a1a1cbd62981e5f04

See more details on using hashes here.

Release history Release notifications | RSS feed

1.2.3

1 file

1.2.2

1 file

1.2.1

1 file

1.2.0

1 file

1.1.1

1 file

1.1.0

2 files

1.0.1

1 file

This release

1.0.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page