Read and standardize data from automated insulin delivery systems
Overview • Formats • Installation • Quick start • Documentation • Citation • Contributing • License • Contact
aidR is an open-source R package for reading and standardizing data exported from automated insulin delivery (AID) systems.
AID platforms differ in their file formats, variable names, units, timestamp conventions, and representation of clinically relevant events. aidR maps these heterogeneous exports to a common, analysis-ready format, allowing downstream analyses to be written once and applied consistently across AID systems.
aidR provides a common workflow for AID data:
iglu and cgmquantify
aidR currently supports seven export formats:
| Platform | Export format | Example AID systems |
|---|---|---|
| Glooko | Folder with one CSV per data type | CamAPS FX, Omnipod |
| CareLink (Medtronic) | Single .xlsx or .csv export | MiniMed 780G |
| mylife Cloud (Ypsomed) | Single semicolon-delimited CSV | CamAPS FX |
| Tidepool | Multi-sheet .xlsx workbook | Tandem Control-IQ, Loop, AAPS |
| YourLoops (Diabeloop) | Folder with one CSV per data type | DBLG1, DBLG2 |
| Tandem Source | Folder with one CSV per data type | Tandem Control-IQ |
| Dexcom Clarity | Single delimited CSV (CGM only) | Any AID system using a Dexcom sensor |
Install aidR directly from CRAN:
install.packages("aidR")
or get the latest version from github:
pak::pak("madleina/aidR")
Then load the package:
library(aidR)
The main entry point is parse_data(), which reads a subject's AID export and standardizes the major data types into a common format.
library(aidR)
data <- parse_data(
id = "1",
paths = "inst/extdata/glooko_example.zip"
)
names(data)
#> [1] "cgm" "basal" "bolus" "SMBG"
#> [5] "carbs" "total_basal" "total_bolus"
plot_day() provides a daily overview of glucose, insulin delivery, carbohydrate entries, and SMBG measurements.
For a complete walkthrough — including supported export formats, filtering, quality checks, visualization, merging participants, and conversion to other formats — see the package vignette.
vignette("aidR")
A manuscript describing aidR and its design is currently in preparation.
If you use aidR in research, please cite the package and, once available, the accompanying publication.
citation("aidR")
Contributions are welcome. In particular, we welcome support for new AID platforms and updates to existing parsers when export formats change.
Please use the GitHub issue tracker for bugs and feature requests.
[!IMPORTANT] When reporting parsing problems, do not upload identifiable patient data to a public GitHub issue.
aidR is open-source software licensed under the GNU General Public License v3.0 (GPL-3.0).
aidR is developed at the Diabetes Center Berne in Bern, Switzerland.
For questions, suggestions, or collaboration inquiries: datascience@dcberne.com
From heterogeneous AID exports to analysis-ready data.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.