From 9668dfac7a04b1b70c161ce4158fb4cec6d45283 Mon Sep 17 00:00:00 2001 From: JulioV Date: Sun, 21 Feb 2021 17:30:30 -0500 Subject: [PATCH] Update docs to support Empatica --- config.yaml | 9 +- docs/change-log.md | 4 + docs/citation.md | 8 ++ docs/features/add-new-features.md | 22 ++- docs/features/empatica-accelerometer.md | 44 ++++++ docs/features/empatica-blood-volume-pulse.md | 48 +++++++ .../empatica-electrodermal-activity.md | 48 +++++++ docs/features/empatica-heartrate.md | 48 +++++++ docs/features/empatica-inter-beat-interval.md | 48 +++++++ docs/features/empatica-tags.md | 11 ++ docs/features/empatica-temperature.md | 48 +++++++ docs/features/feature-introduction.md | 2 +- docs/img/logo.png | Bin 0 -> 12460 bytes docs/index.md | 4 +- docs/setup/configuration.md | 130 +++++++++++++----- docs/setup/execution.md | 22 +-- docs/team.md | 10 ++ mkdocs.yml | 14 +- src/data/create_participants_files.R | 8 ++ 19 files changed, 471 insertions(+), 57 deletions(-) create mode 100644 docs/features/empatica-accelerometer.md create mode 100644 docs/features/empatica-blood-volume-pulse.md create mode 100644 docs/features/empatica-electrodermal-activity.md create mode 100644 docs/features/empatica-heartrate.md create mode 100644 docs/features/empatica-inter-beat-interval.md create mode 100644 docs/features/empatica-tags.md create mode 100644 docs/features/empatica-temperature.md create mode 100644 docs/img/logo.png diff --git a/config.yaml b/config.yaml index 59f88539..63277eb2 100644 --- a/config.yaml +++ b/config.yaml @@ -7,7 +7,7 @@ TIMEZONE: &timezone America/New_York # See https://www.rapids.science/latest/setup/configuration/#participant-files -PIDS: [e03] +PIDS: [test01] # See https://www.rapids.science/latest/setup/configuration/#automatic-creation-of-participant-files CREATE_PARTICIPANT_FILES: @@ -21,9 +21,11 @@ CREATE_PARTICIPANT_FILES: DEVICE_ID_COLUMN: device_id # column name IGNORED_DEVICE_IDS: [] FITBIT_SECTION: - ADD: TRUE + ADD: FALSE DEVICE_ID_COLUMN: device_id # column name IGNORED_DEVICE_IDS: [] + EMPATICA_SECTION: + ADD: FALSE # See https://www.rapids.science/latest/setup/configuration/#time-segments TIME_SEGMENTS: &time_segments @@ -417,12 +419,11 @@ EMPATICA_DATA_CONFIGURATION: TYPE: ZIP_FILE FOLDER: data/external/empatica TIMEZONE: - TYPE: SINGLE # Fitbit devices don't support time zones so we read this data in the timezone indicated by VALUE + TYPE: SINGLE # Empatica devices don't support time zones so we read this data in the timezone indicated by VALUE VALUE: *timezone # Sensors ------ -# See https://www.rapids.science/latest/features/fitbit-heartrate-summary/ EMPATICA_ACCELEROMETER: TABLE: ACC PROVIDERS: diff --git a/docs/change-log.md b/docs/change-log.md index fb844ca3..e98eb169 100644 --- a/docs/change-log.md +++ b/docs/change-log.md @@ -1,5 +1,9 @@ # Change Log +## Next release +- Add support for Empatica devices (all sensors) +- Add logo +- Move Citation page to the Setup section ## v0.4.3 - Fix bug when any of the rows from any sensor do not belong a time segment ## v0.4.2 diff --git a/docs/citation.md b/docs/citation.md index 94cae21d..0f950695 100644 --- a/docs/citation.md +++ b/docs/citation.md @@ -14,6 +14,14 @@ If you used RAPIDS, please cite [this paper](https://preprints.jmir.org/preprint DOI: 10.2196/preprints.23246 URL: https://preprints.jmir.org/preprint/23246 +## DBDP (all Empatica sensors) + +If you computed features using the provider `[DBDP]` of any of the Empatica sensors (accelerometer, heart rate, temperature, EDA, BVP, IBI, tags) cite [this paper](https://www.cambridge.org/core/journals/journal-of-clinical-and-translational-science/article/digital-biomarker-discovery-pipeline-an-open-source-software-platform-for-the-development-of-digital-biomarkers-using-mhealth-and-wearables-data/A6696CEF138247077B470F4800090E63) in addition to RAPIDS. + +!!! cite "Bent et al. citation" + Bent, B., Wang, K., Grzesiak, E., Jiang, C., Qi, Y., Jiang, Y., Cho, P., Zingler, K., Ogbeide, F.I., Zhao, A., Runge, R., Sim, I., Dunn, J. (2020). The Digital Biomarker Discovery Pipeline: An open source software platform for the development of digital biomarkers using mHealth and wearables data. Journal of Clinical and Translational Science, 1-28. doi:10.1017/cts.2020.511 + + ## Panda (accelerometer) If you computed accelerometer features using the provider `[PHONE_ACCLEROMETER][PANDA]` cite [this paper](https://pubmed.ncbi.nlm.nih.gov/31657854/) in addition to RAPIDS. diff --git a/docs/features/add-new-features.md b/docs/features/add-new-features.md index 127dc475..d1dfd8e4 100644 --- a/docs/features/add-new-features.md +++ b/docs/features/add-new-features.md @@ -1,10 +1,9 @@ # Add New Features !!! hint - We recommend reading the [Behavioral Features Introduction](../feature-introduction/) before reading this page - -!!! hint - You won't have to deal with time zones, dates, times, data cleaning or preprocessing. The data that RAPIDS pipes to your feature extraction code is ready to process. + - We recommend reading the [Behavioral Features Introduction](../feature-introduction/) before reading this page. + - You can implement new features in Python or R scripts. + - You won't have to deal with time zones, dates, times, data cleaning or preprocessing. The data that RAPIDS pipes to your feature extraction code is ready to process. ## New Features for Existing Sensors @@ -19,6 +18,8 @@ As a tutorial, we will add a new provider for `PHONE_ACCELEROMETER` called `VEGA ??? info "Existing Sensors" An existing sensor is any of the phone or Fitbit sensors with a configuration entry in `config.yaml`: + Smartphone (AWARE) + - Phone Accelerometer - Phone Activity Recognition - Phone Applications Foreground @@ -33,6 +34,9 @@ As a tutorial, we will add a new provider for `PHONE_ACCELEROMETER` called `VEGA - Phone Screen - Phone WiFI Connected - Phone WiFI Visible + + Fitbit + - Fitbit Data Yield - Fitbit Heart Rate Summary - Fitbit Heart Rate Intraday @@ -40,6 +44,16 @@ As a tutorial, we will add a new provider for `PHONE_ACCELEROMETER` called `VEGA - Fitbit Steps Summary - Fitbit Steps Intraday + Empatica + + - Empatica Accelerometer + - Empatica Heart Rate + - Empatica Temperature + - Empatica Electrodermal Activity + - Empatica Blood Volume Pulse + - Empatica Inter Beat Interval + - Empatica Tags + ### Modify the `config.yaml` file diff --git a/docs/features/empatica-accelerometer.md b/docs/features/empatica-accelerometer.md new file mode 100644 index 00000000..099e33fc --- /dev/null +++ b/docs/features/empatica-accelerometer.md @@ -0,0 +1,44 @@ +# Empatica Accelerometer + +Sensor parameters description for `[EMPATICA_ACCELEROMETER]`: + +|Key                              | Description | +|----------------|----------------------------------------------------------------------------------------------------------------------------------- +|`[TABLE]`| Name of the CSV file containing accelerometer data that is compressed inside an Empatica zip file. Since these zip files are created [automatically](https://support.empatica.com/hc/en-us/articles/201608896-Data-export-and-formatting-from-E4-connect-) by Empatica, there is no need to change the value of this attribute. + +## DBDP provider + +!!! info "Available time segments and platforms" + - Available for all time segments + +!!! info "File Sequence" + ```bash + - data/raw/{pid}/empatica_accelerometer_unzipped_{zip-file}.csv # one per zip file + - data/raw/{pid}/empatica_accelerometer_raw_{zip-file}.csv # one per zip file + - data/raw/{pid}/empatica_accelerometer_joined.csv + - data/raw/{pid}/empatica_accelerometer_with_datetime.csv + - data/interim/{pid}/empatica_accelerometer_features/empatica_accelerometer_{language}_{provider_key}.csv + - data/processed/features/{pid}/empatica_accelerometer.csv + ``` + + +Parameters description for `[EMPATICA_ACCELEROMETER][PROVIDERS][DBDP]`: + +|Key                              | Description | +|----------------|----------------------------------------------------------------------------------------------------------------------------------- +|`[COMPUTE]`| Set to `True` to extract `EMPATICA_ACCELEROMETER` features from the `DBDP` provider| +|`[FEATURES]` | Features to be computed, see table below + + +Features description for `[EMPATICA_ACCELEROMETER][PROVIDERS][RAPDBDPIDS]`: + +|Feature |Units |Description| +|-------------------------- |---------- |---------------------------| +|maxmagnitude |m/s^2^ |The maximum magnitude of acceleration ($\|acceleration\| = \sqrt{x^2 + y^2 + z^2}$). +|minmagnitude |m/s^2^ |The minimum magnitude of acceleration. +|avgmagnitude |m/s^2^ |The average magnitude of acceleration. +|medianmagnitude |m/s^2^ |The median magnitude of acceleration. +|stdmagnitude |m/s^2^ |The standard deviation of acceleration. + +!!! note "Assumptions/Observations" + 1. Analyzing accelerometer data is a memory intensive task. If RAPIDS crashes is likely because the accelerometer dataset for a participant is too big to fit in memory. We are considering different alternatives to overcome this problem, if this is something you need, get in touch and we can discuss how to implement it. diff --git a/docs/features/empatica-blood-volume-pulse.md b/docs/features/empatica-blood-volume-pulse.md new file mode 100644 index 00000000..1ad51c0a --- /dev/null +++ b/docs/features/empatica-blood-volume-pulse.md @@ -0,0 +1,48 @@ +# Empatica Blood Volume Pulse + +Sensor parameters description for `[EMPATICA_BLOOD_VOLUME_PULSE]`: + +|Key                              | Description | +|----------------|----------------------------------------------------------------------------------------------------------------------------------- +|`[TABLE]`| Name of the CSV file containing blood volume pulse data that is compressed inside an Empatica zip file. Since these zip files are created [automatically](https://support.empatica.com/hc/en-us/articles/201608896-Data-export-and-formatting-from-E4-connect-) by Empatica, there is no need to change the value of this attribute. + +## DBDP provider + +!!! info "Available time segments and platforms" + - Available for all time segments + +!!! info "File Sequence" + ```bash + - data/raw/{pid}/empatica_blood_volume_pulse_unzipped_{zip-file}.csv # one per zip file + - data/raw/{pid}/empatica_blood_volume_pulse_raw_{zip-file}.csv # one per zip file + - data/raw/{pid}/empatica_blood_volume_pulse_joined.csv + - data/raw/{pid}/empatica_blood_volume_pulse_with_datetime.csv + - data/interim/{pid}/empatica_blood_volume_pulse_features/empatica_blood_volume_pulse_{language}_{provider_key}.csv + - data/processed/features/{pid}/empatica_blood_volume_pulse.csv + ``` + + +Parameters description for `[EMPATICA_BLOOD_VOLUME_PULSE][PROVIDERS][DBDP]`: + +|Key                              | Description | +|----------------|----------------------------------------------------------------------------------------------------------------------------------- +|`[COMPUTE]` | Set to `True` to extract `EMPATICA_BLOOD_VOLUME_PULSE` features from the `DBDP` provider| +|`[FEATURES]` | Features to be computed from blood volume pulse intraday data, see table below | + + +Features description for `[EMPATICA_BLOOD_VOLUME_PULSE][PROVIDERS][DBDP]`: + +|Feature |Units |Description| +|-------------------------- |-------------- |---------------------------| +|maxbvp |- |The maximum blood volume pulse during a time segment. +|minbvp |- |The minimum blood volume pulse during a time segment. +|avgbvp |- |The average blood volume pulse during a time segment. +|medianbvp |- |The median of blood volume pulse during a time segment. +|modebvp |- |The mode of blood volume pulse during a time segment. +|stdbvp |- |The standard deviation of blood volume pulse during a time segment. +|diffmaxmodebvp |- |The difference between the maximum and mode blood volume pulse during a time segment. +|diffminmodebvp |- |The difference between the mode and minimum blood volume pulse during a time segment. +|entropybvp |nats |Shannon’s entropy measurement based on blood volume pulse during a time segment. + +!!! note "Assumptions/Observations" + For more information about BVP read [this](https://support.empatica.com/hc/en-us/articles/360029719792-E4-data-BVP-expected-signal). \ No newline at end of file diff --git a/docs/features/empatica-electrodermal-activity.md b/docs/features/empatica-electrodermal-activity.md new file mode 100644 index 00000000..a521a222 --- /dev/null +++ b/docs/features/empatica-electrodermal-activity.md @@ -0,0 +1,48 @@ +# Empatica Electrodermal Activity + +Sensor parameters description for `[EMPATICA_ELECTRODERMAL_ACTIVITY]`: + +|Key                              | Description | +|----------------|----------------------------------------------------------------------------------------------------------------------------------- +|`[TABLE]`| Name of the CSV file containing electrodermal activity data that is compressed inside an Empatica zip file. Since these zip files are created [automatically](https://support.empatica.com/hc/en-us/articles/201608896-Data-export-and-formatting-from-E4-connect-) by Empatica, there is no need to change the value of this attribute. + +## DBDP provider + +!!! info "Available time segments and platforms" + - Available for all time segments + +!!! info "File Sequence" + ```bash + - data/raw/{pid}/empatica_electrodermal_activity_unzipped_{zip-file}.csv # one per zip file + - data/raw/{pid}/empatica_electrodermal_activity_raw_{zip-file}.csv # one per zip file + - data/raw/{pid}/empatica_electrodermal_activity_joined.csv + - data/raw/{pid}/empatica_electrodermal_activity_with_datetime.csv + - data/interim/{pid}/empatica_electrodermal_activity_features/empatica_electrodermal activity_{language}_{provider_key}.csv + - data/processed/features/{pid}/empatica_electrodermal_activity.csv + ``` + + +Parameters description for `[EMPATICA_ELECTRODERMAL_ACTIVITY][PROVIDERS][DBDP]`: + +|Key                              | Description | +|----------------|----------------------------------------------------------------------------------------------------------------------------------- +|`[COMPUTE]` | Set to `True` to extract `EMPATICA_ELECTRODERMAL_ACTIVITY` features from the `DBDP` provider| +|`[FEATURES]` | Features to be computed from electrodermal activity intraday data, see table below | + + +Features description for `[EMPATICA_ELECTRODERMAL ACTIVITY][PROVIDERS][DBDP]`: + +|Feature |Units |Description| +|-------------------------- |-------------- |---------------------------| +|maxeda |microsiemens |The maximum electrical conductance during a time segment. +|mineda |microsiemens |The minimum electrical conductance during a time segment. +|avgeda |microsiemens |The average electrical conductance during a time segment. +|medianeda |microsiemens |The median of electrical conductance during a time segment. +|modeeda |microsiemens |The mode of electrical conductance during a time segment. +|stdeda |microsiemens |The standard deviation of electrical conductance during a time segment. +|diffmaxmodeeda |microsiemens |The difference between the maximum and mode electrical conductance during a time segment. +|diffminmodeeda |microsiemens |The difference between the mode and minimum electrical conductance during a time segment. +|entropyeda |nats |Shannon’s entropy measurement based on electrical conductance during a time segment. + +!!! note "Assumptions/Observations" + None \ No newline at end of file diff --git a/docs/features/empatica-heartrate.md b/docs/features/empatica-heartrate.md new file mode 100644 index 00000000..06960c6b --- /dev/null +++ b/docs/features/empatica-heartrate.md @@ -0,0 +1,48 @@ +# Empatica Heart Rate + +Sensor parameters description for `[EMPATICA_HEARTRATE]`: + +|Key                              | Description | +|----------------|----------------------------------------------------------------------------------------------------------------------------------- +|`[TABLE]`| Name of the CSV file containing heart rate data that is compressed inside an Empatica zip file. Since these zip files are created [automatically](https://support.empatica.com/hc/en-us/articles/201608896-Data-export-and-formatting-from-E4-connect-) by Empatica, there is no need to change the value of this attribute. + +## DBDP provider + +!!! info "Available time segments and platforms" + - Available for all time segments + +!!! info "File Sequence" + ```bash + - data/raw/{pid}/empatica_heartrate_unzipped_{zip-file}.csv # one per zip file + - data/raw/{pid}/empatica_heartrate_raw_{zip-file}.csv # one per zip file + - data/raw/{pid}/empatica_heartrate_joined.csv + - data/raw/{pid}/empatica_heartrate_with_datetime.csv + - data/interim/{pid}/empatica_heartrate_features/empatica_heartrate_{language}_{provider_key}.csv + - data/processed/features/{pid}/empatica_heartrate.csv + ``` + + +Parameters description for `[EMPATICA_HEARTRATE][PROVIDERS][DBDP]`: + +|Key                              | Description | +|----------------|----------------------------------------------------------------------------------------------------------------------------------- +|`[COMPUTE]` | Set to `True` to extract `EMPATICA_HEARTRATE` features from the `DBDP` provider| +|`[FEATURES]` | Features to be computed from heart rate intraday data, see table below | + + +Features description for `[EMPATICA_HEARTRATE][PROVIDERS][DBDP]`: + +|Feature |Units |Description| +|-------------------------- |-------------- |---------------------------| +|maxhr |beats |The maximum heart rate during a time segment. +|minhr |beats |The minimum heart rate during a time segment. +|avghr |beats |The average heart rate during a time segment. +|medianhr |beats |The median of heart rate during a time segment. +|modehr |beats |The mode of heart rate during a time segment. +|stdhr |beats |The standard deviation of heart rate during a time segment. +|diffmaxmodehr |beats |The difference between the maximum and mode heart rate during a time segment. +|diffminmodehr |beats |The difference between the mode and minimum heart rate during a time segment. +|entropyhr |nats |Shannon’s entropy measurement based on heart rate during a time segment. + +!!! note "Assumptions/Observations" + We extract the previous features based on the average heart rate values computed in [10-second windows](https://support.empatica.com/hc/en-us/articles/360029469772-E4-data-HR-csv-explanation). \ No newline at end of file diff --git a/docs/features/empatica-inter-beat-interval.md b/docs/features/empatica-inter-beat-interval.md new file mode 100644 index 00000000..e4bfa5bb --- /dev/null +++ b/docs/features/empatica-inter-beat-interval.md @@ -0,0 +1,48 @@ +# Empatica Inter Beat Interval + +Sensor parameters description for `[EMPATICA_INTER_BEAT_INTERVAL]`: + +|Key                              | Description | +|----------------|----------------------------------------------------------------------------------------------------------------------------------- +|`[TABLE]`| Name of the CSV file containing inter beat interval data that is compressed inside an Empatica zip file. Since these zip files are created [automatically](https://support.empatica.com/hc/en-us/articles/201608896-Data-export-and-formatting-from-E4-connect-) by Empatica, there is no need to change the value of this attribute. + +## DBDP provider + +!!! info "Available time segments and platforms" + - Available for all time segments + +!!! info "File Sequence" + ```bash + - data/raw/{pid}/empatica_inter_beat_interval_unzipped_{zip-file}.csv # one per zip file + - data/raw/{pid}/empatica_inter_beat_interval_raw_{zip-file}.csv # one per zip file + - data/raw/{pid}/empatica_inter_beat_interval_joined.csv + - data/raw/{pid}/empatica_inter_beat_interval_with_datetime.csv + - data/interim/{pid}/empatica_inter_beat_interval_features/empatica_inter_beat_interval_{language}_{provider_key}.csv + - data/processed/features/{pid}/empatica_inter_beat_interval.csv + ``` + + +Parameters description for `[EMPATICA_INTER_BEAT_INTERVAL][PROVIDERS][DBDP]`: + +|Key                              | Description | +|----------------|----------------------------------------------------------------------------------------------------------------------------------- +|`[COMPUTE]` | Set to `True` to extract `EMPATICA_INTER_BEAT_INTERVAL` features from the `DBDP` provider| +|`[FEATURES]` | Features to be computed from inter beat interval intraday data, see table below | + + +Features description for `[EMPATICA_INTER_BEAT_INTERVAL][PROVIDERS][DBDP]`: + +|Feature |Units |Description| +|-------------------------- |-------------- |---------------------------| +|maxibi |seconds |The maximum inter beat interval during a time segment. +|minibi |seconds |The minimum inter beat interval during a time segment. +|avgibi |seconds |The average inter beat interval during a time segment. +|medianibi |seconds |The median of inter beat interval during a time segment. +|modeibi |seconds |The mode of inter beat interval during a time segment. +|stdibi |seconds |The standard deviation of inter beat interval during a time segment. +|diffmaxmodeibi |seconds |The difference between the maximum and mode inter beat interval during a time segment. +|diffminmodeibi |seconds |The difference between the mode and minimum inter beat interval during a time segment. +|entropyibi |nats |Shannon’s entropy measurement based on inter beat interval during a time segment. + +!!! note "Assumptions/Observations" + For more information about IBI read [this](https://support.empatica.com/hc/en-us/articles/360030058011-E4-data-IBI-expected-signal). \ No newline at end of file diff --git a/docs/features/empatica-tags.md b/docs/features/empatica-tags.md new file mode 100644 index 00000000..227a4417 --- /dev/null +++ b/docs/features/empatica-tags.md @@ -0,0 +1,11 @@ +# Empatica Tags + +Sensor parameters description for `[EMPATICA_TAGS]`: + +|Key                              | Description | +|----------------|----------------------------------------------------------------------------------------------------------------------------------- +|`[TABLE]`| Name of the CSV file containing tags data that is compressed inside an Empatica zip file. Since these zip files are created [automatically](https://support.empatica.com/hc/en-us/articles/201608896-Data-export-and-formatting-from-E4-connect-) by Empatica, there is no need to change the value of this attribute. + +!!! Note + - No feature providers have been implemented for this sensor yet, however you can [implement your own features](../add-new-features). + - To know more about tags read [this](https://support.empatica.com/hc/en-us/articles/204578699-Event-Marking-with-the-E4-wristband). \ No newline at end of file diff --git a/docs/features/empatica-temperature.md b/docs/features/empatica-temperature.md new file mode 100644 index 00000000..3e341f5d --- /dev/null +++ b/docs/features/empatica-temperature.md @@ -0,0 +1,48 @@ +# Empatica Temperature + +Sensor parameters description for `[EMPATICA_TEMPERATURE]`: + +|Key                              | Description | +|----------------|----------------------------------------------------------------------------------------------------------------------------------- +|`[TABLE]`| Name of the CSV file containing temperature data that is compressed inside an Empatica zip file. Since these zip files are created [automatically](https://support.empatica.com/hc/en-us/articles/201608896-Data-export-and-formatting-from-E4-connect-) by Empatica, there is no need to change the value of this attribute. + +## DBDP provider + +!!! info "Available time segments and platforms" + - Available for all time segments + +!!! info "File Sequence" + ```bash + - data/raw/{pid}/empatica_temperature_unzipped_{zip-file}.csv # one per zip file + - data/raw/{pid}/empatica_temperature_raw_{zip-file}.csv # one per zip file + - data/raw/{pid}/empatica_temperature_joined.csv + - data/raw/{pid}/empatica_temperature_with_datetime.csv + - data/interim/{pid}/empatica_temperature_features/empatica_temperature_{language}_{provider_key}.csv + - data/processed/features/{pid}/empatica_temperature.csv + ``` + + +Parameters description for `[EMPATICA_TEMPERATURE][PROVIDERS][DBDP]`: + +|Key                              | Description | +|----------------|----------------------------------------------------------------------------------------------------------------------------------- +|`[COMPUTE]` | Set to `True` to extract `EMPATICA_TEMPERATURE` features from the `DBDP` provider| +|`[FEATURES]` | Features to be computed from temperature intraday data, see table below | + + +Features description for `[EMPATICA_TEMPERATURE][PROVIDERS][DBDP]`: + +|Feature |Units |Description| +|-------------------------- |-------------- |---------------------------| +|maxtemp |degrees C |The maximum temperature during a time segment. +|mintemp |degrees C |The minimum temperature during a time segment. +|avgtemp |degrees C |The average temperature during a time segment. +|mediantemp |degrees C |The median of temperature during a time segment. +|modetemp |degrees C |The mode of temperature during a time segment. +|stdtemp |degrees C |The standard deviation of temperature during a time segment. +|diffmaxmodetemp |degrees C |The difference between the maximum and mode temperature during a time segment. +|diffminmodetemp |degrees C |The difference between the mode and minimum temperature during a time segment. +|entropytemp |nats |Shannon’s entropy measurement based on temperature during a time segment. + +!!! note "Assumptions/Observations" + None \ No newline at end of file diff --git a/docs/features/feature-introduction.md b/docs/features/feature-introduction.md index f755b34f..98602447 100644 --- a/docs/features/feature-introduction.md +++ b/docs/features/feature-introduction.md @@ -1,6 +1,6 @@ # Behavioral Features Introduction -Every phone or Fitbit sensor has a corresponding config section in `config.yaml`, these sections follow a similar structure and we'll use `PHONE_ACCELEROMETER` as an example to explain this structure. +Every device sensor has a corresponding config section in `config.yaml`, these sections follow a similar structure and we'll use `PHONE_ACCELEROMETER` as an example to explain this structure. !!! hint - We recommend reading this page if you are using RAPIDS for the first time diff --git a/docs/img/logo.png b/docs/img/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..73e87d51e7ad5f7edcef0121b2a280756e37d4dd GIT binary patch literal 12460 zcmV;dFjLQoP)v`~UzT07*naRCt{2eLaX|+jicr%NT=%m>Or2LAM5ka3GkP$V$XiM-oEf z)kIPtxZUs)gU#*1i4Dfntw`DJ#*)%k4MLfiZu9~L#C3d@=?=ji!cFWxlSo&Va^#^;*4d-0I zdC?wVwtI?e#|PG)GkSOmHFRH&bU$R+sm}k(^X4|+Q;bySKU4f*p?G3`5#^g{9^%RQ zvMIP1LW~U;<3IAA4n76@FRv{w;&MaTZy#TPKEMqAegh}y4n9RY51RPlA7lz#E+Bmy z)6Ezjrb4$0Y=HBrn-UzIJK2MMMNYahyv0ayvz_7`eta!kMK}d>OX8#0ua@Ty=i`IZ zRj|Vm_+W8?GaPSN95n9LWrN?1FS4=aHODY74UodP{`iTfZ6@?htCaj z?Xvf)Xh(n$Bf|oBLlZUI$_2MVh*yf=YUP0o#l=r8pjh2DXrnhHM0=x)a%`cn z+7j-RfBwwU${~9bI%=j7TobyX_n9IMm_(@=*aj%A>@T!2{O$#u_li6ueb|q>HGQg? z7MG!)Nv7h@@!zAJ!*-~^ei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4V27Ryj`0K$j(dDs% pwalk(function(add_phone_section, add_fitbit_section, phone_device_id_column, fitbit_device_id_column, ...) { empty_phone <- c("PHONE:", " DEVICE_IDS:", " PLATFORMS:"," LABEL:", " START_DATE:", " END_DATE:") empty_fitbit <- c("FITBIT:", " DEVICE_IDS:", " LABEL:", " START_DATE:", " END_DATE:") + empty_empatica <- c("EMPATICA:", " LABEL:", " START_DATE:", " END_DATE:") row <- tibble(...) lines <- c() start_date = if_else(is.na(row$start_date), "", row$start_date) @@ -70,6 +72,12 @@ participants %>% paste(" LABEL:",row$label), paste(" START_DATE:", start_date), paste(" END_DATE:", end_date))) } else lines <- append(lines, empty_fitbit) + + if(add_empatica_section == TRUE){ + lines <- append(lines, c("EMPATICA:", + paste(" LABEL:",row$label), paste(" START_DATE:", start_date), paste(" END_DATE:", end_date))) + } else + lines <- append(lines, empty_empatica) file_connection <- file(paste0("./data/external/participant_files/", row$pid, ".yaml")) writeLines(lines, file_connection)