A YourLoops export is a folder (possibly zipped) containing CSV files for several data types:
[1] "alarms.csv" "basal.csv"
[3] "bolus.csv" "cbg.csv"
[5] "meals.csv" "physicalActivities.csv"
[7] "rescuecarbs.csv" "settings-cgm.csv"
[9] "settings-current-parameters.csv" "settings-device.csv"
[11] "settings-pump.csv" "settings-security-basals.csv"
The column headers are always in English, regardless of the user’s account language. Timestamps are given in UTC alongside a separate timezone offset in minutes, so recovering local (wall-clock) time requires combining the two. This example shows a file containing CGM data:
timestamp,timezoneOffSet,value,units,cgmModel
2025-07-06T00:00:18Z,120,165,mg/dL,
2025-07-06T00:05:17Z,120,167,mg/dL,
2025-07-06T00:10:17Z,120,166,mg/dL,
2025-07-06T00:15:17Z,120,168,mg/dL,
2025-07-06T00:20:18Z,120,163,mg/dL,
2025-07-06T00:25:19Z,120,155,mg/dL,
2025-07-06T00:30:19Z,120,154,mg/dL,
2025-07-06T00:35:19Z,120,152,mg/dL,
2025-07-06T00:40:19Z,120,151,mg/dL,
Because YourLoops headers are language-independent, aidR
identifies each file by matching its column names exactly against a
lookup of the expected headers for each data type.
To inspect the raw files, we parse the export with
clean = FALSE, which returns the full information provided
by YourLoops:
Each entry below describes one raw file and shows an example.
cbg.csv: CGM data.head(data$cgm)
timestamp timezoneOffSet value units cgmModel
1 2025-07-06T00:00:18Z 120 165 mg/dL NA
2 2025-07-06T00:05:17Z 120 167 mg/dL NA
3 2025-07-06T00:10:17Z 120 166 mg/dL NA
4 2025-07-06T00:15:17Z 120 168 mg/dL NA
5 2025-07-06T00:20:18Z 120 163 mg/dL NA
6 2025-07-06T00:25:19Z 120 155 mg/dL NAbasal.csv: basal rates, including the
delivery type and the duration (given in milliseconds).head(data$basal)
timestamp timezoneOffSet duration_in_milliseconds rate
1 2025-07-06T00:00:00Z 120 665585 2.15
2 2025-07-06T00:11:05Z 120 590009 0.00
3 2025-07-06T00:20:55Z 120 312498 2.15
4 2025-07-06T00:26:08Z 120 360660 3.00
5 2025-07-06T00:32:08Z 120 297191 0.00
6 2025-07-06T00:37:05Z 120 889353 2.75
deliveryType
1 automated
2 automated
3 automated
4 automated
5 automated
6 automatedbolus.csv: insulin boluses, including
a flag whether a bolus was biphasic or not.head(data$bolus)
timestamp timezoneOffSet type delivered required
1 2025-07-06T00:00:00Z 120 normal 2.50 2.50
2 2025-07-06T00:10:06Z 120 normal 4.00 4.00
3 2025-07-06T00:25:06Z 120 normal 1.05 1.05
4 2025-07-06T00:30:44Z 120 normal 0.60 0.60
5 2025-07-06T00:36:08Z 120 biphasic 0.25 0.25
6 2025-07-06T00:43:19Z 120 normal 3.55 3.55
insulinOnBoard prescriptor biphasicId part
1 4.336462 auto 0
2 0.000000 manual 0
3 9.118522 auto 0
4 12.000910 auto 0
5 10.320805 auto biphasic3523 1
6 9.137925 auto 0meals.csv: carbohydrate intake
communicated to the bolus calculator.head(data$meals)
timestamp timezoneOffSet inputTimestamp carbsValue
1 2025-07-06T00:25:00Z 120 2025-07-06T00:25:58.236Z 5
2 2025-07-06T00:36:00Z 120 2025-07-06T00:36:16.189Z 40
3 2025-07-06T04:26:00Z 120 2025-07-06T04:26:35.268Z 10
4 2025-07-06T06:42:00Z 120 2025-07-06T06:42:49.128Z 30
5 2025-07-06T06:52:00Z 120 2025-07-06T06:52:03.749Z 25
6 2025-07-06T07:32:00Z 120 2025-07-06T07:32:02.747Z 25
carbUnit is_input_meal_fat bolus.type bolus.delivered bolus.insulinOnBoard
1 grams no normal 1.05 9.118522
2 grams yes biphasic 0.25 10.320805
3 grams no normal 3.10 6.731373
4 grams no normal 0.15 2.174911
5 grams no normal 3.95 11.696627
6 grams no normal 0.30 6.086263
bolus.prescriptor recommended.net
1 auto 1.05
2 auto 0.25
3 auto 3.10
4 auto 0.15
5 auto 3.95
6 auto 0.30rescuecarbs.csv: carbohydrates taken
to treat a hypoglycaemic event.head(data$rescuecarbs)
timestamp timezoneOffSet confirmedCarbs confirmedCarbsUnits
1 2025-07-06T13:50:30Z 120 20 grams
prescriptor recommendedCarbs recommendedCarbsUnits
1 auto 0 gramsalarms.csv: alarms raised by the loop
or the pump, with code and acknowledgement status.head(data$alarms)
timestamp timezoneOffSet inputTime type
1 2025-07-06T08:12:30.203Z 120 2025-07-06T08:12:30.203Z handset
2 2025-07-06T10:23:34.583Z 120 2025-07-06T10:23:34.583Z handset
3 2025-07-06T15:02:33.116Z 120 2025-07-06T15:02:33.116Z handset
4 2025-07-06T17:50:00.552Z 120 2025-07-06T17:50:00.552Z handset
5 2025-07-06T23:19:01.920Z 120 2025-07-06T23:19:01.920Z handset
level code acknowledge_status updateTimestamp
1 alert 20102 acknowledged 2025-07-06T10:13:33.312Z
2 alert 20100 acknowledged 2025-07-06T11:24:41.826Z
3 alert 10117 acknowledged 2025-07-06T17:12:23.001Z
4 alert 10113 acknowledged 2025-07-06T19:23:32.827Z
5 alert 20100 acknowledged 2025-07-06T23:39:33.123ZphysicalActivities.csv: self-reported
physical activity, with duration and reported intensity. Often sparse or
missing entirely.head(data$physicalActivities)
timestamp timezoneOffSet duration.value duration.unit
1 2025-07-06T18:00:00Z 120 0 seconds
2 2025-07-06T18:15:00Z 120 3600 seconds
reportedIntensity inputTimestamp
1 medium 2025-07-06T18:53:18.014Z
2 medium 2025-07-06T19:21:25.282Zsettings-cgm.csv,
settings-pump.csv,
settings-device.csv,
settings-current-parameters.csv,
settings-security-basals.csv: the CGM,
pump, smartphone, loop-parameter, and security-basal configuration.head(data$settings_pump)
expirationDate manufacturer name swVersion serialNumber
1 2025-07-07T20:18:19Z VICENTRA GOLD 2.6.0.3 0000-0000-0000Note that a YourLoops export contains no SMBG data;
cgm, basal, bolus, and
carbs are the core data types available from this
platform.
When parse_data is run with clean = TRUE,
the cleaned data types are built from the following raw files and
attributes:
| Cleaned data type | Used files | Used attributes from clean = FALSE |
|---|---|---|
cgm |
cbg.csv |
data$cgm |
basal |
basal.csv |
data$basal |
bolus |
bolus.csv |
data$bolus |
carbs |
meals.csv, rescuecarbs.csv |
data$meals, data$rescuecarbs |
total_basal |
basal.csv |
data$basal |
total_bolus |
bolus.csv |
data$bolus |
aidR converts them to mg/dL automatically.clean = FALSE, timestamps are reported exactly as
in the file: the timestamp column is in UTC and the
timezoneOffSet column gives the offset, so local
(wall-clock) time is obtained by adding the two.clean = TRUE, for consistency with the other
formats the timestamp column instead holds local
(wall-clock) time, while timezoneOffSet remains the same
offset. UTC time can therefore be recovered by
UTC = timestamp - timezoneOffSet.total_basal and total_bolus are summed from
the cleaned basal and bolus data and carry
source = "summed".aidR keeps them separate
but flags them, so they can be recombined if needed.link_id is always NA for
bolus and carbs: the export does not record
which carbohydrate entry triggered which bolus. Matching them by
timestamp and amount is not implemented.