From 824523e32ca6e1d9f92f7942dab4ca2c5f827b12 Mon Sep 17 00:00:00 2001 From: Meng Li <34143965+Meng6@users.noreply.github.com> Date: Mon, 8 Mar 2021 22:23:37 -0500 Subject: [PATCH] Migrate phone apps foreground sensor to new data stream --- docs/datastreams/aware-mysql.md | 19 +++++++++++++++++++ docs/datastreams/mandatory-phone-format.md | 11 +++++++++++ src/data/streams/aware_mysql/format.yaml | 10 ++++++++++ src/data/streams/rapids_columns.yaml | 7 +++++++ 4 files changed, 47 insertions(+) diff --git a/docs/datastreams/aware-mysql.md b/docs/datastreams/aware-mysql.md index 30a69d3b..9c31701b 100644 --- a/docs/datastreams/aware-mysql.md +++ b/docs/datastreams/aware-mysql.md @@ -84,6 +84,25 @@ Stream columns named `FLAG_TO_MUTATE` means they are extracted from the `FLAG_AS src/data/streams/mutations/phone/aware/activity_recogniton_ios_unification.R ``` +??? info "PHONE_APPLICATIONS_FOREGROUND" + + === "ANDROID" + + **COLUMN_MAPPINGS** + + | RAPIDS column | Stream column | + |--------------------|--------------------| + | TIMESTAMP | timestamp | + | DEVICE_ID | device_id | + | PACKAGE_NAME | package_name | + | APPLICATION_NAME | application_name | + | IS_SYSTEM_APP | is_system_app | + + **MUTATION_SCRIPTS** + + None + + ??? info "PHONE_CONVERSATION" === "ANDROID" diff --git a/docs/datastreams/mandatory-phone-format.md b/docs/datastreams/mandatory-phone-format.md index 1a0a74d5..d700c6ec 100644 --- a/docs/datastreams/mandatory-phone-format.md +++ b/docs/datastreams/mandatory-phone-format.md @@ -24,6 +24,17 @@ This is a description of the format RAPIDS needs to process data for the followi | CONFIDENCE | An integer (ranged from 0 to 100) that denotes the prediction accuracy | +??? info "PHONE_APPLICATIONS_FOREGROUND" + + | 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 | + | PACKAGE_NAME | Application’s package name | + | APPLICATION_NAME | Application’s localized name | + | IS_SYSTEM_APP | Device’s pre-installed application | + + ??? info "PHONE_CONVERSATION" | RAPIDS column | Description | diff --git a/src/data/streams/aware_mysql/format.yaml b/src/data/streams/aware_mysql/format.yaml index 03c025eb..2fd09561 100644 --- a/src/data/streams/aware_mysql/format.yaml +++ b/src/data/streams/aware_mysql/format.yaml @@ -36,6 +36,16 @@ PHONE_ACTIVITY_RECOGNITION: MUTATION_SCRIPTS: - "src/data/streams/mutations/phone/aware/activity_recogniton_ios_unification.R" +PHONE_APPLICATIONS_FOREGROUND: + ANDROID: + COLUMN_MAPPINGS: + TIMESTAMP: timestamp + DEVICE_ID: device_id + PACKAGE_NAME: package_name + APPLICATION_NAME: application_name + IS_SYSTEM_APP: is_system_app + MUTATION_SCRIPTS: # List any python or r scripts that mutate your raw data + PHONE_CONVERSATION: ANDROID: COLUMN_MAPPINGS: diff --git a/src/data/streams/rapids_columns.yaml b/src/data/streams/rapids_columns.yaml index 8f51e795..26153d0b 100644 --- a/src/data/streams/rapids_columns.yaml +++ b/src/data/streams/rapids_columns.yaml @@ -12,6 +12,13 @@ PHONE_ACTIVITY_RECOGNITION: - ACTIVITY_NAME - CONFIDENCE +PHONE_APPLICATIONS_FOREGROUND: + - TIMESTAMP + - DEVICE_ID + - PACKAGE_NAME + - APPLICATION_NAME + - IS_SYSTEM_APP + PHONE_CONVERSATION: - TIMESTAMP - DEVICE_ID