Diametrics
Diametrics is a Python package and associated WebApp designed for the analysis of Continuous Glucose Monitoring (CGM) data.
The goal of this package is to enable researchers to quickly calculate the metrics of diabetes control outlined in the international consensus on the use of continuous glucose monitors in Python.
Diametrics has functionality for data preprocessing, calculating standard metrics of glycemic control and data visualization, using Plotly.
Contents
The diametrics functions are contained within a metrics.py file. The functions are
all_metrics calculates all of the below metrics
average_glucose mean glucose data given
time_in_range % time spent in normal (3.9-10mmol/L), hyperglycaemia (>10) and hypoglycaemia (<3.9). Hyper- and hypo-glycaemia are also broken down to % time in level 1 and level 2
glycemic_variability standard deviation (SD), coefficient of variation (CV) and min and max glucose
ea1c estimated A1c
hypoglycemic_episodes the number of level 1 and level 2 hypoglycemic episodes, plus an optional breakdown of every episode with start and end times
percent_missing percentage of data missing between two timepoints
How to use?
The functions take Pandas dataframes as the arguments along with the column names for the glucose readings and time. The functions can be used on datasets with only one person's data or can be used on a combined dataframe with an ID column, whose name can be specified if present.
For some of the functions there is an option to switch the thresholds to exercise thresholds, rather than normal ones.
Release files for diametrics 0.4.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 | |
|---|---|---|---|
| diametrics-0.4.3.tar.gz | 31.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| diametrics-0.4.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 65.2 kB
Release files / diametrics-0.4.3.tar.gz
| Download URL | diametrics-0.4.3.tar.gz |
|---|---|
| Size | 31.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
87ec1afbc12f15b64447cdb4c75bd2e2e9646eb6aa8cc12fdd3d73d644e382b3
|
|
BLAKE2b-256 checksum How to use checksums |
bc0b0cfd5d575b4869edaee87296c0d1480aa3fa49aff814e2901dee6f2fc4ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.5 CPython/3.10.15 Linux/6.8.0-1017-azure
|
Release files / diametrics-0.4.3-py3-none-any.whl
| Download URL | diametrics-0.4.3-py3-none-any.whl |
|---|---|
| Size | 33.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c23d33f360bb5efe2cd389a0c8126f539be04bb6ea3c33c951d34ed7a570396b
|
|
BLAKE2b-256 checksum How to use checksums |
ed51cc45b1fae5ffd5180ba30e7e68ea1d4754cbc970d0b6de3724e5edc2e328
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.5 CPython/3.10.15 Linux/6.8.0-1017-azure
|