Code to clean data from Jaeger Oxycon Pro metabolic cart based on the paper "Methods Used to Process Data from Indirect Calorimetry and Their Application to VO2MAX" Robert A Robergs and Angus F Burnett. Journal of Exercise Physiology. 6(2), 2003.
Place the code next to the participants folder which contain a file called timing.csv and a CSV data file generated by Jaeger.
- data
- Jaeger
- 301
- timing.csv
- JaegerDataFile.csv
- 302
- timing.csv
- JaegerDataFile.csv
- ...
- 301
- intervals.csv
- Jaeger
The timing.csv should contain the following columns:
Task name
stores the task done by participantStart time
is start date and time (in ####-##-## ##:##:## format)End time
is end date and time (in ####-##-## ##:##:## format)
The data folder also contains a file called intervals.csv which stores information about each participants as follows:
herox
stores participants alias nameskit
is the package numberphone
is phone idwatch
is Apple watch idfitbit
is Fitbit idgeneactiv
is GENEActiv idsnesedoc
is SenseDoc idstart
is start date and time (in ####-##-## ##:##:## format)end
is end date and time (in ####-##-## ##:##:## format)userid
is a unique id for each participantwrist
is 1 if Apple Watch and GENEActiv are on the same wrist, otherwise 0age
,gender
,weight
andheight
are demographic datastreet
,city
,postal
are address information for each participant.
Note: This file should be kept updated throughout the experiment.
Steps to run the code as in the follows:
- Modify
path
andintrPath
, the Jaeger participants folder and intervals.csv, respectively - Change the
uid
(e.g. 301) for choose which participant data should be processed - Modify the
timeZone
variable to your local timezone
Info: More information on setting the timezone
can be found here.
Select all the code and run it using Ctrl + Enter.
Based on the interpolation and spline cure fitting six plots are generated. For VO2, VCO2 and RER the generated curve and Bland-Altman figures are plotted and saved in each participant folder. Also, a CSV file to check the validity of the collected Jaeger data is generated and placed next to the plots.