Python Toolbox for glycaemic signal processing
- Main Features
- Dependencies
- Installation from source
- Documentation
- Examples
- Collection of Python Signal Processing Library Repositories
- Public Datasets
- Importing and exporting CGM signals in formats: .csv, .xslx, .xls
- Glycaemic signal in units: mg/dL (default), mmol/L
- Calculation of metrics like Mean, MODD, TIR, MAGE, BGI, Q-Score, etc.
- Automatic summary of the metrics.
- Generate Plots for analysis and visualization of the entire data or separated by day, some examples are Box Plot, Frequency Histogram, Trace Plot, Ambulatory Glucose Profile (AGP), etc.
- Very easy to use all metrics are calculated calling a method of the class
Gframe
, and the plots are generated using that same class.
In the GlucoPy directory (same one where you found this file after cloning the repository), run:
pip install .
The official documentation is hosted on github.io/GlucoPy/
All the Metrics are implemented as methods in the glucopy.Gframe
class
import glucopy as gp
# Read the file
gf = gp.read_csv('path/to/file.csv')
# Read the file
gf = gp.read_xlsx('path/to/file.xlsx')
import pandas as pd
# Create a DataFrame
df = pd.read_csv('path/to/file.csv')
gf = gp.Gframe(df)
# Import the dataset
gf = gp.data("prueba_1")
Check the documentation of Gframe for a complete list of metrics
# Mean
mean = gf.mean()
# MODD
modd = gf.modd()
# TIR
tir = gf.tir()
# MAGE
mage = gf.mage()
# BGI
lbgi = gf.lbgi()
hbgi = gf.hbgi()
All the plots use a Gframe
object as first parameter. Check the documentation of glucopy.plot for a complete list of plots
gp.plot.agp(gf)
gp.plot.freq(gf)
gp.plot.mage(gf)
- PyRadiomics
- StatsModels
- BioSPPy - Biosignal Processing in Python
- Type-2-Diabetes-Prediction-Using-Short-PPG-Signals-and-Physiological-Characteristics
- splearn: Python Signal Processing
- spm1d: One-Dimensional Statistical Parametric Mapping in Python and MATLAB
- NeuroKit2: The Python Toolbox for Neurophysiological Signal Processing
- PyGSP: Graph Signal Processing in Python
- rGV — Analysis of Continuous Glucose Monitor Data
-
This is a collection of links to publicly available continuous glucose monitoring (CGM) data.
-
The OhioT1DM dataset is available to researchers interested in improving the health and wellbeing of people with type 1 diabetes. It contains 8 weeks worth of data for each of 12 people with type 1 diabetes. a Data Use Agreement (DUA) is required.
-
ShanghaiT1DM and ShanghaiT2DM are publicly available Datasets for research purposes, they contain Type 1 (n = 12) and Type 2 (n = 100) diabetic patients in Shanghai, China.
-
A reference resource for characterization of CGM data collected from more than 7,000 non-diabetic individuals, aged 40-70 years.