Reading and Standardizing Automated Insulin Delivery Data

Parses the native exports of several automated insulin delivery (AID) platforms into a common, platform-independent format for continuous glucose monitoring (CGM), basal, bolus, carbohydrate, and self-monitored blood glucose (SMBG) data. Additional functions check completeness, filter, produce visualizations, and convert the data to other formats.


aidR logo

Read and standardize data from automated insulin delivery systems

R package GPL-3 Last commit

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.

What can aidR do?

aidR provides a common workflow for AID data:

  • Read native exports from seven major diabetes management platforms
  • Standardize CGM, basal, bolus, carbohydrate, and SMBG data
  • Filter CGM and carbohydrate data
  • Check data completeness and insulin totals
  • Visualize daily glucose, insulin, carbohydrate, and SMBG data
  • Merge data across participants and AID systems
  • Convert data to DIAX and formats used by iglu and cgmquantify

Overview of the aidR workflow Overview of the aidR workflow

Supported export formats

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

Installation

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)

Quick start

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"

Visualizing AID data

plot_day() provides a daily overview of glucose, insulin delivery, carbohydrate entries, and SMBG measurements.

Example daily AID data visualization produced by aidR

Documentation

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")

Citation

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")

Contributing

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.

License

aidR is open-source software licensed under the GNU General Public License v3.0 (GPL-3.0).

Contact

aidR is developed at the Diabetes Center Berne in Bern, Switzerland.

For questions, suggestions, or collaboration inquiries: [email protected]


From heterogeneous AID exports to analysis-ready data.

↑ Back to top

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("aidR")

0.2.4 by Madleina Caduff, 15 hours ago


https://github.com/madleina/aidR


Report a bug at https://github.com/madleina/aidR/issues


Browse source code at https://github.com/cran/aidR


Authors: Madleina Caduff [aut, cre] (ORCID: , Aritz Lizoain [aut] , Diabetes Center Berne (DCB) [cph, fnd]


Documentation:   PDF Manual  


GPL-3 license


Imports readxl, tools, dplyr, lubridate, rjson, tidyr, stringr, utils, rlang, stats, graphics, iglu, hms

Suggests knitr, rmarkdown, cgmquantify, ggplot2, testthat, withr


See at CRAN