# CARWatch Data
## Overview
This repository contains data collected during the "CARWatch" Study between November 2019 and January 2020.
The data in this repository are used for the following projects:
* Richer, Robert, et al. "Assessing the Influence of the Inner Clock on the Cortisol Awakening Response and Pre-Awakening Movement." *2021 IEEE EMBS International Conference on Biomedical and Health Informatics (BHI)*. IEEE, 2021. [https://doi.org/10.1109/BHI50953.2021.9508529](https://doi.org/10.1109/BHI50953.2021.9508529).
* Richer, Robert, et al. "CARWatch – A smartphone application for improving the accuracy of cortisol awakening response sampling". *Psychoneuroendocrinology*, 2023 [https://doi.org/10.1016/j.psyneuen.2023.106073](https://doi.org/10.1016/j.psyneuen.2023.106073).
**DISCLAIMER**: To decrease the size of the dataset and allow working with the data more easily, this data repository does NOT include the raw IMU data used to compute sleep endpoints (`sleep_endpoints_<participant-id>_<night-id>.csv`) and movement features during night (`imu_static_moment_features_<participant-id>_<night-id>.csv`). The **full** dataset is available [here](https://osf.io/thgfc/).
## How to Work with the Data
### Download from OSF
The easiest way to get the dataset is to download the dataset from [OSF](https://osf.io/c35f2/).
### Install the CARWatch Analysis Package (optional)
If you want to use this dataset it is recommended to install the [`carwatch-analysis`](https://github.com/mad-lab-fau/carwatch-analysis) package. This package contains various helper functions to work with the dataset (including [`tpcp`](https://github.com/mad-lab-fau/tpcp) `Dataset` representations), process data, and different analysis experiments performed with the dataset.
See the [`carwatch-analysis`](https://github.com/mad-lab-fau/carwatch-analysis) package for further information.
## How the Data are Structured
The repository is structured as follows:
```bash
├── sleep/ # IMU data collected during sleep, structured in separate subfolders per participant
│ ├── AB19E/
│ │ ├── raw/
│ │ │ ├── <EMPTY> # NOTE: Now IMU raw data files to decrease the size of the dataset.
│ │ │ └── ...
│ │ └── processed/
│ │ ├── imu_static_moment_features_<participant-id>_<night-id>.csv # Static moment features extracted from IMU data
│ │ └── sleep_endpoints_<participant-id>_<night-id>.csv # Sleep endpoints computed from IMU data using a sleep/wake classification algorithm
│ ├── AB31R/
│ └── .../
├── questionnaire/ # Questionnaire data stored as tabular data
│ ├── raw/
│ │ ├── Questionnaire_Data_CARWatch.csv # Raw questionnaire data after export from Unipark
│ │ └── Codebook_CARWatch.xlsx # Codebook with mapping of nominal and ordinal scales to numerical values
│ ├── processed/
│ │ ├── condition_map.csv # Mapping containing the condition to each recorded night
│ │ ├── questionnaire_data.csv # Processed questionnaire data with categorical variables, metadata, and computed scores
│ │ ├── chronotype_bedtimes.csv # Table containing chronotype of participants (assessed by Morningness Eveningness Questionnaire), ideal sleep onset and wake onset times (according to chronotype), as well as self-reported bed, sleep onset, wake onset and getup times
│ │ └── sleep_information_merged.csv # Merged sleep information from self-reports and sleep endpoint computed from IMU data
├── saliva/ # Saliva data stored as tabular data
│ ├── raw/
│ │ └── CARWatch_Cortisol_Data.csv # Cortisol data in raw tabular format
│ └── processed/
│ ├── cortisol_samples.csv # Cortisol raw samples in long-format
│ └── cortisol_features.csv # Computed cortisol features in long-format
└── app_logs/ # Application logs from the CARWatch Android application
├── raw/ # Raw CARWatch app logs, structured in subfolders for each participant
│ ├── AB19E/
│ │ ├── carwatch_<participant-id>_YYYYMMDD_HHMMSS.csv # App log data with single files for each day the CARWatch app was used
│ │ └── ...
│ └── ...
├── cleaned/ # CARWatch app logs after cleaning and processing by the ``carwatch`` Python package
│ ├── logs_<participant-id>.csv # Cleaned and merged app logs for each participant
│ └── ...
├── cleaned_manual/ # Cleaned CARWatch app logs after manual relabeling of wrongly logged events
│ ├── logs_<participant-id>.csv # Cleaned and merged app logs for each participant
│ └── ...
├── app_data_wakeup.xlsx # Summary of app-reported awakening times, extracted from the CARWatch app logs
└── logs_cleaned_summary.xlsx # Overview of manually cleaned and relabeled log files
```
### Processed Data
All data in `processed` subfolders are generated using running the data processing notebooks in the `carwatch-analysis` package, available on [GitHub](https://github.com/mad-lab-fau/carwatch-analysis). To reproduce these intermediate processing results, re-run the corresponding notebooks. See the README of the `carwatch-analysis` package for more information.
## How the Data were Acquired
This dataset contains data from 117 healthy participants (aged 24.2 ± 8.7 years, 79.5% female) that took part in a two-night experiment. During the study, we recorded the cortisol awakening response (CAR) using five saliva samples upon awakening and in the 60 min after awakening, movement during night using a wrist-worn IMU sensor, as well as self-reports assessing chronotype, perceived stress etc. using questionnaires. A randomly selected subsample of 65 participants were additionally asked to use the CARWatch Android application to objectively assess saliva sampling times and awakening.