BinomialBias
This library computes and plots quantitative assessments of discrimination within organizations, based on the binomial distribution.
This code supports the following paper:
Quantitative measures of discrimination with application to appointment processes. Robinson PA, Kerr CC (2024). PLoS ONE 19(3): e0299870. https://doi.org/10.1371/journal.pone.0299870
There are several ways to use this library, described below.
Webapp
A live webapp is running at https://binomialbias.sciris.org.
Local installation and usage
Python
To use locally with Python, run
pip install binomialbias
This can then be run via e.g.:
import binomialbias as bb
bb.plot_bias(n=20, n_e=10, n_a=7)
This example shows the statistics for the case where there were n = 20 appointments (e.g., the size of a committee), out of which n_e = 10 people were expected to belong to a given group (e.g., female), and for which n_a = 7 actually were.
Shiny
To run the Shiny app locally, clone the repository from GitHub, then install with
pip install -e .[app]
The Shiny app can then be run locally via the run script.
Structure
- All code for the Python package is in the
binomialbiasfolder. - The script for generating the figure in the paper is in the
scriptsfolder. - Continuous integration tests are in the
testsfolder. - Older Jupyter and Matplotlib versions are available in the
archivefolder.
Metadata
Release files for binomialbias 1.3.3
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 |
|---|---|---|---|---|
| binomialbias-1.3.3.tar.gz | 20.3 kB | Without provenance | Details for binomialbias-1.3.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| binomialbias-1.3.3-py3-none-any.whl | Python 3 | none | any | Details for binomialbias-1.3.3-py3-none-any.whl |
Total release size: 39.4 kB
Release files / binomialbias-1.3.3.tar.gz
| Download URL | binomialbias-1.3.3.tar.gz |
|---|---|
| Size | 20.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
184a8c3bd370d22064c551db29fed3ec55ebfbc0502923d90c3b814d24b31cde
|
|
BLAKE2b-256 checksum How to use checksums |
773dad5c2cdc2a90ab7062d37727521565feca3637e0bfea2896835564246f8f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Release files / binomialbias-1.3.3-py3-none-any.whl
| Download URL | binomialbias-1.3.3-py3-none-any.whl |
|---|---|
| Size | 19.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aba44d2f78f10be86235b5556e42122e663839d65e025e6c4ab579eb2882c449
|
|
BLAKE2b-256 checksum How to use checksums |
6edb66933c3da04ba0c06cf60115618a6132851d08b97ab62b7ab0af24fcc9c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Security for binomialbias 1.3.3
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.