aidR: Tidepool export format

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(aidR)
library(readxl)
path <- system.file("extdata", "tidepool_example.xlsx", package = "aidR")
file <- read_excel(path, sheet = "CGM", guess_max = 100000)

Overview

A Tidepool export is a single multi-sheet .xlsx workbook with one sheet per data type. The sheets Basal and Bolus are always expected to be present; the remaining sheets (CGM, Device Event, Food, Bolus Calculator, Basal Schedules, BG Targets, Carb Ratios, Insulin Sensitivities, SMBG, Upload) are optional and are read only if the workbook contains them.

Because Tidepool aggregates data uploaded from many different pumps, meters, and CGM devices, the exact set of sheets and the columns within them vary between exports. Sheet names and headers, however, are always in English. This example shows a CGM sheet:

print(file, n = 10)

How aidR detects this format

aidR checks that the file is a readable Excel workbook containing a sheet named Basal and a sheet named Bolus. Because Tidepool's sheet names are language-independent, each sheet is then looked up by name; any optional sheet that is absent simply yields no data.

Sheets and the data types they produce

To inspect the raw data, we parse the export with clean = FALSE, which returns the full information provided by Tidepool:

data <- parse_data(id = "1", paths = path, clean = FALSE)

Each entry below describes one sheet and the information it provides.

head(data$cgm)
head(data$basal)
head(data$bolus)
head(data$SMBG)
head(data$bolus_calculator)
head(data$device_event)
head(data$basal_schedules)
head(data$upload)

Cleaning files

When parse_data is run with clean = TRUE, the cleaned data types are built from the following sheets and attributes:

| Cleaned data type | Used sheets | Used attributes from clean = FALSE | |-------------------|-----------------------------------|-----------------| | cgm | CGM | data$cgm | | basal | Basal | data$basal | | bolus | Bolus | data$bolus | | carbs | Bolus Calculator or Food | data$carbs | | SMBG | SMBG | data$SMBG | | total_basal | Basal | data$basal | | total_bolus | Bolus | data$bolus |

Notes



Try the aidR package in your browser

Any scripts or data that you put into this service are public.

aidR documentation built on Oct. 28, 2026, 5:13 p.m.