Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2021 Aug 18:2:263-266.
doi: 10.1109/OJEMB.2021.3105816. eCollection 2021.

Cgmquantify: Python and R Software Packages for Comprehensive Analysis of Interstitial Glucose and Glycemic Variability from Continuous Glucose Monitor Data

Affiliations

Cgmquantify: Python and R Software Packages for Comprehensive Analysis of Interstitial Glucose and Glycemic Variability from Continuous Glucose Monitor Data

Brinnae Bent et al. IEEE Open J Eng Med Biol. .

Abstract

Goal: Continuous glucose monitoring (CGM) is commonly used in Type 1 diabetes management by clinicians and patients and in diabetes research to understand how factors of longitudinal glucose and glucose variability relate to disease onset and severity and the efficacy of interventions. CGM data presents unique bioinformatic challenges because the data is longitudinal, temporal, and there are infinite ways to summarize and use this data. There are over 25 metrics of glucose variability used clinically and in research, metrics are not standardized, and little validation exists across studies. The primary goal of this work is to present a software resource for systematic, reproducible, and comprehensive analysis of interstitial glucose and glycemic variability from continuous glucose monitor data. Methods: Comprehensive literature review informed the clinically-validated functions developed in this work. Software packages were developed and open-sourced through the Python Package Index (PyPi) and the Comprehensive R Archive Network (CRAN). cgmquantify is integrated into the Digital Biomarker Discovery Pipeline and MD2K Cerebral Cortex. Results: Here we present an open-source software toolbox called cgmquantify, which contains 25 functions calculating 28 clinically validated metrics of glucose and glycemic variability, as well as tools for visualizing longitudinal CGM data. Detailed documentation facilitates modification of existing code by the community for customization of input data and visualizations. Conclusions: We have built systematic functions and documentation of metrics and visualizations into a software resource available in both the Python and R languages. This resource will enable digital biomarker development using continuous glucose monitors.

Keywords: Continuous glucose monitor; diabetes; digital biomarkers; glycemic variability; open-source software.

PubMed Disclaimer

Figures

FIGURE 1.
FIGURE 1.
Visualizing longitudinal CGM data with the cgmquantify Python package. Shown are a visualization with indicators of the mean interstitial glucose level (red) and 1 SD from the mean (pink) (a), a visualization with indicators of hyperglycemic (>180 mg/dL glucose, red) and hypoglycemic (<70 mg/dL glucose, yellow) (b), and a plot with LOWESS smoothing of the glucose data (c).
FIGURE 2.
FIGURE 2.
Example plot from the plot_glucose() function from the cgmquantify R package to visualize longitudinal CGM data. Shown is a visualization available in the cgmquantify R package that enables visualization of CGM data by time of day for each day specified.

References

    1. Wolinsky H., “Continuous glucose monitors: The long and winding road to acceptance, coverage managed care magazine,” Managed Care, 2018. Accessed: Feb. 15, 2020. [Online]. Available: https://www.managedcaremag.com/archives/2018/7/continuous-glucose-monito... - PubMed
    1. Tamborlane W. V. et al., “Continuous glucose monitoring and intensive treatment of type 1 diabetes,” N. Engl. J. Med., vol. 359, no. 14, pp. 1464–1476, Oct. 2008. - PubMed
    1. OpenAPS.org – #WeAreNotWaiting to reduce the burden of type 1 diabetes.” Accessed: Feb. 15, 2020. [Online]. Available: https://openaps.org/
    1. Goldsack J. C. et al., “Verification, analytical validation, and clinical validation (V3): The foundation of determining Fit-for-purpose for Biometric Monitoring Technologies (BioMeTs),” npj Digit. Med. , vol. 3, pp. 55, 2020. - PMC - PubMed
    1. Umpierrez G. E. and Kovatchev B. P., “Glycemic variability: How to measure and its clinical implication for type 2 diabetes,” Amer. J. Med. Sci., vol. 356, no. 6, pp. 518–527, Dec. 2018. - PMC - PubMed