From fae0c2ac0501cbfbc2b3f39b91595de6929c6260 Mon Sep 17 00:00:00 2001 From: JulioV Date: Fri, 12 Mar 2021 18:14:49 -0500 Subject: [PATCH] Swap TABLE for CONTAINER --- Snakefile | 2 +- config.yaml | 60 ++++++------ docs/common-errors.md | 2 +- docs/datastreams/add-new-data-streams.md | 6 +- docs/features/add-new-features.md | 2 +- docs/features/empatica-accelerometer.md | 6 +- docs/features/empatica-blood-volume-pulse.md | 6 +- .../empatica-electrodermal-activity.md | 6 +- docs/features/empatica-heartrate.md | 6 +- docs/features/empatica-inter-beat-interval.md | 6 +- docs/features/empatica-tags.md | 2 +- docs/features/empatica-temperature.md | 6 +- docs/features/feature-introduction.md | 4 +- docs/features/fitbit-data-yield.md | 4 +- docs/features/phone-accelerometer.md | 2 +- docs/features/phone-activity-recognition.md | 4 +- docs/features/phone-applications-crashes.md | 2 +- .../features/phone-applications-foreground.md | 2 +- .../phone-applications-notifications.md | 2 +- docs/features/phone-battery.md | 2 +- docs/features/phone-bluetooth.md | 2 +- docs/features/phone-calls.md | 2 +- docs/features/phone-conversation.md | 4 +- docs/features/phone-data-yield.md | 2 +- docs/features/phone-keyboard.md | 2 +- docs/features/phone-light.md | 2 +- docs/features/phone-locations.md | 2 +- docs/features/phone-log.md | 3 +- docs/features/phone-messages.md | 2 +- docs/features/phone-screen.md | 2 +- docs/features/phone-wifi-connected.md | 2 +- docs/features/phone-wifi-visible.md | 2 +- example_profile/example_config.yaml | 42 ++++----- rules/models.smk | 4 +- rules/preprocessing.smk | 4 +- src/data/streams/aware_csv/container.R | 2 +- src/data/streams/aware_mysql/container.R | 2 +- src/data/streams/fitbitjson_csv/container.R | 2 +- src/data/streams/fitbitjson_mysql/container.R | 2 +- src/data/streams/fitbitparsed_csv/container.R | 2 +- .../streams/fitbitparsed_mysql/container.R | 2 +- tests/Snakefile | 2 +- tests/settings/frequency/testing_config.yaml | 48 +++++----- tests/settings/periodic/testing_config.yaml | 48 +++++----- tools/config.schema.yaml | 92 +++++++++---------- 45 files changed, 200 insertions(+), 211 deletions(-) diff --git a/Snakefile b/Snakefile index 862d14f7..346b1803 100644 --- a/Snakefile +++ b/Snakefile @@ -21,7 +21,7 @@ for provider in config["PHONE_DATA_YIELD"]["PROVIDERS"].keys(): if not (set(config["PHONE_DATA_YIELD"]["SENSORS"]) <= set(allowed_phone_sensors)): raise ValueError('\nInvalid sensor(s) for PHONE_DATA_YIELD. config["PHONE_DATA_YIELD"]["SENSORS"] can have ' 'one or more of the following phone sensors: {}.\nInstead you provided "{}".\n' - 'Keep in mind that the sensors\' TABLE attribute must point to a valid database table'\ + 'Keep in mind that the sensors\' CONTAINER attribute must point to a valid database table or file'\ .format(', '.join(allowed_phone_sensors), ', '.join(set(config["PHONE_DATA_YIELD"]["SENSORS"]) - set(allowed_phone_sensors)))) diff --git a/config.yaml b/config.yaml index af48a626..169fc106 100644 --- a/config.yaml +++ b/config.yaml @@ -58,7 +58,7 @@ PHONE_DATA_STREAMS: # https://www.rapids.science/latest/features/phone-accelerometer/ PHONE_ACCELEROMETER: - TABLE: accelerometer + CONTAINER: accelerometer PROVIDERS: RAPIDS: COMPUTE: False @@ -77,7 +77,7 @@ PHONE_ACCELEROMETER: # See https://www.rapids.science/latest/features/phone-activity-recognition/ PHONE_ACTIVITY_RECOGNITION: - TABLE: + CONTAINER: ANDROID: plugin_google_activity_recognition IOS: plugin_ios_activity_recognition EPISODE_THRESHOLD_BETWEEN_ROWS: 5 # minutes. Max time difference for two consecutive rows to be considered within the same AR episode. @@ -94,7 +94,7 @@ PHONE_ACTIVITY_RECOGNITION: # See https://www.rapids.science/latest/features/phone-applications-crashes/ PHONE_APPLICATIONS_CRASHES: - TABLE: applications_crashes + CONTAINER: applications_crashes APPLICATION_CATEGORIES: CATALOGUE_SOURCE: FILE # FILE (genres are read from CATALOGUE_FILE) or GOOGLE (genres are scrapped from the Play Store) CATALOGUE_FILE: "data/external/stachl_application_genre_catalogue.csv" @@ -104,7 +104,7 @@ PHONE_APPLICATIONS_CRASHES: # See https://www.rapids.science/latest/features/phone-applications-foreground/ PHONE_APPLICATIONS_FOREGROUND: - TABLE: applications_foreground + CONTAINER: applications_foreground APPLICATION_CATEGORIES: CATALOGUE_SOURCE: FILE # FILE (genres are read from CATALOGUE_FILE) or GOOGLE (genres are scrapped from the Play Store) CATALOGUE_FILE: "data/external/stachl_application_genre_catalogue.csv" @@ -126,7 +126,7 @@ PHONE_APPLICATIONS_FOREGROUND: # See https://www.rapids.science/latest/features/phone-applications-notifications/ PHONE_APPLICATIONS_NOTIFICATIONS: - TABLE: applications_notifications + CONTAINER: applications_notifications APPLICATION_CATEGORIES: CATALOGUE_SOURCE: FILE # FILE (genres are read from CATALOGUE_FILE) or GOOGLE (genres are scrapped from the Play Store) CATALOGUE_FILE: "data/external/stachl_application_genre_catalogue.csv" @@ -136,7 +136,7 @@ PHONE_APPLICATIONS_NOTIFICATIONS: # See https://www.rapids.science/latest/features/phone-battery/ PHONE_BATTERY: - TABLE: battery + CONTAINER: battery EPISODE_THRESHOLD_BETWEEN_ROWS: 30 # minutes. Max time difference for two consecutive rows to be considered within the same battery episode. PROVIDERS: RAPIDS: @@ -147,7 +147,7 @@ PHONE_BATTERY: # See https://www.rapids.science/latest/features/phone-bluetooth/ PHONE_BLUETOOTH: - TABLE: bluetooth + CONTAINER: bluetooth PROVIDERS: RAPIDS: COMPUTE: False @@ -174,7 +174,7 @@ PHONE_BLUETOOTH: # See https://www.rapids.science/latest/features/phone-calls/ PHONE_CALLS: - TABLE: calls + CONTAINER: calls PROVIDERS: RAPIDS: COMPUTE: False @@ -188,7 +188,7 @@ PHONE_CALLS: # See https://www.rapids.science/latest/features/phone-conversation/ PHONE_CONVERSATION: - TABLE: + CONTAINER: ANDROID: plugin_studentlife_audio_android IOS: plugin_studentlife_audio PROVIDERS: @@ -218,12 +218,12 @@ PHONE_DATA_YIELD: # See https://www.rapids.science/latest/features/phone-keyboard/ PHONE_KEYBOARD: - TABLE: keyboard + CONTAINER: keyboard PROVIDERS: # None implemented yet but this sensor can be used in PHONE_DATA_YIELD # See https://www.rapids.science/latest/features/phone-light/ PHONE_LIGHT: - TABLE: light + CONTAINER: light PROVIDERS: RAPIDS: COMPUTE: False @@ -233,7 +233,7 @@ PHONE_LIGHT: # See https://www.rapids.science/latest/features/phone-locations/ PHONE_LOCATIONS: - TABLE: locations + CONTAINER: locations LOCATIONS_TO_USE: ALL_RESAMPLED # ALL, GPS, ALL_RESAMPLED, OR FUSED_RESAMPLED FUSED_RESAMPLED_CONSECUTIVE_THRESHOLD: 30 # minutes, only replicate location samples to the next sensed bin if the phone did not stop collecting data for more than this threshold FUSED_RESAMPLED_TIME_SINCE_VALID_LOCATION: 720 # minutes, only replicate location samples to consecutive sensed bins if they were logged within this threshold after a valid location row @@ -271,14 +271,14 @@ PHONE_LOCATIONS: # See https://www.rapids.science/latest/features/phone-log/ PHONE_LOG: - TABLE: + CONTAINER: ANDROID: aware_log IOS: ios_aware_log PROVIDERS: # None implemented yet but this sensor can be used in PHONE_DATA_YIELD # See https://www.rapids.science/latest/features/phone-messages/ PHONE_MESSAGES: - TABLE: messages + CONTAINER: messages PROVIDERS: RAPIDS: COMPUTE: False @@ -291,7 +291,7 @@ PHONE_MESSAGES: # See https://www.rapids.science/latest/features/phone-screen/ PHONE_SCREEN: - TABLE: screen + CONTAINER: screen PROVIDERS: RAPIDS: COMPUTE: False @@ -305,7 +305,7 @@ PHONE_SCREEN: # See https://www.rapids.science/latest/features/phone-wifi-connected/ PHONE_WIFI_CONNECTED: - TABLE: "sensor_wifi" + CONTAINER: "sensor_wifi" PROVIDERS: RAPIDS: COMPUTE: False @@ -315,7 +315,7 @@ PHONE_WIFI_CONNECTED: # See https://www.rapids.science/latest/features/phone-wifi-visible/ PHONE_WIFI_VISIBLE: - TABLE: "wifi" + CONTAINER: "wifi" PROVIDERS: RAPIDS: COMPUTE: False @@ -366,7 +366,7 @@ FITBIT_DATA_YIELD: # See https://www.rapids.science/latest/features/fitbit-heartrate-summary/ FITBIT_HEARTRATE_SUMMARY: - TABLE: heartrate_summary + CONTAINER: heartrate_summary PROVIDERS: RAPIDS: COMPUTE: False @@ -376,7 +376,7 @@ FITBIT_HEARTRATE_SUMMARY: # See https://www.rapids.science/latest/features/fitbit-heartrate-intraday/ FITBIT_HEARTRATE_INTRADAY: - TABLE: heartrate_intraday + CONTAINER: heartrate_intraday PROVIDERS: RAPIDS: COMPUTE: False @@ -386,7 +386,7 @@ FITBIT_HEARTRATE_INTRADAY: # See https://www.rapids.science/latest/features/fitbit-sleep-summary/ FITBIT_SLEEP_SUMMARY: - TABLE: sleep_summary + CONTAINER: sleep_summary PROVIDERS: RAPIDS: COMPUTE: False @@ -397,7 +397,7 @@ FITBIT_SLEEP_SUMMARY: # See https://www.rapids.science/latest/features/fitbit-sleep-intraday/ FITBIT_SLEEP_INTRADAY: - TABLE: sleep_intraday + CONTAINER: sleep_intraday PROVIDERS: RAPIDS: COMPUTE: False @@ -433,7 +433,7 @@ FITBIT_SLEEP_INTRADAY: # See https://www.rapids.science/latest/features/fitbit-steps-summary/ FITBIT_STEPS_SUMMARY: - TABLE: steps_summary + CONTAINER: steps_summary PROVIDERS: RAPIDS: COMPUTE: False @@ -443,7 +443,7 @@ FITBIT_STEPS_SUMMARY: # See https://www.rapids.science/latest/features/fitbit-steps-intraday/ FITBIT_STEPS_INTRADAY: - TABLE: steps_intraday + CONTAINER: steps_intraday PROVIDERS: RAPIDS: COMPUTE: False @@ -471,7 +471,7 @@ EMPATICA_DATA_STREAMS: # See https://www.rapids.science/latest/features/empatica-accelerometer/ EMPATICA_ACCELEROMETER: - TABLE: ACC + CONTAINER: ACC PROVIDERS: DBDP: COMPUTE: False @@ -481,7 +481,7 @@ EMPATICA_ACCELEROMETER: # See https://www.rapids.science/latest/features/empatica-heartrate/ EMPATICA_HEARTRATE: - TABLE: HR + CONTAINER: HR PROVIDERS: DBDP: COMPUTE: False @@ -491,7 +491,7 @@ EMPATICA_HEARTRATE: # See https://www.rapids.science/latest/features/empatica-temperature/ EMPATICA_TEMPERATURE: - TABLE: TEMP + CONTAINER: TEMP PROVIDERS: DBDP: COMPUTE: False @@ -501,7 +501,7 @@ EMPATICA_TEMPERATURE: # See https://www.rapids.science/latest/features/empatica-electrodermal-activity/ EMPATICA_ELECTRODERMAL_ACTIVITY: - TABLE: EDA + CONTAINER: EDA PROVIDERS: DBDP: COMPUTE: False @@ -511,7 +511,7 @@ EMPATICA_ELECTRODERMAL_ACTIVITY: # See https://www.rapids.science/latest/features/empatica-blood-volume-pulse/ EMPATICA_BLOOD_VOLUME_PULSE: - TABLE: BVP + CONTAINER: BVP PROVIDERS: DBDP: COMPUTE: False @@ -521,7 +521,7 @@ EMPATICA_BLOOD_VOLUME_PULSE: # See https://www.rapids.science/latest/features/empatica-inter-beat-interval/ EMPATICA_INTER_BEAT_INTERVAL: - TABLE: IBI + CONTAINER: IBI PROVIDERS: DBDP: COMPUTE: False @@ -531,7 +531,7 @@ EMPATICA_INTER_BEAT_INTERVAL: # See https://www.rapids.science/latest/features/empatica-tags/ EMPATICA_TAGS: - TABLE: TAGS + CONTAINER: TAGS PROVIDERS: # None implemented yet diff --git a/docs/common-errors.md b/docs/common-errors.md index 75773ee5..2082484f 100644 --- a/docs/common-errors.md +++ b/docs/common-errors.md @@ -58,7 +58,7 @@ ``` ???+ done "Solution" - Please make sure the sensors listed in `[PHONE_VALID_SENSED_BINS][PHONE_SENSORS]` and the `[TABLE]` of each sensor you activated in `config.yaml` match your database tables. + Please make sure the sensors listed in `[PHONE_VALID_SENSED_BINS][PHONE_SENSORS]` and the `[CONTAINER]` of each sensor you activated in `config.yaml` match your database tables or files. --- ## How do I install RAPIDS on Ubuntu 16.04 diff --git a/docs/datastreams/add-new-data-streams.md b/docs/datastreams/add-new-data-streams.md index b96e7eb2..fa49d0eb 100644 --- a/docs/datastreams/add-new-data-streams.md +++ b/docs/datastreams/add-new-data-streams.md @@ -6,14 +6,14 @@ A data stream is a set of sensor data collected using a specific type of **devic **A format** is described using a `format.yaml` file that specifies how to map and mutate your stream's raw data to match the data and format RAPIDS needs. -Both the `container.[R|py]` and the `format.yaml` are saved under `src/data/streams/[stream_name]` where `[stream_name]` can be -`aware_mysql` for example. - The most common cases when you would want to implement a new data stream are: - You collected data with a mobile sensing app RAPIDS does not support yet. For example, [Beiwe](https://www.beiwe.org/) data stored in MySQL. You will need to define a new format file and a new container script. - You collected data with a mobile sensing app RAPIDS supports, but this data is stored in a container that RAPIDS can't connect to yet. For example, AWARE data stored in PostgreSQL. In this case, you can reuse the format file of the `aware_mysql` stream, but you will need to implement a new container script. +!!! hint + Both the `container.[R|py]` and the `format.yaml` are stored in `./src/data/streams/[stream_name]` where `[stream_name]` can be `aware_mysql` for example. + ## Implement a Container The `container` script of a data stream can be implemented in R (strongly recommended) or python. This script must have two functions if you are implementing a stream for phone data or one function otherwise. The script can contain other auxiliary functions. diff --git a/docs/features/add-new-features.md b/docs/features/add-new-features.md index 889e0a7e..6ea0c20f 100644 --- a/docs/features/add-new-features.md +++ b/docs/features/add-new-features.md @@ -67,7 +67,7 @@ In this step you need to add your provider configuration section under the relev ??? example "Example configuration for a new accelerometer provider `VEGA`" ```yaml PHONE_ACCELEROMETER: - TABLE: accelerometer + CONTAINER: accelerometer PROVIDERS: RAPIDS: COMPUTE: False diff --git a/docs/features/empatica-accelerometer.md b/docs/features/empatica-accelerometer.md index 099e33fc..197fcec5 100644 --- a/docs/features/empatica-accelerometer.md +++ b/docs/features/empatica-accelerometer.md @@ -4,7 +4,7 @@ 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. +|`[CONTAINER]`| 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 @@ -13,9 +13,7 @@ Sensor parameters description for `[EMPATICA_ACCELEROMETER]`: !!! 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_raw.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 diff --git a/docs/features/empatica-blood-volume-pulse.md b/docs/features/empatica-blood-volume-pulse.md index 1ad51c0a..30a3bcff 100644 --- a/docs/features/empatica-blood-volume-pulse.md +++ b/docs/features/empatica-blood-volume-pulse.md @@ -4,7 +4,7 @@ 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. +|`[CONTAINER]`| 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 @@ -13,9 +13,7 @@ Sensor parameters description for `[EMPATICA_BLOOD_VOLUME_PULSE]`: !!! 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_raw.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 diff --git a/docs/features/empatica-electrodermal-activity.md b/docs/features/empatica-electrodermal-activity.md index a521a222..97738f41 100644 --- a/docs/features/empatica-electrodermal-activity.md +++ b/docs/features/empatica-electrodermal-activity.md @@ -4,7 +4,7 @@ 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. +|`[CONTAINER]`| 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 @@ -13,9 +13,7 @@ Sensor parameters description for `[EMPATICA_ELECTRODERMAL_ACTIVITY]`: !!! 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_raw.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 diff --git a/docs/features/empatica-heartrate.md b/docs/features/empatica-heartrate.md index 06960c6b..0f985b57 100644 --- a/docs/features/empatica-heartrate.md +++ b/docs/features/empatica-heartrate.md @@ -4,7 +4,7 @@ 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. +|`[CONTAINER]`| 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 @@ -13,9 +13,7 @@ Sensor parameters description for `[EMPATICA_HEARTRATE]`: !!! 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_raw.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 diff --git a/docs/features/empatica-inter-beat-interval.md b/docs/features/empatica-inter-beat-interval.md index e4bfa5bb..d3a799db 100644 --- a/docs/features/empatica-inter-beat-interval.md +++ b/docs/features/empatica-inter-beat-interval.md @@ -4,7 +4,7 @@ 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. +|`[CONTAINER]`| 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 @@ -13,9 +13,7 @@ Sensor parameters description for `[EMPATICA_INTER_BEAT_INTERVAL]`: !!! 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_raw.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 diff --git a/docs/features/empatica-tags.md b/docs/features/empatica-tags.md index 227a4417..a9244b4e 100644 --- a/docs/features/empatica-tags.md +++ b/docs/features/empatica-tags.md @@ -4,7 +4,7 @@ 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. +|`[CONTAINER]`| 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). diff --git a/docs/features/empatica-temperature.md b/docs/features/empatica-temperature.md index 3e341f5d..eaf5e004 100644 --- a/docs/features/empatica-temperature.md +++ b/docs/features/empatica-temperature.md @@ -4,7 +4,7 @@ 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. +|`[CONTAINER]`| 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 @@ -13,9 +13,7 @@ Sensor parameters description for `[EMPATICA_TEMPERATURE]`: !!! 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_raw.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 diff --git a/docs/features/feature-introduction.md b/docs/features/feature-introduction.md index 98602447..3ee36fd7 100644 --- a/docs/features/feature-introduction.md +++ b/docs/features/feature-introduction.md @@ -14,7 +14,7 @@ Every device sensor has a corresponding config section in `config.yaml`, these s # 1) Config section PHONE_ACCELEROMETER: # 2) Parameters for PHONE_ACCELEROMETER - TABLE: accelerometer + CONTAINER: accelerometer # 3) Providers for PHONE_ACCELEROMETER PROVIDERS: @@ -41,7 +41,7 @@ Every device sensor has a corresponding config section in `config.yaml`, these s ``` ## Sensor Parameters -Each sensor configuration section has a "parameters" subsection (see `#2` in the example). These are parameters that affect different aspects of how the raw data is downloaded, and processed. The `TABLE` parameter exists for every sensor, but some sensors will have extra parameters like [`[PHONE_LOCATIONS]`](../phone-locations/). We explain these parameters in a table at the top of each sensor documentation page. +Each sensor configuration section has a "parameters" subsection (see `#2` in the example). These are parameters that affect different aspects of how the raw data is downloaded, and processed. The `CONTAINER` parameter exists for every sensor, but some sensors will have extra parameters like [`[PHONE_LOCATIONS]`](../phone-locations/). We explain these parameters in a table at the top of each sensor documentation page. ## Sensor Providers Each sensor configuration section can have zero, one or more behavioral feature **providers** (see `#3` in the example). A provider is a script created by the core RAPIDS team or other researchers that extracts behavioral features for that sensor. In this example, accelerometer has two providers: RAPIDS (see `#4`) and PANDA (see `#5`). diff --git a/docs/features/fitbit-data-yield.md b/docs/features/fitbit-data-yield.md index 0f0751d1..420829e4 100644 --- a/docs/features/fitbit-data-yield.md +++ b/docs/features/fitbit-data-yield.md @@ -1,6 +1,6 @@ # Fitbit Data Yield -We use Fitbit heart rate intraday data to extract data yield features. Fitbit data yield features can be used to remove rows ([time segments](../../setup/configuration/#time-segments)) that do not contain enough Fitbit data. You should decide what is your "enough" threshold depending on the time a participant was supposed to be wearing their Fitbit, the length of your study, and the rates of missing data that your analysis could handle. +We use Fitbit **heart rate intraday** data to extract data yield features. Fitbit data yield features can be used to remove rows ([time segments](../../setup/configuration/#time-segments)) that do not contain enough Fitbit data. You should decide what is your "enough" threshold depending on the time a participant was supposed to be wearing their Fitbit, the length of your study, and the rates of missing data that your analysis could handle. !!! hint "Why is Fitbit data yield important?" Imagine that you want to extract `FITBIT_STEPS_SUMMARY` features on daily segments (`00:00` to `23:59`). Let's say that on day 1 the Fitbit logged 6k as the total step count and the heart rate sensor logged 24 hours of data and on day 2 the Fitbit logged 101 as the total step count and the heart rate sensor logged 2 hours of data. It’s very likely that on day 2 you walked during the other 22 hours so including this day in your analysis could bias your results. @@ -8,7 +8,7 @@ Sensor parameters description for `[FITBIT_DATA_YIELD]`: |Key                    | Description | |----------------|----------------------------------------------------------------------------------------------------------------------------------- -|`[SENSORS]`| The Fitbit sensor we considered for calculating the Fitbit data yield features. +|`[SENSORS]`| The Fitbit sensor we considered for calculating the Fitbit data yield features. We only support `FITBIT_HEARTRATE_INTRADAY` since sleep data is commonly collected only overnight, and step counts are 0 even when not wearing the Fitbit device. ## RAPIDS provider diff --git a/docs/features/phone-accelerometer.md b/docs/features/phone-accelerometer.md index 64a43380..560d2454 100644 --- a/docs/features/phone-accelerometer.md +++ b/docs/features/phone-accelerometer.md @@ -4,7 +4,7 @@ Sensor parameters description for `[PHONE_ACCELEROMETER]`: |Key                              | Description | |----------------|----------------------------------------------------------------------------------------------------------------------------------- -|`[TABLE]`| Database table where the accelerometer data is stored +|`[CONTAINER]`| Data stream [container](../../datastreams/data-streams-introduction/) (database table, CSV file, etc.) where the accelerometer data is stored ## RAPIDS provider diff --git a/docs/features/phone-activity-recognition.md b/docs/features/phone-activity-recognition.md index e28d11ab..6831a462 100644 --- a/docs/features/phone-activity-recognition.md +++ b/docs/features/phone-activity-recognition.md @@ -4,8 +4,8 @@ Sensor parameters description for `[PHONE_ACTIVITY_RECOGNITION]`: |Key                                                               | Description | |----------------|----------------------------------------------------------------------------------------------------------------------------------- -|`[TABLE][ANDROID]`| Database table where the activity data from Android devices is stored (the AWARE client saves this data on different tables for Android and iOS) -|`[TABLE][IOS]`| Database table where the activity data from iOS devices is stored (the AWARE client saves this data on different tables for Android and iOS) +|`[CONTAINER][ANDROID]`| Data stream [container](../../datastreams/data-streams-introduction/) (database table, CSV file, etc.) where the activity data from Android devices is stored (the AWARE client saves this data on different tables for Android and iOS) +|`[CONTAINER][IOS]`| Data stream [container](../../datastreams/data-streams-introduction/) (database table, CSV file, etc.) where the activity data from iOS devices is stored (the AWARE client saves this data on different tables for Android and iOS) |`[EPISODE_THRESHOLD_BETWEEN_ROWS]` | Difference in minutes between any two rows for them to be considered part of the same activity episode ## RAPIDS provider diff --git a/docs/features/phone-applications-crashes.md b/docs/features/phone-applications-crashes.md index dcf4cd38..8456a78a 100644 --- a/docs/features/phone-applications-crashes.md +++ b/docs/features/phone-applications-crashes.md @@ -4,7 +4,7 @@ Sensor parameters description for `[PHONE_APPLICATIONS_CRASHES]`: |Key                              | Description | |----------------|----------------------------------------------------------------------------------------------------------------------------------- -|`[TABLE]`| Database table where the applications crashes data is stored +|`[CONTAINER]`| Data stream [container](../../datastreams/data-streams-introduction/) (database table, CSV file, etc.) where the applications crashes data is stored |`[APPLICATION_CATEGORIES][CATALOGUE_SOURCE]` | `FILE` or `GOOGLE`. If `FILE`, app categories (genres) are read from `[CATALOGUE_FILE]`. If `[GOOGLE]`, app categories (genres) are scrapped from the Play Store |`[APPLICATION_CATEGORIES][CATALOGUE_FILE]` | CSV file with a `package_name` and `genre` column. By default we provide the catalogue created by [Stachl et al](../../citation#stachl-applications-crashes) in `data/external/stachl_application_genre_catalogue.csv` |`[APPLICATION_CATEGORIES][UPDATE_CATALOGUE_FILE]` | if `[CATALOGUE_SOURCE]` is equal to `FILE`, this flag signals whether or not to update `[CATALOGUE_FILE]`, if `[CATALOGUE_SOURCE]` is equal to `GOOGLE` all scraped genres will be saved to `[CATALOGUE_FILE]` diff --git a/docs/features/phone-applications-foreground.md b/docs/features/phone-applications-foreground.md index 53f1aed0..f6ab97d0 100644 --- a/docs/features/phone-applications-foreground.md +++ b/docs/features/phone-applications-foreground.md @@ -4,7 +4,7 @@ Sensor parameters description for `[PHONE_APPLICATIONS_FOREGROUND]` (these param |Key                              | Description | |----------------|----------------------------------------------------------------------------------------------------------------------------------- -|`[TABLE]`| Database table where the applications foreground data is stored +|`[CONTAINER]`| Data stream [container](../../datastreams/data-streams-introduction/) (database table, CSV file, etc.) where the applications foreground data is stored |`[APPLICATION_CATEGORIES][CATALOGUE_SOURCE]` | `FILE` or `GOOGLE`. If `FILE`, app categories (genres) are read from `[CATALOGUE_FILE]`. If `[GOOGLE]`, app categories (genres) are scrapped from the Play Store |`[APPLICATION_CATEGORIES][CATALOGUE_FILE]` | CSV file with a `package_name` and `genre` column. By default we provide the catalogue created by [Stachl et al](../../citation#stachl-applications-foreground) in `data/external/stachl_application_genre_catalogue.csv` |`[APPLICATION_CATEGORIES][UPDATE_CATALOGUE_FILE]` | if `[CATALOGUE_SOURCE]` is equal to `FILE`, this flag signals whether or not to update `[CATALOGUE_FILE]`, if `[CATALOGUE_SOURCE]` is equal to `GOOGLE` all scraped genres will be saved to `[CATALOGUE_FILE]` diff --git a/docs/features/phone-applications-notifications.md b/docs/features/phone-applications-notifications.md index b32afde7..a8e7e66b 100644 --- a/docs/features/phone-applications-notifications.md +++ b/docs/features/phone-applications-notifications.md @@ -4,7 +4,7 @@ Sensor parameters description for `[PHONE_APPLICATIONS_NOTIFICATIONS]`: |Key                              | Description | |----------------|----------------------------------------------------------------------------------------------------------------------------------- -|`[TABLE]`| Database table where the applications notifications data is stored +|`[CONTAINER]`| Data stream [container](../../datastreams/data-streams-introduction/) (database table, CSV file, etc.) where the applications notifications data is stored |`[APPLICATION_CATEGORIES][CATALOGUE_SOURCE]` | `FILE` or `GOOGLE`. If `FILE`, app categories (genres) are read from `[CATALOGUE_FILE]`. If `[GOOGLE]`, app categories (genres) are scrapped from the Play Store |`[APPLICATION_CATEGORIES][CATALOGUE_FILE]` | CSV file with a `package_name` and `genre` column. By default we provide the catalogue created by [Stachl et al](../../citation#stachl-applications-notifications) in `data/external/stachl_application_genre_catalogue.csv` |`[APPLICATION_CATEGORIES][UPDATE_CATALOGUE_FILE]` | if `[CATALOGUE_SOURCE]` is equal to `FILE`, this flag signals whether or not to update `[CATALOGUE_FILE]`, if `[CATALOGUE_SOURCE]` is equal to `GOOGLE` all scraped genres will be saved to `[CATALOGUE_FILE]` diff --git a/docs/features/phone-battery.md b/docs/features/phone-battery.md index 8b791537..56895500 100644 --- a/docs/features/phone-battery.md +++ b/docs/features/phone-battery.md @@ -4,7 +4,7 @@ Sensor parameters description for `[PHONE_BATTERY]`: |Key                                                               | Description | |----------------|----------------------------------------------------------------------------------------------------------------------------------- -|`[TABLE]`| Database table where the battery data is stored +|`[CONTAINER]`| Data stream [container](../../datastreams/data-streams-introduction/) (database table, CSV file, etc.) where the battery data is stored |`[EPISODE_THRESHOLD_BETWEEN_ROWS]` | Difference in minutes between any two rows for them to be considered part of the same battery charge or discharge episode ## RAPIDS provider diff --git a/docs/features/phone-bluetooth.md b/docs/features/phone-bluetooth.md index 765676e3..d55483f8 100644 --- a/docs/features/phone-bluetooth.md +++ b/docs/features/phone-bluetooth.md @@ -4,7 +4,7 @@ Sensor parameters description for `[PHONE_BLUETOOTH]`: |Key                              | Description | |----------------|----------------------------------------------------------------------------------------------------------------------------------- -|`[TABLE]`| Database table where the bluetooth data is stored +|`[CONTAINER]`| Data stream [container](../../datastreams/data-streams-introduction/) (database table, CSV file, etc.) where the bluetooth data is stored ## RAPIDS provider diff --git a/docs/features/phone-calls.md b/docs/features/phone-calls.md index 64b57e81..a29ce345 100644 --- a/docs/features/phone-calls.md +++ b/docs/features/phone-calls.md @@ -4,7 +4,7 @@ Sensor parameters description for `[PHONE_CALLS]`: |Key                              | Description | |----------------|----------------------------------------------------------------------------------------------------------------------------------- -|`[TABLE]`| Database table where the calls data is stored +|`[CONTAINER]`| Data stream [container](../../datastreams/data-streams-introduction/) (database table, CSV file, etc.) where the calls data is stored ## RAPIDS Provider diff --git a/docs/features/phone-conversation.md b/docs/features/phone-conversation.md index 330fa0c8..064fc144 100644 --- a/docs/features/phone-conversation.md +++ b/docs/features/phone-conversation.md @@ -4,8 +4,8 @@ Sensor parameters description for `[PHONE_CONVERSATION]`: |Key                              | Description | |----------------|----------------------------------------------------------------------------------------------------------------------------------- -|`[TABLE][ANDROID]`| Database table where the conversation data from Android devices is stored (the AWARE client saves this data on different tables for Android and iOS) -|`[TABLE][IOS]`| Database table where the conversation data from iOS devices is stored (the AWARE client saves this data on different tables for Android and iOS) +|`[CONTAINER][ANDROID]`| Data stream [container](../../datastreams/data-streams-introduction/) (database table, CSV file, etc.) where the conversation data from Android devices is stored (the AWARE client saves this data on different tables for Android and iOS) +|`[CONTAINER][IOS]`| Data stream [container](../../datastreams/data-streams-introduction/) (database table, CSV file, etc.) where the conversation data from iOS devices is stored (the AWARE client saves this data on different tables for Android and iOS) ## RAPIDS provider diff --git a/docs/features/phone-data-yield.md b/docs/features/phone-data-yield.md index dc5d3ee0..1a91f587 100644 --- a/docs/features/phone-data-yield.md +++ b/docs/features/phone-data-yield.md @@ -22,11 +22,11 @@ Sensor parameters description for `[PHONE_DATA_YIELD]`: PHONE_BLUETOOTH PHONE_CALLS PHONE_CONVERSATION - PHONE_MESSAGES PHONE_KEYBOARD PHONE_LIGHT PHONE_LOCATIONS PHONE_LOG + PHONE_MESSAGES PHONE_SCREEN PHONE_WIFI_CONNECTED PHONE_WIFI_VISIBLE diff --git a/docs/features/phone-keyboard.md b/docs/features/phone-keyboard.md index 4aba2c62..105d8a20 100644 --- a/docs/features/phone-keyboard.md +++ b/docs/features/phone-keyboard.md @@ -4,7 +4,7 @@ Sensor parameters description for `[PHONE_KEYBOARD]`: |Key                              | Description | |----------------|----------------------------------------------------------------------------------------------------------------------------------- -|`[TABLE]`| Database table where the keyboard data is stored +|`[CONTAINER]`| Data stream [container](../../datastreams/data-streams-introduction/) (database table, CSV file, etc.) where the keyboard data is stored !!! note No feature providers have been implemented for this sensor yet, however you can use its key (`PHONE_KEYBOARD`) to improve [`PHONE_DATA_YIELD`](../phone-data-yield) or you can [implement your own features](../add-new-features). \ No newline at end of file diff --git a/docs/features/phone-light.md b/docs/features/phone-light.md index e44b81e8..3372bf79 100644 --- a/docs/features/phone-light.md +++ b/docs/features/phone-light.md @@ -4,7 +4,7 @@ Sensor parameters description for `[PHONE_LIGHT]`: |Key                              | Description | |----------------|----------------------------------------------------------------------------------------------------------------------------------- -|`[TABLE]`| Database table where the light data is stored +|`[CONTAINER]`| Data stream [container](../../datastreams/data-streams-introduction/) (database table, CSV file, etc.) where the light data is stored ## RAPIDS provider diff --git a/docs/features/phone-locations.md b/docs/features/phone-locations.md index e1962183..eeb34a82 100644 --- a/docs/features/phone-locations.md +++ b/docs/features/phone-locations.md @@ -4,7 +4,7 @@ Sensor parameters description for `[PHONE_LOCATIONS]`: |Key                                                                                        | Description | |----------------|----------------------------------------------------------------------------------------------------------------------------------- -|`[TABLE]`| Database table where the location data is stored +|`[CONTAINER]`| Data stream [container](../../datastreams/data-streams-introduction/) (database table, CSV file, etc.) where the location data is stored |`[LOCATIONS_TO_USE]`| Type of location data to use, one of `ALL`, `GPS`, `ALL_RESAMPLED` or `FUSED_RESAMPLED`. This filter is based on the `provider` column of the locations table, `ALL` includes every row, `GPS` only includes rows where the provider is gps, `ALL_RESAMPLED` includes all rows after being resampled, and `FUSED_RESAMPLED` only includes rows where the provider is fused after being resampled. |`[FUSED_RESAMPLED_CONSECUTIVE_THRESHOLD]`| if `ALL_RESAMPLED` or `FUSED_RESAMPLED` is used, the original fused data has to be resampled, a location row is resampled to the next valid timestamp (see the Assumptions/Observations below) only if the time difference between them is less or equal than this threshold (in minutes). |`[FUSED_RESAMPLED_TIME_SINCE_VALID_LOCATION]`| if `ALL_RESAMPLED` or `FUSED_RESAMPLED` is used, the original fused data has to be resampled, a location row is resampled at most for this long (in minutes) diff --git a/docs/features/phone-log.md b/docs/features/phone-log.md index 6c26f2f6..de5fa966 100644 --- a/docs/features/phone-log.md +++ b/docs/features/phone-log.md @@ -4,7 +4,8 @@ Sensor parameters description for `[PHONE_LOG]`: |Key                              | Description | |----------------|----------------------------------------------------------------------------------------------------------------------------------- -|`[TABLE]`| Database table where the aware data is stored +|`[CONTAINER][ANDROID]`| Data stream [container](../../datastreams/data-streams-introduction/) (database table, CSV file, etc.) where a data log is stored for Android devices +|`[CONTAINER][IOS]`| Data stream [container](../../datastreams/data-streams-introduction/) (database table, CSV file, etc.) where a data log is stored for iOS devices !!! note No feature providers have been implemented for this sensor yet, however you can use its key (`PHONE_LOG`) to improve [`PHONE_DATA_YIELD`](../phone-data-yield) or you can [implement your own features](../add-new-features). \ No newline at end of file diff --git a/docs/features/phone-messages.md b/docs/features/phone-messages.md index 2c3d3108..d17c2224 100644 --- a/docs/features/phone-messages.md +++ b/docs/features/phone-messages.md @@ -4,7 +4,7 @@ Sensor parameters description for `[PHONE_MESSAGES]`: |Key                              | Description | |----------------|----------------------------------------------------------------------------------------------------------------------------------- -|`[TABLE]`| Database table where the messages data is stored +|`[CONTAINER]`| Data stream [container](../../datastreams/data-streams-introduction/) (database table, CSV file, etc.) where the messages data is stored ## RAPIDS provider diff --git a/docs/features/phone-screen.md b/docs/features/phone-screen.md index 96cee1bd..b4a8effb 100644 --- a/docs/features/phone-screen.md +++ b/docs/features/phone-screen.md @@ -4,7 +4,7 @@ Sensor parameters description for `[PHONE_SCREEN]`: |Key                              | Description | |----------------|----------------------------------------------------------------------------------------------------------------------------------- -|`[TABLE]`| Database table where the screen data is stored +|`[CONTAINER]`| Data stream [container](../../datastreams/data-streams-introduction/) (database table, CSV file, etc.) where the screen data is stored ## RAPIDS provider diff --git a/docs/features/phone-wifi-connected.md b/docs/features/phone-wifi-connected.md index 537bfd44..92ccea26 100644 --- a/docs/features/phone-wifi-connected.md +++ b/docs/features/phone-wifi-connected.md @@ -4,7 +4,7 @@ Sensor parameters description for `[PHONE_WIFI_CONNECTED]`: |Key                              | Description | |----------------|----------------------------------------------------------------------------------------------------------------------------------- -|`[TABLE]`| Database table where the wifi (connected) data is stored +|`[CONTAINER]`| Data stream [container](../../datastreams/data-streams-introduction/) (database table, CSV file, etc.) where the wifi (connected) data is stored ## RAPIDS provider diff --git a/docs/features/phone-wifi-visible.md b/docs/features/phone-wifi-visible.md index 60786e07..02a89f65 100644 --- a/docs/features/phone-wifi-visible.md +++ b/docs/features/phone-wifi-visible.md @@ -4,7 +4,7 @@ Sensor parameters description for `[PHONE_WIFI_VISIBLE]`: |Key                              | Description | |----------------|----------------------------------------------------------------------------------------------------------------------------------- -|`[TABLE]`| Database table where the wifi (visible) data is stored +|`[CONTAINER]`| Data stream [container](../../datastreams/data-streams-introduction/) (database table, CSV file, etc.) where the wifi (visible) data is stored ## RAPIDS provider diff --git a/example_profile/example_config.yaml b/example_profile/example_config.yaml index 7376d515..25aa5863 100644 --- a/example_profile/example_config.yaml +++ b/example_profile/example_config.yaml @@ -50,7 +50,7 @@ PHONE_DATA_CONFIGURATION: # Sensors ------ PHONE_ACCELEROMETER: - TABLE: accelerometer + CONTAINER: accelerometer PROVIDERS: RAPIDS: COMPUTE: False @@ -68,7 +68,7 @@ PHONE_ACCELEROMETER: SRC_LANGUAGE: "python" PHONE_ACTIVITY_RECOGNITION: - TABLE: + CONTAINER: ANDROID: plugin_google_activity_recognition IOS: plugin_ios_activity_recognition EPISODE_THRESHOLD_BETWEEN_ROWS: 5 # minutes. Max time difference for two consecutive rows to be considered within the same battery episode. @@ -84,7 +84,7 @@ PHONE_ACTIVITY_RECOGNITION: SRC_LANGUAGE: "python" PHONE_APPLICATIONS_FOREGROUND: - TABLE: applications_foreground + CONTAINER: applications_foreground APPLICATION_CATEGORIES: CATALOGUE_SOURCE: FILE # FILE (genres are read from CATALOGUE_FILE) or GOOGLE (genres are scrapped from the Play Store) CATALOGUE_FILE: "data/external/stachl_application_genre_catalogue.csv" @@ -105,7 +105,7 @@ PHONE_APPLICATIONS_FOREGROUND: SRC_LANGUAGE: "python" PHONE_BATTERY: - TABLE: battery + CONTAINER: battery EPISODE_THRESHOLD_BETWEEN_ROWS: 30 # minutes. Max time difference for two consecutive rows to be considered within the same battery episode. PROVIDERS: RAPIDS: @@ -115,7 +115,7 @@ PHONE_BATTERY: SRC_LANGUAGE: "python" PHONE_BLUETOOTH: - TABLE: bluetooth + CONTAINER: bluetooth PROVIDERS: RAPIDS: COMPUTE: True @@ -124,7 +124,7 @@ PHONE_BLUETOOTH: SRC_LANGUAGE: "r" PHONE_CALLS: - TABLE: calls + CONTAINER: calls PROVIDERS: RAPIDS: COMPUTE: True @@ -137,7 +137,7 @@ PHONE_CALLS: SRC_FOLDER: "rapids" # inside src/features/phone_calls PHONE_CONVERSATION: - TABLE: + CONTAINER: ANDROID: plugin_studentlife_audio_android IOS: plugin_studentlife_audio PROVIDERS: @@ -165,7 +165,7 @@ PHONE_DATA_YIELD: SRC_FOLDER: "rapids" # inside src/features/phone_data_yield PHONE_LIGHT: - TABLE: light + CONTAINER: light PROVIDERS: RAPIDS: COMPUTE: True @@ -174,7 +174,7 @@ PHONE_LIGHT: SRC_LANGUAGE: "python" PHONE_LOCATIONS: - TABLE: locations + CONTAINER: locations LOCATIONS_TO_USE: FUSED_RESAMPLED # ALL, GPS OR FUSED_RESAMPLED FUSED_RESAMPLED_CONSECUTIVE_THRESHOLD: 30 # minutes, only replicate location samples to the next sensed bin if the phone did not stop collecting data for more than this threshold FUSED_RESAMPLED_TIME_SINCE_VALID_LOCATION: 720 # minutes, only replicate location samples to consecutive sensed bins if they were logged within this threshold after a valid location row @@ -201,7 +201,7 @@ PHONE_LOCATIONS: SRC_LANGUAGE: "r" PHONE_MESSAGES: - TABLE: messages + CONTAINER: messages PROVIDERS: RAPIDS: COMPUTE: True @@ -213,7 +213,7 @@ PHONE_MESSAGES: SRC_FOLDER: "rapids" # inside src/features/phone_messages PHONE_SCREEN: - TABLE: screen + CONTAINER: screen PROVIDERS: RAPIDS: COMPUTE: True @@ -226,7 +226,7 @@ PHONE_SCREEN: SRC_LANGUAGE: "python" PHONE_WIFI_CONNECTED: - TABLE: "sensor_wifi" + CONTAINER: "sensor_wifi" PROVIDERS: RAPIDS: COMPUTE: True @@ -235,7 +235,7 @@ PHONE_WIFI_CONNECTED: SRC_LANGUAGE: "r" PHONE_WIFI_VISIBLE: - TABLE: "wifi" + CONTAINER: "wifi" PROVIDERS: RAPIDS: COMPUTE: True @@ -252,7 +252,7 @@ PHONE_WIFI_VISIBLE: # See https://www.rapids.science/latest/setup/configuration/#device-data-source-configuration FITBIT_DATA_CONFIGURATION: SOURCE: - TYPE: DATABASE # DATABASE or FILES (set each [FITBIT_SENSOR][TABLE] attribute with a table name or a file path accordingly) + TYPE: DATABASE # DATABASE or FILES (set each [FITBIT_SENSOR][CONTAINER] attribute with a table name or a file path accordingly) COLUMN_FORMAT: JSON # JSON or PLAIN_TEXT DATABASE_GROUP: *database_group DEVICE_ID_COLUMN: device_id # column name @@ -263,7 +263,7 @@ FITBIT_DATA_CONFIGURATION: SINGLE_FITBIT_TABLE: TRUE FITBIT_HEARTRATE_SUMMARY: - TABLE: fitbit_data + CONTAINER: fitbit_data PROVIDERS: RAPIDS: COMPUTE: True @@ -272,7 +272,7 @@ FITBIT_HEARTRATE_SUMMARY: SRC_LANGUAGE: "python" FITBIT_HEARTRATE_INTRADAY: - TABLE: fitbit_data + CONTAINER: fitbit_data PROVIDERS: RAPIDS: COMPUTE: True @@ -281,7 +281,7 @@ FITBIT_HEARTRATE_INTRADAY: SRC_LANGUAGE: "python" FITBIT_SLEEP_SUMMARY: - TABLE: fitbit_data + CONTAINER: fitbit_data SLEEP_EPISODE_TIMESTAMP: end # summary sleep episodes are considered as events based on either the start timestamp or end timestamp. PROVIDERS: RAPIDS: @@ -292,7 +292,7 @@ FITBIT_SLEEP_SUMMARY: SRC_LANGUAGE: "python" FITBIT_STEPS_SUMMARY: - TABLE: fitbit_data + CONTAINER: fitbit_data PROVIDERS: RAPIDS: COMPUTE: True @@ -301,7 +301,7 @@ FITBIT_STEPS_SUMMARY: SRC_LANGUAGE: "python" FITBIT_STEPS_INTRADAY: - TABLE: fitbit_data + CONTAINER: fitbit_data PROVIDERS: RAPIDS: COMPUTE: True @@ -349,7 +349,7 @@ PARAMS_FOR_ANALYSIS: CATEGORICAL_OPERATORS: [mostcommon] DEMOGRAPHIC: - TABLE: participant_info + CONTAINER: participant_info FEATURES: [age, gender, inpatientdays] CATEGORICAL_FEATURES: [gender] SOURCE: @@ -357,7 +357,7 @@ PARAMS_FOR_ANALYSIS: TIMEZONE: *timezone TARGET: - TABLE: participant_target + CONTAINER: participant_target SOURCE: DATABASE_GROUP: *database_group TIMEZONE: *timezone diff --git a/rules/models.smk b/rules/models.smk index 1b09663b..aa7fe0e6 100644 --- a/rules/models.smk +++ b/rules/models.smk @@ -3,7 +3,7 @@ rule download_demographic_data: participant_file = "data/external/participant_files/{pid}.yaml" params: source = config["PARAMS_FOR_ANALYSIS"]["DEMOGRAPHIC"]["SOURCE"], - table = config["PARAMS_FOR_ANALYSIS"]["DEMOGRAPHIC"]["TABLE"], + table = config["PARAMS_FOR_ANALYSIS"]["DEMOGRAPHIC"]["CONTAINER"], output: "data/raw/{pid}/participant_info_raw.csv" script: @@ -25,7 +25,7 @@ rule download_target_data: participant_file = "data/external/participant_files/{pid}.yaml" params: source = config["PARAMS_FOR_ANALYSIS"]["TARGET"]["SOURCE"], - table = config["PARAMS_FOR_ANALYSIS"]["TARGET"]["TABLE"], + table = config["PARAMS_FOR_ANALYSIS"]["TARGET"]["CONTAINER"], output: "data/raw/{pid}/participant_target_raw.csv" script: diff --git a/rules/preprocessing.smk b/rules/preprocessing.smk index ff9df12a..5f1673ac 100644 --- a/rules/preprocessing.smk +++ b/rules/preprocessing.smk @@ -29,7 +29,7 @@ rule pull_phone_data: params: data_configuration = config["PHONE_DATA_STREAMS"][config["PHONE_DATA_STREAMS"]["USE"]], sensor = "phone_" + "{sensor}", - tables = lambda wildcards: config["PHONE_" + str(wildcards.sensor).upper()]["TABLE"], + tables = lambda wildcards: config["PHONE_" + str(wildcards.sensor).upper()]["CONTAINER"], output: "data/raw/{pid}/phone_{sensor}_raw.csv" script: @@ -192,7 +192,7 @@ rule pull_wearable_data: device_type = "{device_type}", sensor = "{device_type}" + "_" + "{sensor}", pid = "{pid}", - tables = lambda wildcards: config[wildcards.device_type.upper() + "_" + str(wildcards.sensor).upper()]["TABLE"], + tables = lambda wildcards: config[wildcards.device_type.upper() + "_" + str(wildcards.sensor).upper()]["CONTAINER"], wildcard_constraints: device_type="(empatica|fitbit)" output: diff --git a/src/data/streams/aware_csv/container.R b/src/data/streams/aware_csv/container.R index 2b6a20b1..90b910e4 100644 --- a/src/data/streams/aware_csv/container.R +++ b/src/data/streams/aware_csv/container.R @@ -47,7 +47,7 @@ infer_device_os <- function(stream_parameters, device){ #' #' @param stream_parameters The PHONE_STREAM_PARAMETERS key in config.yaml. If you need specific parameters add them there. #' @param device A device ID string -#' @param sensor_container database table or file containing the sensor data for all participants. This is the PHONE_SENSOR[TABLE] key in config.yaml +#' @param sensor_container database table or file containing the sensor data for all participants. This is the PHONE_SENSOR[CONTAINER] key in config.yaml #' @param columns the columns needed from this sensor (we recommend to only return these columns instead of every column in sensor_container) #' @return A dataframe with the sensor data for device diff --git a/src/data/streams/aware_mysql/container.R b/src/data/streams/aware_mysql/container.R index 8cf12590..f4e93d70 100644 --- a/src/data/streams/aware_mysql/container.R +++ b/src/data/streams/aware_mysql/container.R @@ -57,7 +57,7 @@ infer_device_os <- function(stream_parameters, device){ #' #' @param stream_parameters The PHONE_STREAM_PARAMETERS key in config.yaml. If you need specific parameters add them there. #' @param device A device ID string -#' @param sensor_container database table or file containing the sensor data for all participants. This is the PHONE_SENSOR[TABLE] key in config.yaml +#' @param sensor_container database table or file containing the sensor data for all participants. This is the PHONE_SENSOR[CONTAINER] key in config.yaml #' @param columns the columns needed from this sensor (we recommend to only return these columns instead of every column in sensor_container) #' @return A dataframe with the sensor data for device diff --git a/src/data/streams/fitbitjson_csv/container.R b/src/data/streams/fitbitjson_csv/container.R index 0cb49fca..4de32dad 100644 --- a/src/data/streams/fitbitjson_csv/container.R +++ b/src/data/streams/fitbitjson_csv/container.R @@ -6,7 +6,7 @@ library(readr) #' #' @param stream_parameters The PHONE_STREAM_PARAMETERS key in config.yaml. If you need specific parameters add them there. #' @param device A device ID string -#' @param sensor_container database table or file containing the sensor data for all participants. This is the PHONE_SENSOR[TABLE] key in config.yaml +#' @param sensor_container database table or file containing the sensor data for all participants. This is the FITBIT_SENSOR[CONTAINER] key in config.yaml #' @param columns the columns needed from this sensor (we recommend to only return these columns instead of every column in sensor_container) #' @return A dataframe with the sensor data for device diff --git a/src/data/streams/fitbitjson_mysql/container.R b/src/data/streams/fitbitjson_mysql/container.R index 98f8ccb5..c9f0c736 100644 --- a/src/data/streams/fitbitjson_mysql/container.R +++ b/src/data/streams/fitbitjson_mysql/container.R @@ -26,7 +26,7 @@ get_db_engine <- function(group){ #' #' @param stream_parameters The PHONE_STREAM_PARAMETERS key in config.yaml. If you need specific parameters add them there. #' @param device A device ID string -#' @param sensor_container database table or file containing the sensor data for all participants. This is the PHONE_SENSOR[TABLE] key in config.yaml +#' @param sensor_container database table or file containing the sensor data for all participants. This is the FITBIT_SENSOR[CONTAINER] key in config.yaml #' @param columns the columns needed from this sensor (we recommend to only return these columns instead of every column in sensor_container) #' @return A dataframe with the sensor data for device diff --git a/src/data/streams/fitbitparsed_csv/container.R b/src/data/streams/fitbitparsed_csv/container.R index f010e60b..11e204f0 100644 --- a/src/data/streams/fitbitparsed_csv/container.R +++ b/src/data/streams/fitbitparsed_csv/container.R @@ -6,7 +6,7 @@ library(readr) #' #' @param stream_parameters The PHONE_STREAM_PARAMETERS key in config.yaml. If you need specific parameters add them there. #' @param device A device ID string -#' @param sensor_container database table or file containing the sensor data for all participants. This is the PHONE_SENSOR[TABLE] key in config.yaml +#' @param sensor_container database table or file containing the sensor data for all participants. This is the FITBIT_SENSOR[CONTAINER] key in config.yaml #' @param columns the columns needed from this sensor (we recommend to only return these columns instead of every column in sensor_container) #' @return A dataframe with the sensor data for device diff --git a/src/data/streams/fitbitparsed_mysql/container.R b/src/data/streams/fitbitparsed_mysql/container.R index 98f8ccb5..c9f0c736 100644 --- a/src/data/streams/fitbitparsed_mysql/container.R +++ b/src/data/streams/fitbitparsed_mysql/container.R @@ -26,7 +26,7 @@ get_db_engine <- function(group){ #' #' @param stream_parameters The PHONE_STREAM_PARAMETERS key in config.yaml. If you need specific parameters add them there. #' @param device A device ID string -#' @param sensor_container database table or file containing the sensor data for all participants. This is the PHONE_SENSOR[TABLE] key in config.yaml +#' @param sensor_container database table or file containing the sensor data for all participants. This is the FITBIT_SENSOR[CONTAINER] key in config.yaml #' @param columns the columns needed from this sensor (we recommend to only return these columns instead of every column in sensor_container) #' @return A dataframe with the sensor data for device diff --git a/tests/Snakefile b/tests/Snakefile index 5ab5449a..91c683ef 100644 --- a/tests/Snakefile +++ b/tests/Snakefile @@ -19,7 +19,7 @@ for provider in config["PHONE_DATA_YIELD"]["PROVIDERS"].keys(): if not (set(config["PHONE_DATA_YIELD"]["SENSORS"]) <= set(allowed_phone_sensors)): raise ValueError('\nInvalid sensor(s) for PHONE_DATA_YIELD. config["PHONE_DATA_YIELD"]["SENSORS"] can have ' 'one or more of the following phone sensors: {}.\nInstead you provided "{}".\n' - 'Keep in mind that the sensors\' TABLE attribute must point to a valid database table'\ + 'Keep in mind that the sensors\' CONTAINER attribute must point to a valid database table'\ .format(', '.join(allowed_phone_sensors), ', '.join(set(config["PHONE_DATA_YIELD"]["SENSORS"]) - set(allowed_phone_sensors)))) diff --git a/tests/settings/frequency/testing_config.yaml b/tests/settings/frequency/testing_config.yaml index e0164a60..d02028da 100644 --- a/tests/settings/frequency/testing_config.yaml +++ b/tests/settings/frequency/testing_config.yaml @@ -51,7 +51,7 @@ PHONE_DATA_CONFIGURATION: # https://www.rapids.science/latest/features/phone-accelerometer/ PHONE_ACCELEROMETER: - TABLE: accelerometer + CONTAINER: accelerometer PROVIDERS: RAPIDS: COMPUTE: False @@ -70,7 +70,7 @@ PHONE_ACCELEROMETER: # See https://www.rapids.science/latest/features/phone-activity-recognition/ PHONE_ACTIVITY_RECOGNITION: - TABLE: + CONTAINER: ANDROID: plugin_google_activity_recognition IOS: plugin_ios_activity_recognition EPISODE_THRESHOLD_BETWEEN_ROWS: 5 # minutes. Max time difference for two consecutive rows to be considered within the same battery episode. @@ -87,7 +87,7 @@ PHONE_ACTIVITY_RECOGNITION: # See https://www.rapids.science/latest/features/phone-applications-crashes/ PHONE_APPLICATIONS_CRASHES: - TABLE: applications_crashes + CONTAINER: applications_crashes APPLICATION_CATEGORIES: CATALOGUE_SOURCE: FILE # FILE (genres are read from CATALOGUE_FILE) or GOOGLE (genres are scrapped from the Play Store) CATALOGUE_FILE: "data/external/stachl_application_genre_catalogue.csv" @@ -97,7 +97,7 @@ PHONE_APPLICATIONS_CRASHES: # See https://www.rapids.science/latest/features/phone-applications-foreground/ PHONE_APPLICATIONS_FOREGROUND: - TABLE: applications_foreground + CONTAINER: applications_foreground APPLICATION_CATEGORIES: CATALOGUE_SOURCE: FILE # FILE (genres are read from CATALOGUE_FILE) or GOOGLE (genres are scrapped from the Play Store) CATALOGUE_FILE: "data/external/stachl_application_genre_catalogue.csv" @@ -119,7 +119,7 @@ PHONE_APPLICATIONS_FOREGROUND: # See https://www.rapids.science/latest/features/phone-applications-notifications/ PHONE_APPLICATIONS_NOTIFICATIONS: - TABLE: applications_notifications + CONTAINER: applications_notifications APPLICATION_CATEGORIES: CATALOGUE_SOURCE: FILE # FILE (genres are read from CATALOGUE_FILE) or GOOGLE (genres are scrapped from the Play Store) CATALOGUE_FILE: "data/external/stachl_application_genre_catalogue.csv" @@ -129,7 +129,7 @@ PHONE_APPLICATIONS_NOTIFICATIONS: # See https://www.rapids.science/latest/features/phone-battery/ PHONE_BATTERY: - TABLE: battery + CONTAINER: battery EPISODE_THRESHOLD_BETWEEN_ROWS: 30 # minutes. Max time difference for two consecutive rows to be considered within the same battery episode. PROVIDERS: RAPIDS: @@ -140,7 +140,7 @@ PHONE_BATTERY: # See https://www.rapids.science/latest/features/phone-bluetooth/ PHONE_BLUETOOTH: - TABLE: bluetooth + CONTAINER: bluetooth PROVIDERS: RAPIDS: COMPUTE: TRUE @@ -167,7 +167,7 @@ PHONE_BLUETOOTH: # See https://www.rapids.science/latest/features/phone-calls/ PHONE_CALLS: - TABLE: calls + CONTAINER: calls PROVIDERS: RAPIDS: COMPUTE: TRUE @@ -181,7 +181,7 @@ PHONE_CALLS: # See https://www.rapids.science/latest/features/phone-conversation/ PHONE_CONVERSATION: - TABLE: + CONTAINER: ANDROID: plugin_studentlife_audio_android IOS: plugin_studentlife_audio PROVIDERS: @@ -211,12 +211,12 @@ PHONE_DATA_YIELD: # See https://www.rapids.science/latest/features/phone-keyboard/ PHONE_KEYBOARD: - TABLE: keyboard + CONTAINER: keyboard PROVIDERS: # None implemented yet but this sensor can be used in PHONE_DATA_YIELD # See https://www.rapids.science/latest/features/phone-light/ PHONE_LIGHT: - TABLE: light + CONTAINER: light PROVIDERS: RAPIDS: COMPUTE: TRUE @@ -226,7 +226,7 @@ PHONE_LIGHT: # See https://www.rapids.science/latest/features/phone-locations/ PHONE_LOCATIONS: - TABLE: locations + CONTAINER: locations LOCATIONS_TO_USE: ALL_RESAMPLED # ALL, GPS, ALL_RESAMPLED, OR FUSED_RESAMPLED FUSED_RESAMPLED_CONSECUTIVE_THRESHOLD: 30 # minutes, only replicate location samples to the next sensed bin if the phone did not stop collecting data for more than this threshold FUSED_RESAMPLED_TIME_SINCE_VALID_LOCATION: 720 # minutes, only replicate location samples to consecutive sensed bins if they were logged within this threshold after a valid location row @@ -257,14 +257,14 @@ PHONE_LOCATIONS: # See https://www.rapids.science/latest/features/phone-log/ PHONE_LOG: - TABLE: + CONTAINER: ANDROID: aware_log IOS: ios_aware_log PROVIDERS: # None implemented yet but this sensor can be used in PHONE_DATA_YIELD # See https://www.rapids.science/latest/features/phone-messages/ PHONE_MESSAGES: - TABLE: messages + CONTAINER: messages PROVIDERS: RAPIDS: COMPUTE: TRUE @@ -277,7 +277,7 @@ PHONE_MESSAGES: # See https://www.rapids.science/latest/features/phone-screen/ PHONE_SCREEN: - TABLE: screen + CONTAINER: screen PROVIDERS: RAPIDS: COMPUTE: False @@ -291,7 +291,7 @@ PHONE_SCREEN: # See https://www.rapids.science/latest/features/phone-wifi-connected/ PHONE_WIFI_CONNECTED: - TABLE: "sensor_wifi" + CONTAINER: "sensor_wifi" PROVIDERS: RAPIDS: COMPUTE: TRUE @@ -301,7 +301,7 @@ PHONE_WIFI_CONNECTED: # See https://www.rapids.science/latest/features/phone-wifi-visible/ PHONE_WIFI_VISIBLE: - TABLE: "wifi" + CONTAINER: "wifi" PROVIDERS: RAPIDS: COMPUTE: TRUE @@ -318,7 +318,7 @@ PHONE_WIFI_VISIBLE: # See https://www.rapids.science/latest/setup/configuration/#device-data-source-configuration FITBIT_DATA_CONFIGURATION: SOURCE: - TYPE: DATABASE # DATABASE or FILES (set each [FITBIT_SENSOR][TABLE] attribute with a table name or a file path accordingly) + TYPE: DATABASE # DATABASE or FILES (set each [FITBIT_SENSOR][CONTAINER] attribute with a table name or a file path accordingly) COLUMN_FORMAT: JSON # JSON or PLAIN_TEXT DATABASE_GROUP: *database_group DEVICE_ID_COLUMN: device_id # column name @@ -330,7 +330,7 @@ FITBIT_DATA_CONFIGURATION: # See https://www.rapids.science/latest/features/fitbit-heartrate-summary/ FITBIT_HEARTRATE_SUMMARY: - TABLE: heartrate_summary + CONTAINER: heartrate_summary PROVIDERS: RAPIDS: COMPUTE: False @@ -340,7 +340,7 @@ FITBIT_HEARTRATE_SUMMARY: # See https://www.rapids.science/latest/features/fitbit-heartrate-intraday/ FITBIT_HEARTRATE_INTRADAY: - TABLE: heartrate_intraday + CONTAINER: heartrate_intraday PROVIDERS: RAPIDS: COMPUTE: False @@ -350,7 +350,7 @@ FITBIT_HEARTRATE_INTRADAY: # See https://www.rapids.science/latest/features/fitbit-sleep-summary/ FITBIT_SLEEP_SUMMARY: - TABLE: sleep_summary + CONTAINER: sleep_summary SLEEP_EPISODE_TIMESTAMP: end # summary sleep episodes are considered as events based on either the start timestamp or end timestamp. PROVIDERS: RAPIDS: @@ -362,7 +362,7 @@ FITBIT_SLEEP_SUMMARY: # See https://www.rapids.science/latest/features/fitbit-steps-summary/ FITBIT_STEPS_SUMMARY: - TABLE: steps_summary + CONTAINER: steps_summary PROVIDERS: RAPIDS: COMPUTE: False @@ -372,7 +372,7 @@ FITBIT_STEPS_SUMMARY: # See https://www.rapids.science/latest/features/fitbit-steps-intraday/ FITBIT_STEPS_INTRADAY: - TABLE: steps_intraday + CONTAINER: steps_intraday PROVIDERS: RAPIDS: COMPUTE: False @@ -387,7 +387,7 @@ FITBIT_STEPS_INTRADAY: # FITBIT_CALORIES: # TABLE_FORMAT: JSON # JSON or CSV. If your JSON or CSV data are files change [DEVICE_DATA][FITBIT][SOURCE][TYPE] to FILES -# TABLE: +# CONTAINER: # JSON: fitbit_calories # CSV: # SUMMARY: calories_summary diff --git a/tests/settings/periodic/testing_config.yaml b/tests/settings/periodic/testing_config.yaml index d39eb2cd..86d1eee1 100644 --- a/tests/settings/periodic/testing_config.yaml +++ b/tests/settings/periodic/testing_config.yaml @@ -51,7 +51,7 @@ PHONE_DATA_CONFIGURATION: # https://www.rapids.science/latest/features/phone-accelerometer/ PHONE_ACCELEROMETER: - TABLE: accelerometer + CONTAINER: accelerometer PROVIDERS: RAPIDS: COMPUTE: False @@ -70,7 +70,7 @@ PHONE_ACCELEROMETER: # See https://www.rapids.science/latest/features/phone-activity-recognition/ PHONE_ACTIVITY_RECOGNITION: - TABLE: + CONTAINER: ANDROID: plugin_google_activity_recognition IOS: plugin_ios_activity_recognition EPISODE_THRESHOLD_BETWEEN_ROWS: 5 # minutes. Max time difference for two consecutive rows to be considered within the same battery episode. @@ -87,7 +87,7 @@ PHONE_ACTIVITY_RECOGNITION: # See https://www.rapids.science/latest/features/phone-applications-crashes/ PHONE_APPLICATIONS_CRASHES: - TABLE: applications_crashes + CONTAINER: applications_crashes APPLICATION_CATEGORIES: CATALOGUE_SOURCE: FILE # FILE (genres are read from CATALOGUE_FILE) or GOOGLE (genres are scrapped from the Play Store) CATALOGUE_FILE: "data/external/stachl_application_genre_catalogue.csv" @@ -97,7 +97,7 @@ PHONE_APPLICATIONS_CRASHES: # See https://www.rapids.science/latest/features/phone-applications-foreground/ PHONE_APPLICATIONS_FOREGROUND: - TABLE: applications_foreground + CONTAINER: applications_foreground APPLICATION_CATEGORIES: CATALOGUE_SOURCE: FILE # FILE (genres are read from CATALOGUE_FILE) or GOOGLE (genres are scrapped from the Play Store) CATALOGUE_FILE: "data/external/stachl_application_genre_catalogue.csv" @@ -119,7 +119,7 @@ PHONE_APPLICATIONS_FOREGROUND: # See https://www.rapids.science/latest/features/phone-applications-notifications/ PHONE_APPLICATIONS_NOTIFICATIONS: - TABLE: applications_notifications + CONTAINER: applications_notifications APPLICATION_CATEGORIES: CATALOGUE_SOURCE: FILE # FILE (genres are read from CATALOGUE_FILE) or GOOGLE (genres are scrapped from the Play Store) CATALOGUE_FILE: "data/external/stachl_application_genre_catalogue.csv" @@ -129,7 +129,7 @@ PHONE_APPLICATIONS_NOTIFICATIONS: # See https://www.rapids.science/latest/features/phone-battery/ PHONE_BATTERY: - TABLE: battery + CONTAINER: battery EPISODE_THRESHOLD_BETWEEN_ROWS: 30 # minutes. Max time difference for two consecutive rows to be considered within the same battery episode. PROVIDERS: RAPIDS: @@ -140,7 +140,7 @@ PHONE_BATTERY: # See https://www.rapids.science/latest/features/phone-bluetooth/ PHONE_BLUETOOTH: - TABLE: bluetooth + CONTAINER: bluetooth PROVIDERS: RAPIDS: COMPUTE: TRUE @@ -167,7 +167,7 @@ PHONE_BLUETOOTH: # See https://www.rapids.science/latest/features/phone-calls/ PHONE_CALLS: - TABLE: calls + CONTAINER: calls PROVIDERS: RAPIDS: COMPUTE: TRUE @@ -181,7 +181,7 @@ PHONE_CALLS: # See https://www.rapids.science/latest/features/phone-conversation/ PHONE_CONVERSATION: - TABLE: + CONTAINER: ANDROID: plugin_studentlife_audio_android IOS: plugin_studentlife_audio PROVIDERS: @@ -211,12 +211,12 @@ PHONE_DATA_YIELD: # See https://www.rapids.science/latest/features/phone-keyboard/ PHONE_KEYBOARD: - TABLE: keyboard + CONTAINER: keyboard PROVIDERS: # None implemented yet but this sensor can be used in PHONE_DATA_YIELD # See https://www.rapids.science/latest/features/phone-light/ PHONE_LIGHT: - TABLE: light + CONTAINER: light PROVIDERS: RAPIDS: COMPUTE: TRUE @@ -226,7 +226,7 @@ PHONE_LIGHT: # See https://www.rapids.science/latest/features/phone-locations/ PHONE_LOCATIONS: - TABLE: locations + CONTAINER: locations LOCATIONS_TO_USE: ALL_RESAMPLED # ALL, GPS, ALL_RESAMPLED, OR FUSED_RESAMPLED FUSED_RESAMPLED_CONSECUTIVE_THRESHOLD: 30 # minutes, only replicate location samples to the next sensed bin if the phone did not stop collecting data for more than this threshold FUSED_RESAMPLED_TIME_SINCE_VALID_LOCATION: 720 # minutes, only replicate location samples to consecutive sensed bins if they were logged within this threshold after a valid location row @@ -257,14 +257,14 @@ PHONE_LOCATIONS: # See https://www.rapids.science/latest/features/phone-log/ PHONE_LOG: - TABLE: + CONTAINER: ANDROID: aware_log IOS: ios_aware_log PROVIDERS: # None implemented yet but this sensor can be used in PHONE_DATA_YIELD # See https://www.rapids.science/latest/features/phone-messages/ PHONE_MESSAGES: - TABLE: messages + CONTAINER: messages PROVIDERS: RAPIDS: COMPUTE: TRUE @@ -277,7 +277,7 @@ PHONE_MESSAGES: # See https://www.rapids.science/latest/features/phone-screen/ PHONE_SCREEN: - TABLE: screen + CONTAINER: screen PROVIDERS: RAPIDS: COMPUTE: False @@ -291,7 +291,7 @@ PHONE_SCREEN: # See https://www.rapids.science/latest/features/phone-wifi-connected/ PHONE_WIFI_CONNECTED: - TABLE: "sensor_wifi" + CONTAINER: "sensor_wifi" PROVIDERS: RAPIDS: COMPUTE: TRUE @@ -301,7 +301,7 @@ PHONE_WIFI_CONNECTED: # See https://www.rapids.science/latest/features/phone-wifi-visible/ PHONE_WIFI_VISIBLE: - TABLE: "wifi" + CONTAINER: "wifi" PROVIDERS: RAPIDS: COMPUTE: TRUE @@ -318,7 +318,7 @@ PHONE_WIFI_VISIBLE: # See https://www.rapids.science/latest/setup/configuration/#device-data-source-configuration FITBIT_DATA_CONFIGURATION: SOURCE: - TYPE: DATABASE # DATABASE or FILES (set each [FITBIT_SENSOR][TABLE] attribute with a table name or a file path accordingly) + TYPE: DATABASE # DATABASE or FILES (set each [FITBIT_SENSOR][CONTAINER] attribute with a table name or a file path accordingly) COLUMN_FORMAT: JSON # JSON or PLAIN_TEXT DATABASE_GROUP: *database_group DEVICE_ID_COLUMN: device_id # column name @@ -330,7 +330,7 @@ FITBIT_DATA_CONFIGURATION: # See https://www.rapids.science/latest/features/fitbit-heartrate-summary/ FITBIT_HEARTRATE_SUMMARY: - TABLE: heartrate_summary + CONTAINER: heartrate_summary PROVIDERS: RAPIDS: COMPUTE: False @@ -340,7 +340,7 @@ FITBIT_HEARTRATE_SUMMARY: # See https://www.rapids.science/latest/features/fitbit-heartrate-intraday/ FITBIT_HEARTRATE_INTRADAY: - TABLE: heartrate_intraday + CONTAINER: heartrate_intraday PROVIDERS: RAPIDS: COMPUTE: False @@ -350,7 +350,7 @@ FITBIT_HEARTRATE_INTRADAY: # See https://www.rapids.science/latest/features/fitbit-sleep-summary/ FITBIT_SLEEP_SUMMARY: - TABLE: sleep_summary + CONTAINER: sleep_summary SLEEP_EPISODE_TIMESTAMP: end # summary sleep episodes are considered as events based on either the start timestamp or end timestamp. PROVIDERS: RAPIDS: @@ -362,7 +362,7 @@ FITBIT_SLEEP_SUMMARY: # See https://www.rapids.science/latest/features/fitbit-steps-summary/ FITBIT_STEPS_SUMMARY: - TABLE: steps_summary + CONTAINER: steps_summary PROVIDERS: RAPIDS: COMPUTE: False @@ -372,7 +372,7 @@ FITBIT_STEPS_SUMMARY: # See https://www.rapids.science/latest/features/fitbit-steps-intraday/ FITBIT_STEPS_INTRADAY: - TABLE: steps_intraday + CONTAINER: steps_intraday PROVIDERS: RAPIDS: COMPUTE: False @@ -387,7 +387,7 @@ FITBIT_STEPS_INTRADAY: # FITBIT_CALORIES: # TABLE_FORMAT: JSON # JSON or CSV. If your JSON or CSV data are files change [DEVICE_DATA][FITBIT][SOURCE][TYPE] to FILES -# TABLE: +# CONTAINER: # JSON: fitbit_calories # CSV: # SUMMARY: calories_summary diff --git a/tools/config.schema.yaml b/tools/config.schema.yaml index fa89aa1e..fbd3db66 100644 --- a/tools/config.schema.yaml +++ b/tools/config.schema.yaml @@ -218,9 +218,9 @@ properties: PHONE_ACCELEROMETER: type: object - required: [TABLE, PROVIDERS] + required: [CONTAINER, PROVIDERS] properties: - TABLE: + CONTAINER: type: string PROVIDERS: type: ["null", object] @@ -262,9 +262,9 @@ properties: PHONE_ACTIVITY_RECOGNITION: type: object - required: [TABLE, EPISODE_THRESHOLD_BETWEEN_ROWS, PROVIDERS] + required: [CONTAINER, EPISODE_THRESHOLD_BETWEEN_ROWS, PROVIDERS] properties: - TABLE: + CONTAINER: type: object required: [ANDROID, IOS] properties: @@ -315,9 +315,9 @@ properties: PHONE_APPLICATIONS_CRASHES: type: object - required: [TABLE, APPLICATION_CATEGORIES, PROVIDERS] + required: [CONTAINER, APPLICATION_CATEGORIES, PROVIDERS] properties: - TABLE: + CONTAINER: type: string APPLICATION_CATEGORIES: allOf: @@ -328,9 +328,9 @@ properties: PHONE_APPLICATIONS_FOREGROUND: type: object - required: [TABLE, APPLICATION_CATEGORIES, PROVIDERS] + required: [CONTAINER, APPLICATION_CATEGORIES, PROVIDERS] properties: - TABLE: + CONTAINER: type: string APPLICATION_CATEGORIES: allOf: @@ -377,9 +377,9 @@ properties: PHONE_APPLICATIONS_NOTIFICATIONS: type: object - required: [TABLE, APPLICATION_CATEGORIES, PROVIDERS] + required: [CONTAINER, APPLICATION_CATEGORIES, PROVIDERS] properties: - TABLE: + CONTAINER: type: string APPLICATION_CATEGORIES: allOf: @@ -391,9 +391,9 @@ properties: PHONE_BATTERY: type: object - required: [TABLE, PROVIDERS, EPISODE_THRESHOLD_BETWEEN_ROWS] + required: [CONTAINER, PROVIDERS, EPISODE_THRESHOLD_BETWEEN_ROWS] properties: - TABLE: + CONTAINER: type: string EPISODE_THRESHOLD_BETWEEN_ROWS: type: integer @@ -416,9 +416,9 @@ properties: PHONE_BLUETOOTH: type: object - required: [TABLE, PROVIDERS] + required: [CONTAINER, PROVIDERS] properties: - TABLE: + CONTAINER: type: string PROVIDERS: type: ["null", object] @@ -455,9 +455,9 @@ properties: PHONE_CALLS: type: object - required: [TABLE, PROVIDERS] + required: [CONTAINER, PROVIDERS] properties: - TABLE: + CONTAINER: type: string PROVIDERS: type: ["null", object] @@ -501,9 +501,9 @@ properties: PHONE_CONVERSATION: type: object - required: [TABLE, PROVIDERS] + required: [CONTAINER, PROVIDERS] properties: - TABLE: + CONTAINER: type: object required: [ANDROID, IOS] properties: @@ -568,9 +568,9 @@ properties: PHONE_KEYBOARD: type: object - required: [TABLE, PROVIDERS] + required: [CONTAINER, PROVIDERS] properties: - TABLE: + CONTAINER: type: string PROVIDERS: type: ["null", object] @@ -579,9 +579,9 @@ properties: PHONE_LIGHT: type: object - required: [TABLE, PROVIDERS] + required: [CONTAINER, PROVIDERS] properties: - TABLE: + CONTAINER: type: string PROVIDERS: type: ["null", object] @@ -600,9 +600,9 @@ properties: PHONE_LOCATIONS: type: object - required: [TABLE, LOCATIONS_TO_USE, FUSED_RESAMPLED_CONSECUTIVE_THRESHOLD, PROVIDERS] + required: [CONTAINER, LOCATIONS_TO_USE, FUSED_RESAMPLED_CONSECUTIVE_THRESHOLD, PROVIDERS] properties: - TABLE: + CONTAINER: type: string LOCATIONS_TO_USE: type: string @@ -692,9 +692,9 @@ properties: PHONE_LOG: type: object - required: [TABLE, PROVIDERS] + required: [CONTAINER, PROVIDERS] properties: - TABLE: + CONTAINER: type: object required: [ANDROID, IOS] properties: @@ -709,9 +709,9 @@ properties: PHONE_MESSAGES: type: object - required: [TABLE, PROVIDERS] + required: [CONTAINER, PROVIDERS] properties: - TABLE: + CONTAINER: type: string PROVIDERS: type: ["null", object] @@ -746,9 +746,9 @@ properties: PHONE_SCREEN: type: object - required: [TABLE, PROVIDERS] + required: [CONTAINER, PROVIDERS] properties: - TABLE: + CONTAINER: type: string PROVIDERS: type: ["null", object] @@ -781,9 +781,9 @@ properties: PHONE_WIFI_CONNECTED: type: object - required: [TABLE, PROVIDERS] + required: [CONTAINER, PROVIDERS] properties: - TABLE: + CONTAINER: type: string PROVIDERS: type: ["null", object] @@ -802,9 +802,9 @@ properties: PHONE_WIFI_VISIBLE: type: object - required: [TABLE, PROVIDERS] + required: [CONTAINER, PROVIDERS] properties: - TABLE: + CONTAINER: type: string PROVIDERS: type: ["null", object] @@ -872,9 +872,9 @@ properties: FITBIT_HEARTRATE_SUMMARY: type: object - required: [TABLE, PROVIDERS] + required: [CONTAINER, PROVIDERS] properties: - TABLE: + CONTAINER: type: string PROVIDERS: type: ["null", object] @@ -891,9 +891,9 @@ properties: FITBIT_HEARTRATE_INTRADAY: type: object - required: [TABLE, PROVIDERS] + required: [CONTAINER, PROVIDERS] properties: - TABLE: + CONTAINER: type: string PROVIDERS: type: ["null", object] @@ -912,9 +912,9 @@ properties: FITBIT_SLEEP_SUMMARY: type: object - required: [TABLE, PROVIDERS] + required: [CONTAINER, PROVIDERS] properties: - TABLE: + CONTAINER: type: string PROVIDERS: type: ["null", object] @@ -939,9 +939,9 @@ properties: FITBIT_SLEEP_INTRADAY: type: object - required: [TABLE, PROVIDERS] + required: [CONTAINER, PROVIDERS] properties: - TABLE: + CONTAINER: type: string PROVIDERS: type: ["null", object] @@ -1069,9 +1069,9 @@ properties: FITBIT_STEPS_SUMMARY: type: object - required: [TABLE, PROVIDERS] + required: [CONTAINER, PROVIDERS] properties: - TABLE: + CONTAINER: type: string PROVIDERS: type: ["null", object] @@ -1088,9 +1088,9 @@ properties: FITBIT_STEPS_INTRADAY: type: object - required: [TABLE, PROVIDERS] + required: [CONTAINER, PROVIDERS] properties: - TABLE: + CONTAINER: type: string PROVIDERS: type: ["null", object]