This repository was created to give insights into the preprocessing of the Team Novo Nordisk (TNN) cycling and diabetes data. This dataset was used in the following manuscript: "Glycemic Patterns of Male Professional Athletes With Type 1 Diabetes During Exercise, Recovery and Sleep: Retrospective, Observational Study Over an Entire Competitive Season" by E. van Weenen et al.
This dataset is not publicly available to protect the privacy of the participants, but can be requested in limited form from the corresponding author upon reasonable request. The code for the analysis of this paper can be found under https://github.com/im-ethz/TNN-analysis.
Below you will find the steps used to access and process the data.
-
Find login information in
credentials.yml
-
Scrape TrainingPeaks using
scrape_trainingpeaks.py
(select a date-range and workout-type bike) -
For each athlete, structure the downloaded
.fit
/.tcx
/.pwx
files as follows. Make sure all files are in a folder calledraw
, and within raw, make subdirectories for each participant, e.g.,0
,1
, etc -
Convert TrainingPeaks
fit.gz
files tocsv
using the bike2csv library by first extracting every.fit.gz
file to.fit
and subsequently converting.fit
files to.cvs
-
Scrape Dexcom using
scrape_dexcom.py
-
Preprocess dexcom and trainingpeaks using
preprocess_dexcom.py
andpreprocess_trainingpeaks.py
. Note that once you reach timezone processing for both, things get a little tricky and may require both trainingpeaks and dexcom data to be at a certain stage of the preprocessing.