py_inclusion
This package provides an easy way to generate the inclusion flowchart generation for participant inclusion for medical and epidemiology analyses. It will reduce the possibility of erroneous reporting in epi research as often the inclusion conditions may vary as the research progresses. Manual flowchart generation is neither efficient or reliable.
How to install
pip install py_inclusion
How to use
sample_flowchart.ipynb has a nice example and the specific format required. We expect the input to be a Pandas dataframe of with at least a subject id column called PID. All the other columns should contain bolean variables, whehter a particular subject has met the condition based on that criteria
sample_df.head()
pid calibration summary duration
248 True True True
884 True True False
793 True True True
699 False True True
319 True True True
To generate the flowchart
from pyinclusion.core import gen_graph
my_order = ['calibration', 'duration', 'summary'] # optional. The default ordering will be used if not specified
gen_flowchart(sample_df, condition_order=my_order)
It will generate a script like this:
st79=>start: This is not working Ok
cond81=>condition: Fulfilled condtions
n=72
cond83=>condition: Fulfilled condtions
n=72
cond85=>condition: Fulfilled condtions
n=72
e80=>end: Included subjects
op86=>operation: Excluded due to duration
n= 0
op84=>operation: Excluded due to summary
n= 0
op82=>operation: Excluded due to calibration
n= 0
st79->cond81
cond81->
cond81->
cond81(yes)->cond83
cond83->
cond83->
cond83(yes)->cond85
cond85->
cond85->
cond85(yes)->e80
cond85(no)->op86
cond83(no)->op84
cond81(no)->op82
The generated graph is based on flowchart.js, which can be used to render images in the web.
You can then copy and paste the generated script into flowchart.js to generate SVG for your
work. To download svg, you can use SVG Export
on from to easily to that.
A sample figure will look like:
Metadata
Release files for pyinclusion 0.0.4
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 |
|---|---|---|---|---|
| pyinclusion-0.0.4.tar.gz | 7.5 kB | Without provenance | Details for pyinclusion-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyinclusion-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for pyinclusion-0.0.4-py3-none-any.whl |
Total release size: 12.5 kB
Release files / pyinclusion-0.0.4.tar.gz
| Download URL | pyinclusion-0.0.4.tar.gz |
|---|---|
| Size | 7.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6b8e0fdcc5bd793fbd64a5e452106af345862510d1c1feb74cd4060f2629911c
|
|
BLAKE2b-256 checksum How to use checksums |
7d040ab439b42a48bc4c1138b736104f5252af0732a3d761fda3e900f6be6a66
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
|
Release files / pyinclusion-0.0.4-py3-none-any.whl
| Download URL | pyinclusion-0.0.4-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3a8ee046063d620891ffaca608b34ef13417549d7ed4505164da3ffe0e498e54
|
|
BLAKE2b-256 checksum How to use checksums |
26b7e1d89f721b3b1caf0b5a34ccb8554f1de7f42adecf62cf1c05b9e726a2c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
|
Security for pyinclusion 0.0.4
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.