Add docs of AR & conversation sensors

pull/128/head
Meng Li 2021-03-05 20:40:46 -05:00 committed by JulioV
parent fb054b539f
commit 2eae84ff05
6 changed files with 102 additions and 19 deletions

View File

@ -20,6 +20,8 @@ The yaml file that describes the format of this data stream is at:
src/data/streams/aware_mysql/format.yaml src/data/streams/aware_mysql/format.yaml
``` ```
Stream columns named `FLAG_TO_MUTATE` means they are extracted from the `FLAG_AS_EXTRA` RAPIDS column. You can refer to [OS complex mapping](../../datastreams/add-new-data-streams/#os-complex-mapping) section for detailed information.
!!! hint !!! hint
The mappings in this stream (RAPIDS/Stream) are the same names because AWARE data was the first stream RAPIDS supported, meaning that it considers AWARE column names the default. The mappings in this stream (RAPIDS/Stream) are the same names because AWARE data was the first stream RAPIDS supported, meaning that it considers AWARE column names the default.
@ -44,3 +46,71 @@ src/data/streams/aware_mysql/format.yaml
=== "IOS" === "IOS"
Same as ANDROID Same as ANDROID
??? info "PHONE_ACTIVITY_RECOGNITION"
=== "ANDROID"
**COLUMN_MAPPINGS**
| RAPIDS column | Stream column |
|-----------------|-----------------|
| TIMESTAMP | timestamp |
| DEVICE_ID | device_id |
| ACTIVITY_TYPE | activity_type |
| ACTIVITY_NAME | activity_name |
| CONFIDENCE | confidence |
**MUTATION_SCRIPTS**
None
=== "IOS"
**COLUMN_MAPPINGS**
| RAPIDS column | Stream column |
|-----------------|-----------------|
| TIMESTAMP | timestamp |
| DEVICE_ID | device_id |
| ACTIVITY_TYPE | FLAG_TO_MUTATE |
| ACTIVITY_NAME | FLAG_TO_MUTATE |
| CONFIDENCE | confidence |
| FLAG_AS_EXTRA | activities |
**MUTATION_SCRIPTS**
```bash
src/data/streams/mutations/phone/aware/activity_recogniton_ios_unification.R
```
??? info "PHONE_CONVERSATION"
=== "ANDROID"
**COLUMN_MAPPINGS**
| RAPIDS column | Stream column |
|----------------------|---------------------|
| TIMESTAMP | timestamp |
| DEVICE_ID | device_id |
| DOUBLE_ENERGY | double_energy |
| INFERENCE | inference |
| DOUBLE_CONVO_START | double_convo_start |
| DOUBLE_CONVO_END | double_convo_end |
**MUTATION_SCRIPTS**
None
=== "IOS"
**COLUMN_MAPPINGS**
Same as ANDROID
**MUTATION_SCRIPTS**
```bash
src/data/streams/mutations/phone/aware/conversation_ios_timestamp.R
```

View File

@ -4,16 +4,34 @@ This is a description of the format RAPIDS needs to process data for the followi
??? info "PHONE_ACCELEROMETER" ??? info "PHONE_ACCELEROMETER"
=== "ANDROID" | RAPIDS column | Description |
|-----------------|--------------------------------------------------------------|
| TIMESTAMP | An UNIX timestamp (13 digits) when a row of data was logged |
| DEVICE_ID | A string that uniquely identifies a device |
| DOUBLE_VALUES_0 | x axis of acceleration |
| DOUBLE_VALUES_1 | y axis of acceleration |
| DOUBLE_VALUES_2 | z axis of acceleration |
| RAPIDS column | Description |
|-----------------|-----------------|
| TIMESTAMP | A UNIX timestamp (13 digits) when a row of data was logged |
| DEVICE_ID | A string that uniquely identifies a device |
| DOUBLE_VALUES_0 | x axis of acceleration |
| DOUBLE_VALUES_1 | y axis of acceleration |
| DOUBLE_VALUES_2 | z axis of acceleration |
=== "IOS" ??? info "PHONE_ACTIVITY_RECOGNITION"
Same as ANDROID
| RAPIDS column | Description |
|-----------------|---------------------------------------------------------------------------|
| TIMESTAMP | An UNIX timestamp (13 digits) when a row of data was logged |
| DEVICE_ID | A string that uniquely identifies a device |
| ACTIVITY_TYPE | An integer (ranged from 0 to 8) that denotes current activity type |
| ACTIVITY_NAME | An string that denotes current activity name: `in_vehicle`, `on_bicycle`, `on_foot`, `still`, `unknown`, `tilting`, `walking` or `running` |
| CONFIDENCE | An integer (ranged from 0 to 100) that denotes the prediction accuracy |
??? info "PHONE_CONVERSATION"
| RAPIDS column | Description |
|----------------------|--------------------------------------------------------------------------------------|
| TIMESTAMP | An UNIX timestamp (13 digits) when a row of data was logged |
| DEVICE_ID | A string that uniquely identifies a device |
| DOUBLE_ENERGY | A number that denotes the amplitude of an audio sample (L2-norm of the audio frame) |
| INFERENCE | An integer (ranged from 0 to 3) that denotes the type of an audio sample: 0 = silence, 1 = noise, 2 = voice, 3 = unknown |
| DOUBLE_CONVO_START | UNIX timestamp (13 digits) of the beginning of a conversation |
| DOUBLE_CONVO_END | UNIX timestamp (13 digits) of the end of a conversation |

View File

@ -364,10 +364,8 @@ Parameters for `[TIMEZONE]`
|`[SINGLE][TZCODE]`| The time zone code from this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) to be used across all devices | |`[SINGLE][TZCODE]`| The time zone code from this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) to be used across all devices |
|`[MULTIPLE][TZCODES_FILE]`| A CSV file containing the time and code from this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) visited by each device in the study. Multiple devices can be linked to the same person, read more in [Participants Files](#participant-files) | |`[MULTIPLE][TZCODES_FILE]`| A CSV file containing the time and code from this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) visited by each device in the study. Multiple devices can be linked to the same person, read more in [Participants Files](#participant-files) |
|`[MULTIPLE][IF_MISSING_TZCODE]`| When a device is missing from `[TZCODES_FILE]` Set this flag to `STOP` to stop RAPIDS execution and show an error, or to `USE_DEFAULT` to assign the time zone specified in `[DEFAULT_TZCODE]` to any such devices | |`[MULTIPLE][IF_MISSING_TZCODE]`| When a device is missing from `[TZCODES_FILE]` Set this flag to `STOP` to stop RAPIDS execution and show an error, or to `USE_DEFAULT` to assign the time zone specified in `[DEFAULT_TZCODE]` to any such devices |
|`[MULTIPLE][FITBIT][ALLOW_MULTIPLE_TZ_PER_DEVICE]`| You only need to care about this flag if one or more Fitbit devices sensed data in one or more |`[MULTIPLE][FITBIT][ALLOW_MULTIPLE_TZ_PER_DEVICE]`| You only need to care about this flag if one or more Fitbit devices sensed data in one or more time zone, and you want RAPIDS to take into account this in its feature computation. Read more in "How does RAPIDS handle Fitbit devices?" below. |
time zone, and you want RAPIDS to take into account this in its feature computation. Read more in "How does RAPIDS handle Fitbit devices?" below. | |`[MULTIPLE][FITBIT][INFER_FROM_SMARTPHONE_TZ]`| You only need to care about this flag if one or more Fitbit devices sensed data in one or more time zone, and you want RAPIDS to take into account this in its feature computation. Read more in "How does RAPIDS handle Fitbit devices?" below. |
|`[MULTIPLE][FITBIT][INFER_FROM_SMARTPHONE_TZ]`| You only need to care about this flag if one or more Fitbit devices sensed data in one or more
time zone, and you want RAPIDS to take into account this in its feature computation. Read more in "How does RAPIDS handle Fitbit devices?" below. |
??? info "Format of `TZCODES_FILE`" ??? info "Format of `TZCODES_FILE`"
`TZCODES_FILE` has three columns and a row for each time zone a device visited (a device can be a smartphone or wearable (Fitbit/Empatica)): `TZCODES_FILE` has three columns and a row for each time zone a device visited (a device can be a smartphone or wearable (Fitbit/Empatica)):

View File

@ -89,7 +89,7 @@ nav:
- fitbitparsed_mysql: datastreams/fitbitparsed-mysql.md - fitbitparsed_mysql: datastreams/fitbitparsed-mysql.md
- fitbitjson_csv: datastreams/fitbitjson-csv.md - fitbitjson_csv: datastreams/fitbitjson-csv.md
- fitbitparsed_csv: datastreams/fitbitparsed-csv.md - fitbitparsed_csv: datastreams/fitbitparsed-csv.md
- Mandatory Fitbit Format: datastreams/mandatory-phone-format.md - Mandatory Fitbit Format: datastreams/mandatory-fitbit-format.md
- Add New Data Streams: datastreams/add-new-data-streams.md - Add New Data Streams: datastreams/add-new-data-streams.md
- Behavioral Features: - Behavioral Features:
- Introduction: features/feature-introduction.md - Introduction: features/feature-introduction.md

View File

@ -41,7 +41,6 @@ PHONE_CONVERSATION:
COLUMN_MAPPINGS: COLUMN_MAPPINGS:
TIMESTAMP: timestamp TIMESTAMP: timestamp
DEVICE_ID: device_id DEVICE_ID: device_id
DATATYPE: datatype
DOUBLE_ENERGY: double_energy DOUBLE_ENERGY: double_energy
INFERENCE: inference INFERENCE: inference
DOUBLE_CONVO_START: double_convo_start DOUBLE_CONVO_START: double_convo_start
@ -51,7 +50,6 @@ PHONE_CONVERSATION:
COLUMN_MAPPINGS: COLUMN_MAPPINGS:
TIMESTAMP: timestamp TIMESTAMP: timestamp
DEVICE_ID: device_id DEVICE_ID: device_id
DATATYPE: datatype
DOUBLE_ENERGY: double_energy DOUBLE_ENERGY: double_energy
INFERENCE: inference INFERENCE: inference
DOUBLE_CONVO_START: double_convo_start DOUBLE_CONVO_START: double_convo_start

View File

@ -15,7 +15,6 @@ PHONE_ACTIVITY_RECOGNITION:
PHONE_CONVERSATION: PHONE_CONVERSATION:
- TIMESTAMP - TIMESTAMP
- DEVICE_ID - DEVICE_ID
- DATATYPE
- DOUBLE_ENERGY - DOUBLE_ENERGY
- INFERENCE - INFERENCE
- DOUBLE_CONVO_START - DOUBLE_CONVO_START