Skip to main content

A package for calculating the metrics of glycemic control for Diabetes from CGM data

Project description

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.

Project details


Download files

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

Source Distribution

diametrics-0.4.2.tar.gz (31.3 kB view details)

Uploaded Source

Built Distribution

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

diametrics-0.4.2-py3-none-any.whl (33.9 kB view details)

Uploaded Python 3

File details

Details for the file diametrics-0.4.2.tar.gz.

File metadata

  • Download URL: diametrics-0.4.2.tar.gz
  • Upload date:
  • Size: 31.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.10.15 Linux/6.5.0-1025-azure

File hashes

Hashes for diametrics-0.4.2.tar.gz
Algorithm Hash digest
SHA256 fba199fea18d533ccac098dda6fe62fe1f589a765c6d2563cbeaa03cb5b9c875
MD5 a092f6dcc4d48ae2e4c566e376a25806
BLAKE2b-256 8256dfe0fff35cd000ddbad685dadc9f67780b6f978bf9364757c911e3c9158c

See more details on using hashes here.

File details

Details for the file diametrics-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: diametrics-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 33.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.10.15 Linux/6.5.0-1025-azure

File hashes

Hashes for diametrics-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c0969bb58dbbf593fb31d4fc5809a16487383d6d9c3679a33660816c83c56ee1
MD5 4a10acc5f8190d616b874e2ac896c53f
BLAKE2b-256 bf61c579777e38e6cefc64f8188f516080081bccc1f6a30dd03229e1cb51429d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page