From 01afecda02729fcb375602b3a1191ac2cb4cc580 Mon Sep 17 00:00:00 2001 From: mpgxvii Date: Thu, 1 Jun 2023 12:03:27 +0100 Subject: [PATCH 01/42] Add initial Oura activity, sleep, readiness schemas --- .../connector/oura/oura_daily_activity.avsc | 37 +++++++++++++++++++ .../oura_daily_activity_contributors.avsc | 14 +++++++ .../connector/oura/oura_daily_readiness.avsc | 16 ++++++++ .../oura_daily_readiness_contributors.avsc | 16 ++++++++ commons/connector/oura/oura_daily_sleep.avsc | 14 +++++++ .../oura/oura_daily_sleep_contributors.avsc | 15 ++++++++ commons/connector/oura/oura_heart_rate.avsc | 14 +++++++ 7 files changed, 126 insertions(+) create mode 100644 commons/connector/oura/oura_daily_activity.avsc create mode 100644 commons/connector/oura/oura_daily_activity_contributors.avsc create mode 100644 commons/connector/oura/oura_daily_readiness.avsc create mode 100644 commons/connector/oura/oura_daily_readiness_contributors.avsc create mode 100644 commons/connector/oura/oura_daily_sleep.avsc create mode 100644 commons/connector/oura/oura_daily_sleep_contributors.avsc create mode 100644 commons/connector/oura/oura_heart_rate.avsc diff --git a/commons/connector/oura/oura_daily_activity.avsc b/commons/connector/oura/oura_daily_activity.avsc new file mode 100644 index 00000000..59cfe39d --- /dev/null +++ b/commons/connector/oura/oura_daily_activity.avsc @@ -0,0 +1,37 @@ +{ + "namespace": "org.radarcns.connector.oura", + "name": "OuraDailyActivity", + "type": "record", + "doc": "The Daily Activity scope includes daily activity summary values and detailed activity levels. Activity levels are expressed in metabolic equivalent of task minutes (MET mins). Oura tracks activity based on the movement.", + "fields": [ + {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, + {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the activity from Oura.", "default": null}, + {"name": "fiveMinuteClass", "type": ["null", "int"], "doc": "5-minute activity classification for the activity period: 0 - Non-wear, 1 - Rest, 2 - Inactive, 3 - Low Activity, 4 - Medium Activity, 5 - High Activity. Null if unknown.", "default": null}, + {"name": "score", "type": ["null", "int"], "doc": "Activity score in range [1, 100]. Null if unknown.", "default": null}, + {"name": "activeCalories", "type": ["null", "int"], "doc": "Active calories expended (in kilocalories). Null if unknown.", "default": null}, + {"name": "averageMetMinutes", "type": ["null", "int"], "doc": "Average metabolic equivalent (MET) in minutes. Null if unknown.", "default": null}, + {"name": "contributors", "type": ["null", "OuraDailyctivityContributors"], "doc": "Object defining the daily activity score contributors. Null if unknown.", "default": null}, + {"name": "equivalentWalkingDistance", "type": ["null", "int"], "doc": "Equivalent walking distance (in meters) of energy expenditure. Null if unknown.", "default": null}, + {"name": "highActivityMetMinutes", "type": ["null", "int"], "doc": "High activity metabolic equivalent (MET) in minutes. Null if unknown.", "default": null}, + {"name": "highActivityTime", "type": ["null", "int"], "doc": "High activity metabolic equivalent (MET) in seconds. Null if unknown.", "default": null}, + {"name": "inactivityAlerts", "type": ["null", "int"], "doc": "Number of inactivity alerts received. Null if unknown.", "default": null}, + {"name": "lowActivityMetMinutes", "type": ["null", "int"], "doc": "Low activity metabolic equivalent (MET) in minutes. Null if unknown.", "default": null}, + {"name": "lowActivityTime", "type": ["null", "int"], "doc": "Low activity metabolic equivalent (MET) in seconds. Null if unknown.", "default": null}, + {"name": "mediumActivityMetMinutes", "type": ["null", "int"], "doc": "Medium activity metabolic equivalent (MET) in minutes. Null if unknown.", "default": null}, + {"name": "mediumActivityTime", "type": ["null", "int"], "doc": "Medium activity metabolic equivalent (MET) in seconds. Null if unknown.", "default": null}, {"name": "inactivityAlerts", "type": ["null", "int"], "doc": "Duration in the heart rate zone 'Peak', which is the highest heart rate zone (s). Null if unknown.", "default": null}, + {"name": "metSampleInterval", "type": ["null", "int"], "doc": "Interval in seconds between the sampled items. Null if unknown.", "default": null}, + {"name": "metSampleItems", "type": ["null", "int"], "doc": "Recorded sample items. Null if unknown.", "default": null}, + {"name": "metSampleTimestamp", "type": ["null", "int"], "doc": "Timestamp when the sample recording started. Null if unknown.", "default": null}, + {"name": "metersToTarget", "type": ["null", "int"], "doc": "Remaining meters to target. Null if unknown.", "default": null}, + {"name": "nonWearTime", "type": ["null", "int"], "doc": "The time (in seconds) in which the ring was not worn. Null if unknown.", "default": null}, + {"name": "restingTime", "type": ["null", "int"], "doc": "Resting time (in seconds). Null if unknown.", "default": null}, + {"name": "sedentaryMetMinutes", "type": ["null", "int"], "doc": "Sedentary metabolic equivalent (MET) in minutes. Null if unknown.", "default": null}, + {"name": "sedentaryTime", "type": ["null", "int"], "doc": "Sedentary metabolic equivalent (MET) in seconds. Null if unknown.", "default": null}, + {"name": "steps", "type": ["null", "int"], "doc": "Total number of steps taken. Null if unknown.", "default": null}, + {"name": "targetCalories", "type": ["null", "int"], "doc": "Daily activity target (in kilocalories). Null if unknown.", "default": null}, + {"name": "targetMeters", "type": ["null", "int"], "doc": "Daily activity target (in meters). Null if unknown.", "default": null}, + {"name": "totalCalories", "type": ["null", "int"], "doc": "Total calories expended (in kilocalories). Null if unknown.", "default": null}, + {"name": "day", "type": ["null", "int"], "doc": "The YYYY-MM-DD formatted local date indicating when the daily activity occurred. Null if unknown.", "default": null}, + ] +} diff --git a/commons/connector/oura/oura_daily_activity_contributors.avsc b/commons/connector/oura/oura_daily_activity_contributors.avsc new file mode 100644 index 00000000..2dca5a7b --- /dev/null +++ b/commons/connector/oura/oura_daily_activity_contributors.avsc @@ -0,0 +1,14 @@ +{ + "namespace": "org.radarcns.connector.oura", + "name": "OuraDailyActivityContributors", + "type": "record", + "doc": "This defines how the activity score is calculated by different contributors.", + "fields": [ + {"name": "meetDailyTargets", "type": ["null", "int"], "doc": "Contribution of meeting previous 7-day daily activity targets in range [1, 100]. Null if unknown.", "default": null}, + {"name": "moveEveryHour", "type": ["null", "int"], "doc": "Contribution of previous 24-hour inactivity alerts in range [1, 100]. Null if unknown.", "default": null}, + {"name": "recoveryTime", "type": ["null", "int"], "doc": "Contribution of previous 7-day recovery time in range [1, 100]. Null if unknown.", "default": null}, + {"name": "stayActive", "type": ["null", "int"], "doc": "Contribution of previous 24-hour activity in range [1, 100]. Null if unknown.", "default": null}, + {"name": "trainingFrequency", "type": ["null", "int"], "doc": "Contribution of previous 7-day exercise frequency in range [1, 100]. Null if unknown.", "default": null}, + {"name": "trainingVolume", "type": ["null", "int"], "doc": "Contribution of previous 7-day exercise volume in range [1, 100]. Null if unknown.", "default": null}, + ] +} diff --git a/commons/connector/oura/oura_daily_readiness.avsc b/commons/connector/oura/oura_daily_readiness.avsc new file mode 100644 index 00000000..75ce45bf --- /dev/null +++ b/commons/connector/oura/oura_daily_readiness.avsc @@ -0,0 +1,16 @@ +{ + "namespace": "org.radarcns.connector.oura", + "name": "OuraDailyReadiness", + "type": "record", + "doc": "This includes the daily readiness summary values. Readiness tells how ready you are for the day.", + "fields": [ + {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, + {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the readiness data from Oura.", "default": null}, + {"name": "contributors", "type": ["null", "OuraDailyReadinessContributors"], "doc": "Object defining the daily readiness score contributors. Null if unknown.", "default": null}, + {"name": "day", "type": ["null", "string"], "doc": "Day that the daily readiness belongs to. Null if unknown.", "default": null}, + {"name": "score", "type": ["null", "int"], "doc": "Daily readiness score in range [1, 100]. Null if unknown.", "default": null}, + {"name": "temperatureDeviation", "type": ["null", "int"], "doc": "Temperature deviation in degrees Celsius. Null if unknown.", "default": null}, + {"name": "temperatureTrendDeviation", "type": ["null", "int"], "doc": "Temperature trend deviation in degrees Celsius. Null if unknown.", "default": null} + ] +} diff --git a/commons/connector/oura/oura_daily_readiness_contributors.avsc b/commons/connector/oura/oura_daily_readiness_contributors.avsc new file mode 100644 index 00000000..4c6b7412 --- /dev/null +++ b/commons/connector/oura/oura_daily_readiness_contributors.avsc @@ -0,0 +1,16 @@ +{ + "namespace": "org.radarcns.connector.oura", + "name": "OuraDailyReadinessContributors", + "type": "record", + "doc": "This defines how the readiness score is calculated by different contributors.", + "fields": [ + {"name": "activityBalance", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance in range [1, 100]. Null if unknown.", "default": null}, + {"name": "bodyTemperature", "type": ["null", "int"], "doc": "Contribution of body temperature in range [1, 100]. Null if unknown.", "default": null}, + {"name": "hrvBalance", "type": ["null", "int"], "doc": "Contribution of heart rate variability balance in range [1, 100]. Null if unknown.", "default": null}, + {"name": "previousDayActivity", "type": ["null", "int"], "doc": "Contribution of previous day's activity in range [1, 100]. Null if unknown.", "default": null}, + {"name": "previousNight", "type": ["null", "int"], "doc": "Contribution of previous night's sleep in range [1, 100]. Null if unknown.", "default": null}, + {"name": "recoveryIndex", "type": ["null", "int"], "doc": "Contribution of previous 7-day exercise volume in range [1, 100]. Null if unknown.", "default": null}, + {"name": "restingHeartRate", "type": ["null", "int"], "doc": "Contribution of resting heart rate in range [1, 100]. Null if unknown.", "default": null}, + {"name": "sleepBalance", "type": ["null", "int"], "doc": "Contribution of sleep balance in range [1, 100]. Null if unknown.", "default": null}, + ] +} diff --git a/commons/connector/oura/oura_daily_sleep.avsc b/commons/connector/oura/oura_daily_sleep.avsc new file mode 100644 index 00000000..1ff0e606 --- /dev/null +++ b/commons/connector/oura/oura_daily_sleep.avsc @@ -0,0 +1,14 @@ +{ + "namespace": "org.radarcns.connector.oura", + "name": "OuraDailySleep", + "type": "record", + "doc": "This includes the daily sleep summary values. Sleep period is a nearly continuous, longish period of time spent lying down in bed.", + "fields": [ + {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, + {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the sleep data from Oura.", "default": null}, + {"name": "contributors", "type": ["null", "OuraDailySleepContributors"], "doc": "Object defining the daily sleep score contributors. Null if unknown.", "default": null}, + {"name": "day", "type": ["null", "string"], "doc": "Day that the daily sleep belongs to. Null if unknown.", "default": null}, + {"name": "score", "type": ["null", "int"], "doc": "Daily sleep score in range [1, 100]. Null if unknown.", "default": null}, + ] +} diff --git a/commons/connector/oura/oura_daily_sleep_contributors.avsc b/commons/connector/oura/oura_daily_sleep_contributors.avsc new file mode 100644 index 00000000..ed61875a --- /dev/null +++ b/commons/connector/oura/oura_daily_sleep_contributors.avsc @@ -0,0 +1,15 @@ +{ + "namespace": "org.radarcns.connector.oura", + "name": "OuraDailySleepContributors", + "type": "record", + "doc": "This defines how the sleep score is calculated by different contributors.", + "fields": [ + {"name": "deepSleep", "type": ["null", "int"], "doc": "Contribution of deep sleep in range [1, 100]. Null if unknown.", "default": null}, + {"name": "efficiency", "type": ["null", "int"], "doc": "Contribution of sleep efficiency in range [1, 100]. Null if unknown.", "default": null}, + {"name": "latency", "type": ["null", "int"], "doc": "Contribution of sleep latency in range [1, 100]. Null if unknown.", "default": null}, + {"name": "remSleep", "type": ["null", "int"], "doc": "Contribution of REM sleep in range [1, 100]. Null if unknown.", "default": null}, + {"name": "restfulness", "type": ["null", "int"], "doc": "Contribution of sleep restfulness in range [1, 100]. Null if unknown.", "default": null}, + {"name": "timing", "type": ["null", "int"], "doc": "Contribution of sleep timing in range [1, 100]. Null if unknown.", "default": null}, + {"name": "totalSleep", "type": ["null", "int"], "doc": "Contribution of total sleep in range [1, 100]. Null if unknown.", "default": null}, + ] +} diff --git a/commons/connector/oura/oura_heart_rate.avsc b/commons/connector/oura/oura_heart_rate.avsc new file mode 100644 index 00000000..2b7d40e6 --- /dev/null +++ b/commons/connector/oura/oura_heart_rate.avsc @@ -0,0 +1,14 @@ +{ + "namespace": "org.radarcns.connector.oura", + "name": "OuraHeartRate", + "type": "record", + "doc": "The Heart Rate data scope includes time-series heart rate data throughout the day and night. Heart rate is provided at 5-minute increments.", + "fields": [ + {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, + {"name": "bpm", "type": ["null", "int"], "doc": "Heart rate in beats per minute.", "default": null}, + {"name": "source", "type": + {"name": "OuraHeartRateSource", "type": "enum", "symbols": ["AWAKE", "REST", "SLEEP", "SESSION", "LIVE", "UNKNOWN"], "doc": "Heart rate source type as computed by Oura."}, + "doc": "Heart rate source type as computed by Oura.", "default": "UNKNOWN" } + ] +} From 8a5ce9dfdc007e3ae7629c7d3453eaa4d80f6405 Mon Sep 17 00:00:00 2001 From: mpgxvii Date: Fri, 2 Jun 2023 15:06:06 +0100 Subject: [PATCH 02/42] Add Oura workout schema --- .../connector/oura/oura_daily_activity.avsc | 5 ++-- commons/connector/oura/oura_workout.avsc | 23 +++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 commons/connector/oura/oura_workout.avsc diff --git a/commons/connector/oura/oura_daily_activity.avsc b/commons/connector/oura/oura_daily_activity.avsc index 59cfe39d..55709bab 100644 --- a/commons/connector/oura/oura_daily_activity.avsc +++ b/commons/connector/oura/oura_daily_activity.avsc @@ -19,7 +19,8 @@ {"name": "lowActivityMetMinutes", "type": ["null", "int"], "doc": "Low activity metabolic equivalent (MET) in minutes. Null if unknown.", "default": null}, {"name": "lowActivityTime", "type": ["null", "int"], "doc": "Low activity metabolic equivalent (MET) in seconds. Null if unknown.", "default": null}, {"name": "mediumActivityMetMinutes", "type": ["null", "int"], "doc": "Medium activity metabolic equivalent (MET) in minutes. Null if unknown.", "default": null}, - {"name": "mediumActivityTime", "type": ["null", "int"], "doc": "Medium activity metabolic equivalent (MET) in seconds. Null if unknown.", "default": null}, {"name": "inactivityAlerts", "type": ["null", "int"], "doc": "Duration in the heart rate zone 'Peak', which is the highest heart rate zone (s). Null if unknown.", "default": null}, + {"name": "mediumActivityTime", "type": ["null", "int"], "doc": "Medium activity metabolic equivalent (MET) in seconds. Null if unknown.", "default": null}, + {"name": "inactivityAlerts", "type": ["null", "int"], "doc": "Duration in the heart rate zone 'Peak', which is the highest heart rate zone (s). Null if unknown.", "default": null}, {"name": "metSampleInterval", "type": ["null", "int"], "doc": "Interval in seconds between the sampled items. Null if unknown.", "default": null}, {"name": "metSampleItems", "type": ["null", "int"], "doc": "Recorded sample items. Null if unknown.", "default": null}, {"name": "metSampleTimestamp", "type": ["null", "int"], "doc": "Timestamp when the sample recording started. Null if unknown.", "default": null}, @@ -32,6 +33,6 @@ {"name": "targetCalories", "type": ["null", "int"], "doc": "Daily activity target (in kilocalories). Null if unknown.", "default": null}, {"name": "targetMeters", "type": ["null", "int"], "doc": "Daily activity target (in meters). Null if unknown.", "default": null}, {"name": "totalCalories", "type": ["null", "int"], "doc": "Total calories expended (in kilocalories). Null if unknown.", "default": null}, - {"name": "day", "type": ["null", "int"], "doc": "The YYYY-MM-DD formatted local date indicating when the daily activity occurred. Null if unknown.", "default": null}, + {"name": "day", "type": ["null", "string"], "doc": "The YYYY-MM-DD formatted local date indicating when the daily activity occurred. Null if unknown.", "default": null}, ] } diff --git a/commons/connector/oura/oura_workout.avsc b/commons/connector/oura/oura_workout.avsc new file mode 100644 index 00000000..cfeb7677 --- /dev/null +++ b/commons/connector/oura/oura_workout.avsc @@ -0,0 +1,23 @@ +{ + "namespace": "org.radarcns.connector.oura", + "name": "OuraWorkout", + "type": "record", + "doc": "The Workout data scope includes information about user workouts. This is a diverse, growing list of workouts that help inform how the user is training and exercising.", + "fields": [ + {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, + {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the workout from Oura.", "default": null}, + {"name": "calories", "type": ["null", "int"], "doc": "Energy burned in kilocalories during the workout. Null if unknown.", "default": null}, + {"name": "day", "type": ["null", "string"], "doc": "Day when the workout occurred. Null if unknown.", "default": null}, + {"name": "distance", "type": ["null", "float"], "doc": "Distance traveled in meters during the workout. Null if unknown.", "default": null}, + {"name": "startDateTime", "type": ["null", "string"], "doc": "Timestamp indicating when the workout started. Null if unknown.", "default": null}, + {"name": "endDateTime", "type": ["null", "string"], "doc": "Timestamp indicating when the workout ended. Null if unknown.", "default": null}, + {"name": "intensity", "type": + {"name": "OuraWorkoutIntensity", "type": "enum", "symbols": ["EASY", "MODERATE", "HARD", "UNKNOWN"], "doc": "Workout intensity as computed by Oura."}, + "doc": "Workout intensity as computed by Oura.", "default": "UNKNOWN" }, + {"name": "label", "type": ["null", "string"], "doc": "User-defined label for the workout. Null if unknown.", "default": null}, + {"name": "source", "type": + {"name": "OuraWorkoutSource", "type": "enum", "symbols": ["MANUAL", "AUTODETECTED", "CONFIRMED", "WORKOUT_HEART_RATE", "UNKNOWN"], "doc": "Workout source type as computed by Oura."}, + "doc": "Workout source type as computed by Oura.", "default": "UNKNOWN" } + ] +} From 15262f01c15f29db12da7498ec330add83bf3829 Mon Sep 17 00:00:00 2001 From: mpgxvii Date: Fri, 9 Jun 2023 12:29:27 +0100 Subject: [PATCH 03/42] Fix Oura schemas, flatten fields --- .../connector/oura/oura_daily_activity.avsc | 10 +++++++--- .../oura_daily_activity_contributors.avsc | 14 -------------- .../connector/oura/oura_daily_readiness.avsc | 9 ++++++++- .../oura_daily_readiness_contributors.avsc | 16 ---------------- commons/connector/oura/oura_daily_sleep.avsc | 11 ++++++++--- .../oura/oura_daily_sleep_contributors.avsc | 15 --------------- commons/connector/oura/oura_session.avsc | 19 +++++++++++++++++++ 7 files changed, 42 insertions(+), 52 deletions(-) delete mode 100644 commons/connector/oura/oura_daily_activity_contributors.avsc delete mode 100644 commons/connector/oura/oura_daily_readiness_contributors.avsc delete mode 100644 commons/connector/oura/oura_daily_sleep_contributors.avsc create mode 100644 commons/connector/oura/oura_session.avsc diff --git a/commons/connector/oura/oura_daily_activity.avsc b/commons/connector/oura/oura_daily_activity.avsc index 55709bab..df49ace7 100644 --- a/commons/connector/oura/oura_daily_activity.avsc +++ b/commons/connector/oura/oura_daily_activity.avsc @@ -11,7 +11,12 @@ {"name": "score", "type": ["null", "int"], "doc": "Activity score in range [1, 100]. Null if unknown.", "default": null}, {"name": "activeCalories", "type": ["null", "int"], "doc": "Active calories expended (in kilocalories). Null if unknown.", "default": null}, {"name": "averageMetMinutes", "type": ["null", "int"], "doc": "Average metabolic equivalent (MET) in minutes. Null if unknown.", "default": null}, - {"name": "contributors", "type": ["null", "OuraDailyctivityContributors"], "doc": "Object defining the daily activity score contributors. Null if unknown.", "default": null}, + {"name": "contributorMeetDailyTargets", "type": ["null", "int"], "doc": "Contribution of meeting previous 7-day daily activity targets in range [1, 100] to the activity score. Null if unknown.", "default": null}, + {"name": "contributorMoveEveryHour", "type": ["null", "int"], "doc": "Contribution of previous 24-hour inactivity alerts in range [1, 100] to the activity score. Null if unknown.", "default": null}, + {"name": "contributorRecoveryTime", "type": ["null", "int"], "doc": "Contribution of previous 7-day recovery time in range [1, 100] to the activity score. Null if unknown.", "default": null}, + {"name": "contributorStayActive", "type": ["null", "int"], "doc": "Contribution of previous 24-hour activity in range [1, 100] to the activity score. Null if unknown.", "default": null}, + {"name": "contirbutorTrainingFrequency", "type": ["null", "int"], "doc": "Contribution of previous 7-day exercise frequency in range [1, 100] to the activity score. Null if unknown.", "default": null}, + {"name": "contributorTrainingVolume", "type": ["null", "int"], "doc": "Contribution of previous 7-day exercise volume in range [1, 100] to the activity score. Null if unknown.", "default": null}, {"name": "equivalentWalkingDistance", "type": ["null", "int"], "doc": "Equivalent walking distance (in meters) of energy expenditure. Null if unknown.", "default": null}, {"name": "highActivityMetMinutes", "type": ["null", "int"], "doc": "High activity metabolic equivalent (MET) in minutes. Null if unknown.", "default": null}, {"name": "highActivityTime", "type": ["null", "int"], "doc": "High activity metabolic equivalent (MET) in seconds. Null if unknown.", "default": null}, @@ -20,7 +25,6 @@ {"name": "lowActivityTime", "type": ["null", "int"], "doc": "Low activity metabolic equivalent (MET) in seconds. Null if unknown.", "default": null}, {"name": "mediumActivityMetMinutes", "type": ["null", "int"], "doc": "Medium activity metabolic equivalent (MET) in minutes. Null if unknown.", "default": null}, {"name": "mediumActivityTime", "type": ["null", "int"], "doc": "Medium activity metabolic equivalent (MET) in seconds. Null if unknown.", "default": null}, - {"name": "inactivityAlerts", "type": ["null", "int"], "doc": "Duration in the heart rate zone 'Peak', which is the highest heart rate zone (s). Null if unknown.", "default": null}, {"name": "metSampleInterval", "type": ["null", "int"], "doc": "Interval in seconds between the sampled items. Null if unknown.", "default": null}, {"name": "metSampleItems", "type": ["null", "int"], "doc": "Recorded sample items. Null if unknown.", "default": null}, {"name": "metSampleTimestamp", "type": ["null", "int"], "doc": "Timestamp when the sample recording started. Null if unknown.", "default": null}, @@ -33,6 +37,6 @@ {"name": "targetCalories", "type": ["null", "int"], "doc": "Daily activity target (in kilocalories). Null if unknown.", "default": null}, {"name": "targetMeters", "type": ["null", "int"], "doc": "Daily activity target (in meters). Null if unknown.", "default": null}, {"name": "totalCalories", "type": ["null", "int"], "doc": "Total calories expended (in kilocalories). Null if unknown.", "default": null}, - {"name": "day", "type": ["null", "string"], "doc": "The YYYY-MM-DD formatted local date indicating when the daily activity occurred. Null if unknown.", "default": null}, + {"name": "day", "type": ["null", "string"], "doc": "The YYYY-MM-DD formatted local date indicating when the daily activity occurred. Null if unknown.", "default": null} ] } diff --git a/commons/connector/oura/oura_daily_activity_contributors.avsc b/commons/connector/oura/oura_daily_activity_contributors.avsc deleted file mode 100644 index 2dca5a7b..00000000 --- a/commons/connector/oura/oura_daily_activity_contributors.avsc +++ /dev/null @@ -1,14 +0,0 @@ -{ - "namespace": "org.radarcns.connector.oura", - "name": "OuraDailyActivityContributors", - "type": "record", - "doc": "This defines how the activity score is calculated by different contributors.", - "fields": [ - {"name": "meetDailyTargets", "type": ["null", "int"], "doc": "Contribution of meeting previous 7-day daily activity targets in range [1, 100]. Null if unknown.", "default": null}, - {"name": "moveEveryHour", "type": ["null", "int"], "doc": "Contribution of previous 24-hour inactivity alerts in range [1, 100]. Null if unknown.", "default": null}, - {"name": "recoveryTime", "type": ["null", "int"], "doc": "Contribution of previous 7-day recovery time in range [1, 100]. Null if unknown.", "default": null}, - {"name": "stayActive", "type": ["null", "int"], "doc": "Contribution of previous 24-hour activity in range [1, 100]. Null if unknown.", "default": null}, - {"name": "trainingFrequency", "type": ["null", "int"], "doc": "Contribution of previous 7-day exercise frequency in range [1, 100]. Null if unknown.", "default": null}, - {"name": "trainingVolume", "type": ["null", "int"], "doc": "Contribution of previous 7-day exercise volume in range [1, 100]. Null if unknown.", "default": null}, - ] -} diff --git a/commons/connector/oura/oura_daily_readiness.avsc b/commons/connector/oura/oura_daily_readiness.avsc index 75ce45bf..448c0196 100644 --- a/commons/connector/oura/oura_daily_readiness.avsc +++ b/commons/connector/oura/oura_daily_readiness.avsc @@ -7,7 +7,14 @@ {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the readiness data from Oura.", "default": null}, - {"name": "contributors", "type": ["null", "OuraDailyReadinessContributors"], "doc": "Object defining the daily readiness score contributors. Null if unknown.", "default": null}, + {"name": "contributorActivityBalance", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance in range [1, 100] to the readiness score. Null if unknown.", "default": null}, + {"name": "contributorBodyTemperature", "type": ["null", "int"], "doc": "Contribution of body temperature in range [1, 100] to the readiness score. Null if unknown.", "default": null}, + {"name": "contributorHrvBalance", "type": ["null", "int"], "doc": "Contribution of heart rate variability balance in range [1, 100] to the readiness score. Null if unknown.", "default": null}, + {"name": "contributorPreviousDayActivity", "type": ["null", "int"], "doc": "Contribution of previous day's activity in range [1, 100] to the readiness score. Null if unknown.", "default": null}, + {"name": "contributorPreviousNight", "type": ["null", "int"], "doc": "Contribution of previous night's sleep in range [1, 100] to the readiness score. Null if unknown.", "default": null}, + {"name": "contributorRecoveryIndex", "type": ["null", "int"], "doc": "Contribution of previous 7-day exercise volume in range [1, 100] to the readiness score. Null if unknown.", "default": null}, + {"name": "contributorRestingHeartRate", "type": ["null", "int"], "doc": "Contribution of resting heart rate in range [1, 100] to the readiness score. Null if unknown.", "default": null}, + {"name": "contributorSleepBalance", "type": ["null", "int"], "doc": "Contribution of sleep balance in range [1, 100] to the readiness score. Null if unknown.", "default": null}, {"name": "day", "type": ["null", "string"], "doc": "Day that the daily readiness belongs to. Null if unknown.", "default": null}, {"name": "score", "type": ["null", "int"], "doc": "Daily readiness score in range [1, 100]. Null if unknown.", "default": null}, {"name": "temperatureDeviation", "type": ["null", "int"], "doc": "Temperature deviation in degrees Celsius. Null if unknown.", "default": null}, diff --git a/commons/connector/oura/oura_daily_readiness_contributors.avsc b/commons/connector/oura/oura_daily_readiness_contributors.avsc deleted file mode 100644 index 4c6b7412..00000000 --- a/commons/connector/oura/oura_daily_readiness_contributors.avsc +++ /dev/null @@ -1,16 +0,0 @@ -{ - "namespace": "org.radarcns.connector.oura", - "name": "OuraDailyReadinessContributors", - "type": "record", - "doc": "This defines how the readiness score is calculated by different contributors.", - "fields": [ - {"name": "activityBalance", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance in range [1, 100]. Null if unknown.", "default": null}, - {"name": "bodyTemperature", "type": ["null", "int"], "doc": "Contribution of body temperature in range [1, 100]. Null if unknown.", "default": null}, - {"name": "hrvBalance", "type": ["null", "int"], "doc": "Contribution of heart rate variability balance in range [1, 100]. Null if unknown.", "default": null}, - {"name": "previousDayActivity", "type": ["null", "int"], "doc": "Contribution of previous day's activity in range [1, 100]. Null if unknown.", "default": null}, - {"name": "previousNight", "type": ["null", "int"], "doc": "Contribution of previous night's sleep in range [1, 100]. Null if unknown.", "default": null}, - {"name": "recoveryIndex", "type": ["null", "int"], "doc": "Contribution of previous 7-day exercise volume in range [1, 100]. Null if unknown.", "default": null}, - {"name": "restingHeartRate", "type": ["null", "int"], "doc": "Contribution of resting heart rate in range [1, 100]. Null if unknown.", "default": null}, - {"name": "sleepBalance", "type": ["null", "int"], "doc": "Contribution of sleep balance in range [1, 100]. Null if unknown.", "default": null}, - ] -} diff --git a/commons/connector/oura/oura_daily_sleep.avsc b/commons/connector/oura/oura_daily_sleep.avsc index 1ff0e606..1774df03 100644 --- a/commons/connector/oura/oura_daily_sleep.avsc +++ b/commons/connector/oura/oura_daily_sleep.avsc @@ -7,8 +7,13 @@ {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the sleep data from Oura.", "default": null}, - {"name": "contributors", "type": ["null", "OuraDailySleepContributors"], "doc": "Object defining the daily sleep score contributors. Null if unknown.", "default": null}, - {"name": "day", "type": ["null", "string"], "doc": "Day that the daily sleep belongs to. Null if unknown.", "default": null}, - {"name": "score", "type": ["null", "int"], "doc": "Daily sleep score in range [1, 100]. Null if unknown.", "default": null}, + {"name": "contributorDeepSleep", "type": ["null", "int"], "doc": "Contribution of deep sleep in range [1, 100] to the sleep score. Null if unknown.", "default": null}, + {"name": "contributorEfficiency", "type": ["null", "int"], "doc": "Contribution of sleep efficiency in range [1, 100] to the sleep score. Null if unknown.", "default": null}, + {"name": "contributorLatency", "type": ["null", "int"], "doc": "Contribution of sleep latency in range [1, 100] to the sleep score. Null if unknown.", "default": null}, + {"name": "contributorRemSleep", "type": ["null", "int"], "doc": "Contribution of REM sleep in range [1, 100] to the sleep score. Null if unknown.", "default": null}, + {"name": "contributorRestfulness", "type": ["null", "int"], "doc": "Contribution of sleep restfulness in range [1, 100] to the sleep score. Null if unknown.", "default": null}, + {"name": "contributorTiming", "type": ["null", "int"], "doc": "Contribution of sleep timing in range [1, 100] to the sleep score. Null if unknown.", "default": null}, + {"name": "contributorTotalSleep", "type": ["null", "int"], "doc": "Contribution of total sleep in range [1, 100] to the sleep score. Null if unknown.", "default": null}, {"name": "day", "type": ["null", "string"], "doc": "Day that the daily sleep belongs to. Null if unknown.", "default": null}, + {"name": "score", "type": ["null", "int"], "doc": "Daily sleep score in range [1, 100]. Null if unknown.", "default": null} ] } diff --git a/commons/connector/oura/oura_daily_sleep_contributors.avsc b/commons/connector/oura/oura_daily_sleep_contributors.avsc deleted file mode 100644 index ed61875a..00000000 --- a/commons/connector/oura/oura_daily_sleep_contributors.avsc +++ /dev/null @@ -1,15 +0,0 @@ -{ - "namespace": "org.radarcns.connector.oura", - "name": "OuraDailySleepContributors", - "type": "record", - "doc": "This defines how the sleep score is calculated by different contributors.", - "fields": [ - {"name": "deepSleep", "type": ["null", "int"], "doc": "Contribution of deep sleep in range [1, 100]. Null if unknown.", "default": null}, - {"name": "efficiency", "type": ["null", "int"], "doc": "Contribution of sleep efficiency in range [1, 100]. Null if unknown.", "default": null}, - {"name": "latency", "type": ["null", "int"], "doc": "Contribution of sleep latency in range [1, 100]. Null if unknown.", "default": null}, - {"name": "remSleep", "type": ["null", "int"], "doc": "Contribution of REM sleep in range [1, 100]. Null if unknown.", "default": null}, - {"name": "restfulness", "type": ["null", "int"], "doc": "Contribution of sleep restfulness in range [1, 100]. Null if unknown.", "default": null}, - {"name": "timing", "type": ["null", "int"], "doc": "Contribution of sleep timing in range [1, 100]. Null if unknown.", "default": null}, - {"name": "totalSleep", "type": ["null", "int"], "doc": "Contribution of total sleep in range [1, 100]. Null if unknown.", "default": null}, - ] -} diff --git a/commons/connector/oura/oura_session.avsc b/commons/connector/oura/oura_session.avsc new file mode 100644 index 00000000..a4c52b30 --- /dev/null +++ b/commons/connector/oura/oura_session.avsc @@ -0,0 +1,19 @@ +{ + "namespace": "org.radarcns.connector.oura", + "name": "OuraSession", + "type": "record", + "doc": "The Sessions data scope provides information on how users engage with guided and unguided sessions in the Oura app, including the user’s biometric trends during the sessions.", + "fields": [ + {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, + {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the session from Oura.", "default": null}, + {"name": "startDateTime", "type": ["null", "string"], "doc": "5-minute activity classification for the activity period: 0 - Non-wear, 1 - Rest, 2 - Inactive, 3 - Low Activity, 4 - Medium Activity, 5 - High Activity. Null if unknown.", "default": null}, + {"name": "endDateTime", "type": ["null", "string"], "doc": "Activity score in range [1, 100]. Null if unknown.", "default": null}, + {"name": "type", "type": + {"name": "OuraMomentType", "type": "enum", "symbols": ["BREATHING", "MEDITATION", "NAP", "RELAXATION", "REST", "BODY_STATUS", "UNKNOWN"], "doc": "Possible Oura Moment types."}, + "doc": "Oura Moment type.", "default": "UNKNOWN" }, + {"name": "mood", "type": + {"name": "OuraMomentMood", "type": "enum", "symbols": ["BAD", "WORSE", "SAME", "GOOD", "GREAT", "UNKNOWN"], "doc": "Possible Oura Moment moods."}, + "doc": "Oura Moment mood.", "default": "UNKNOWN" } + ] +} From be21a9a66c752a7de731af8bb8e58ef3e8542624 Mon Sep 17 00:00:00 2001 From: mpgxvii Date: Fri, 9 Jun 2023 12:39:38 +0100 Subject: [PATCH 04/42] Fix Oura schema docs --- commons/connector/oura/oura_daily_activity.avsc | 2 +- commons/connector/oura/oura_session.avsc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/commons/connector/oura/oura_daily_activity.avsc b/commons/connector/oura/oura_daily_activity.avsc index df49ace7..e265782b 100644 --- a/commons/connector/oura/oura_daily_activity.avsc +++ b/commons/connector/oura/oura_daily_activity.avsc @@ -7,7 +7,7 @@ {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the activity from Oura.", "default": null}, - {"name": "fiveMinuteClass", "type": ["null", "int"], "doc": "5-minute activity classification for the activity period: 0 - Non-wear, 1 - Rest, 2 - Inactive, 3 - Low Activity, 4 - Medium Activity, 5 - High Activity. Null if unknown.", "default": null}, + {"name": "fiveMinuteClass", "type": ["null", "int"], "doc": "A 5-minute activity classification for the activity period: 0 - Non-wear, 1 - Rest, 2 - Inactive, 3 - Low Activity, 4 - Medium Activity, 5 - High Activity. Null if unknown.", "default": null}, {"name": "score", "type": ["null", "int"], "doc": "Activity score in range [1, 100]. Null if unknown.", "default": null}, {"name": "activeCalories", "type": ["null", "int"], "doc": "Active calories expended (in kilocalories). Null if unknown.", "default": null}, {"name": "averageMetMinutes", "type": ["null", "int"], "doc": "Average metabolic equivalent (MET) in minutes. Null if unknown.", "default": null}, diff --git a/commons/connector/oura/oura_session.avsc b/commons/connector/oura/oura_session.avsc index a4c52b30..ab64a0b8 100644 --- a/commons/connector/oura/oura_session.avsc +++ b/commons/connector/oura/oura_session.avsc @@ -7,8 +7,8 @@ {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the session from Oura.", "default": null}, - {"name": "startDateTime", "type": ["null", "string"], "doc": "5-minute activity classification for the activity period: 0 - Non-wear, 1 - Rest, 2 - Inactive, 3 - Low Activity, 4 - Medium Activity, 5 - High Activity. Null if unknown.", "default": null}, - {"name": "endDateTime", "type": ["null", "string"], "doc": "Activity score in range [1, 100]. Null if unknown.", "default": null}, + {"name": "startDateTime", "type": ["null", "string"], "doc": "Timestamp indicating when the workout started. Null if unknown.", "default": null}, + {"name": "endDateTime", "type": ["null", "string"], "doc": "Timestamp indicating when the workout ended. Null if unknown.", "default": null}, {"name": "type", "type": {"name": "OuraMomentType", "type": "enum", "symbols": ["BREATHING", "MEDITATION", "NAP", "RELAXATION", "REST", "BODY_STATUS", "UNKNOWN"], "doc": "Possible Oura Moment types."}, "doc": "Oura Moment type.", "default": "UNKNOWN" }, From 2a3887d76536ba3038a4d177e86a68bc25d80dd8 Mon Sep 17 00:00:00 2001 From: mpgxvii Date: Fri, 9 Jun 2023 16:13:46 +0100 Subject: [PATCH 05/42] Fix schema formatting --- commons/connector/oura/oura_daily_sleep.avsc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commons/connector/oura/oura_daily_sleep.avsc b/commons/connector/oura/oura_daily_sleep.avsc index 1774df03..0e97ce29 100644 --- a/commons/connector/oura/oura_daily_sleep.avsc +++ b/commons/connector/oura/oura_daily_sleep.avsc @@ -13,7 +13,8 @@ {"name": "contributorRemSleep", "type": ["null", "int"], "doc": "Contribution of REM sleep in range [1, 100] to the sleep score. Null if unknown.", "default": null}, {"name": "contributorRestfulness", "type": ["null", "int"], "doc": "Contribution of sleep restfulness in range [1, 100] to the sleep score. Null if unknown.", "default": null}, {"name": "contributorTiming", "type": ["null", "int"], "doc": "Contribution of sleep timing in range [1, 100] to the sleep score. Null if unknown.", "default": null}, - {"name": "contributorTotalSleep", "type": ["null", "int"], "doc": "Contribution of total sleep in range [1, 100] to the sleep score. Null if unknown.", "default": null}, {"name": "day", "type": ["null", "string"], "doc": "Day that the daily sleep belongs to. Null if unknown.", "default": null}, + {"name": "contributorTotalSleep", "type": ["null", "int"], "doc": "Contribution of total sleep in range [1, 100] to the sleep score. Null if unknown.", "default": null}, + {"name": "day", "type": ["null", "string"], "doc": "Day that the daily sleep belongs to. Null if unknown.", "default": null}, {"name": "score", "type": ["null", "int"], "doc": "Daily sleep score in range [1, 100]. Null if unknown.", "default": null} ] } From b1c5668b4c6d90fdf2510de561fa757590969b75 Mon Sep 17 00:00:00 2001 From: mpgxvii Date: Tue, 13 Jun 2023 16:37:57 +0100 Subject: [PATCH 06/42] Add rest of Oura schemas --- .../connector/oura/oura_daily_readiness.avsc | 2 +- commons/connector/oura/oura_daily_sleep.avsc | 2 +- commons/connector/oura/oura_heart_rate.avsc | 2 +- .../oura/oura_heart_rate_variability.avsc | 11 +++++ commons/connector/oura/oura_met.avsc | 11 +++++ commons/connector/oura/oura_motion_count.avsc | 11 +++++ .../connector/oura/oura_personal_info.avsc | 16 +++++++ commons/connector/oura/oura_readiness.avsc | 24 ++++++++++ commons/connector/oura/oura_sleep.avsc | 45 +++++++++++++++++++ commons/connector/oura/oura_tag.avsc | 14 ++++++ 10 files changed, 135 insertions(+), 3 deletions(-) create mode 100644 commons/connector/oura/oura_heart_rate_variability.avsc create mode 100644 commons/connector/oura/oura_met.avsc create mode 100644 commons/connector/oura/oura_motion_count.avsc create mode 100644 commons/connector/oura/oura_personal_info.avsc create mode 100644 commons/connector/oura/oura_readiness.avsc create mode 100644 commons/connector/oura/oura_sleep.avsc create mode 100644 commons/connector/oura/oura_tag.avsc diff --git a/commons/connector/oura/oura_daily_readiness.avsc b/commons/connector/oura/oura_daily_readiness.avsc index 448c0196..b2bebf66 100644 --- a/commons/connector/oura/oura_daily_readiness.avsc +++ b/commons/connector/oura/oura_daily_readiness.avsc @@ -4,7 +4,7 @@ "type": "record", "doc": "This includes the daily readiness summary values. Readiness tells how ready you are for the day.", "fields": [ - {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "time", "type": "double", "doc": "Time the daily readiness record belongs to in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the readiness data from Oura.", "default": null}, {"name": "contributorActivityBalance", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance in range [1, 100] to the readiness score. Null if unknown.", "default": null}, diff --git a/commons/connector/oura/oura_daily_sleep.avsc b/commons/connector/oura/oura_daily_sleep.avsc index 0e97ce29..d6917787 100644 --- a/commons/connector/oura/oura_daily_sleep.avsc +++ b/commons/connector/oura/oura_daily_sleep.avsc @@ -4,7 +4,7 @@ "type": "record", "doc": "This includes the daily sleep summary values. Sleep period is a nearly continuous, longish period of time spent lying down in bed.", "fields": [ - {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "time", "type": "double", "doc": "Start time of the sleep in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the sleep data from Oura.", "default": null}, {"name": "contributorDeepSleep", "type": ["null", "int"], "doc": "Contribution of deep sleep in range [1, 100] to the sleep score. Null if unknown.", "default": null}, diff --git a/commons/connector/oura/oura_heart_rate.avsc b/commons/connector/oura/oura_heart_rate.avsc index 2b7d40e6..94c6a9c6 100644 --- a/commons/connector/oura/oura_heart_rate.avsc +++ b/commons/connector/oura/oura_heart_rate.avsc @@ -10,5 +10,5 @@ {"name": "source", "type": {"name": "OuraHeartRateSource", "type": "enum", "symbols": ["AWAKE", "REST", "SLEEP", "SESSION", "LIVE", "UNKNOWN"], "doc": "Heart rate source type as computed by Oura."}, "doc": "Heart rate source type as computed by Oura.", "default": "UNKNOWN" } - ] + ] } diff --git a/commons/connector/oura/oura_heart_rate_variability.avsc b/commons/connector/oura/oura_heart_rate_variability.avsc new file mode 100644 index 00000000..977d8d75 --- /dev/null +++ b/commons/connector/oura/oura_heart_rate_variability.avsc @@ -0,0 +1,11 @@ +{ + "namespace": "org.radarcns.connector.oura", + "name": "OuraHeartRateVariability", + "type": "record", + "doc": "This describes the heart rate variability provided by the Oura Ring.", + "fields": [ + {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, + {"name": "hrv", "type": ["null", "float"], "doc": "The HRV value in milliseconds.", "default": null} + ] +} diff --git a/commons/connector/oura/oura_met.avsc b/commons/connector/oura/oura_met.avsc new file mode 100644 index 00000000..bf164242 --- /dev/null +++ b/commons/connector/oura/oura_met.avsc @@ -0,0 +1,11 @@ +{ + "namespace": "org.radarcns.connector.oura", + "name": "OuraMet", + "type": "record", + "doc": "This describes the metabolic equivalent data (MET) during an activity.", + "fields": [ + {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, + {"name": "met", "type": ["null", "int"], "doc": "Activity metabolic equivalent (MET) in seconds.", "default": null} + ] +} diff --git a/commons/connector/oura/oura_motion_count.avsc b/commons/connector/oura/oura_motion_count.avsc new file mode 100644 index 00000000..4e2ae15c --- /dev/null +++ b/commons/connector/oura/oura_motion_count.avsc @@ -0,0 +1,11 @@ +{ + "namespace": "org.radarcns.connector.oura", + "name": "OuraMotionCount", + "type": "record", + "doc": "This describes motion count during a session.", + "fields": [ + {"name": "time", "type": "double", "doc": "Start time of the session in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, + {"name": "motionCount", "type": ["null", "int"], "doc": "Motion count during a session.", "default": null} + ] +} diff --git a/commons/connector/oura/oura_personal_info.avsc b/commons/connector/oura/oura_personal_info.avsc new file mode 100644 index 00000000..78db5ed0 --- /dev/null +++ b/commons/connector/oura/oura_personal_info.avsc @@ -0,0 +1,16 @@ +{ + "namespace": "org.radarcns.connector.oura", + "name": "OuraPersonalInfo", + "type": "record", + "doc": "This describes personal information (e.g. age, email, weight, and height) about the user. You can access the id on the personal_info route with any access token (no scopes are required).", + "fields": [ + {"name": "time", "type": "double", "doc": "Timestamp of the record."}, + {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, + {"name": "id", "type": ["null", "string"], "doc": "ID of the record.", "default": null}, + {"name": "age", "type": ["null", "string"], "doc": "Age of the user.", "default": null}, + {"name": "weight", "type": ["null", "string"], "doc": "Weight of the user.", "default": null}, + {"name": "height", "type": ["null", "string"], "doc": "Height of the user.", "default": null}, + {"name": "biological_sex", "type": ["null", "string"], "doc": "Biological sex of the user.", "default": null}, + {"name": "email", "type": ["null", "string"], "doc": "Email of the user.", "default": null} + ] +} diff --git a/commons/connector/oura/oura_readiness.avsc b/commons/connector/oura/oura_readiness.avsc new file mode 100644 index 00000000..e2673321 --- /dev/null +++ b/commons/connector/oura/oura_readiness.avsc @@ -0,0 +1,24 @@ +{ + "namespace": "org.radarcns.connector.oura", + "name": "OuraReadiness", + "type": "record", + "doc": "This describes a user's readiness level. Readiness tells how ready you are for the day.", + "fields": [ + {"name": "time", "type": "double", "doc": "Timestamp of the daily readiness in seconds since the Unix Epoch (s)."}, + {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, + {"name": "id", "type": ["null", "string"], "doc": "ID of the record.", "default": null}, + {"name": "day", "type": ["null", "string"], "doc": "Day that the daily readiness belongs to.", "default": null}, + {"name": "score", "type": ["null", "int"], "doc": "Daily readiness score.", "default": null}, + {"name": "contributorActivityBalance", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, + {"name": "contributorBodyTemperature", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, + {"name": "contributorHrvBalance", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, + {"name": "contributorPreviousDayActivity", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, + {"name": "contributorPreviousNight", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, + {"name": "contributorRecoveryIndex", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, + {"name": "contributorRestingHeartRate", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, + {"name": "contributorSleepBalance", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, + {"name": "temperatureDeviation", "type": ["null", "int"], "doc": "Temperature deviation in degrees Celsius.", "default": null}, + {"name": "temperatureTrendDeviation", "type": ["null", "int"], "doc": "Temperature trend deviation in degrees Celsius.", "default": null} + + ] +} diff --git a/commons/connector/oura/oura_sleep.avsc b/commons/connector/oura/oura_sleep.avsc new file mode 100644 index 00000000..13bfda94 --- /dev/null +++ b/commons/connector/oura/oura_sleep.avsc @@ -0,0 +1,45 @@ +{ + "namespace": "org.radarcns.connector.oura", + "name": "OuraSleep", + "type": "record", + "doc": "Oura Sleep data for the specified Oura user within a given timeframe. A user can have multiple sleep periods per day.", + "fields": [ + {"name": "time", "type": "double", "doc": "Timestamp of the note containing the Oura tags."}, + {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, + {"name": "id", "type": ["null", "string"], "doc": "ID of the sleep record.", "default": null}, + {"name": "averageBreath", "type": ["null", "int"], "doc": "Average breathing rate during sleep as breaths/second.", "default": null}, + {"name": "averageHeartRate", "type": ["null", "int"], "doc": "Average heart rate during sleep as beats/minute.", "default": null}, + {"name": "averageHrv", "type": ["null", "int"], "doc": "Average heart rate variability during sleep.", "default": null}, + {"name": "awakeTime", "type": ["null", "int"], "doc": "Duration spent awake in seconds.", "default": null}, + {"name": "bedtimeEnd", "type": ["null", "string"], "doc": "Bedtime end of the sleep.", "default": null}, + {"name": "bedtimeStart", "type": ["null", "string"], "doc": "Bedtime start of the sleep.", "default": null}, + {"name": "day", "type": ["null", "string"], "doc": "Day that the sleep belongs to.", "default": null}, + {"name": "deepSleepDuration", "type": ["null", "int"], "doc": "Duration spent in deep sleep in seconds.", "default": null}, + {"name": "efficiency", "type": ["null", "int"], "doc": "Sleep efficiency rating in range [1, 100].", "default": null}, + {"name": "latency", "type": ["null", "int"], "doc": "Sleep latency in seconds. This is the time it took for the user to fall asleep after going to bed.", "default": null}, + {"name": "lightSleepDuration", "type": ["null", "int"], "doc": "Duration spent in light sleep in seconds.", "default": null}, + {"name": "lowBatteryAlert", "type": ["null", "boolean"], "doc": "Flag indicating if a low battery alert occurred.", "default": null}, + {"name": "lowestHeartRate", "type": ["null", "int"], "doc": "Lowest heart rate during sleep.", "default": null}, + {"name": "movementThirtySec", "type": ["null", "string"], "doc": "The 30-second movement classification for the period where every character corresponds to: '1' = no motion, '2' = restless, '3' = tossing and turning '4' = active.", "default": null}, + {"name": "period", "type": ["null", "int"], "doc": "ECore sleep period identifier.", "default": null}, + {"name": "readinessContributorActivityBalance", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, + {"name": "readinessContributorBodyTemperature", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, + {"name": "readinessContributorHrvBalance", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, + {"name": "readinessContributorPreviousDayActivity", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, + {"name": "readinessContributorPreviousNight", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, + {"name": "readinessContributorRecoveryIndex", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, + {"name": "readinessContributorRestingHeartRate", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, + {"name": "readinessContributorSleepBalance", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, + {"name": "readinessScore", "type": ["null", "int"], "doc": "Readiness score for this sleep.", "default": null}, + {"name": "readinessTemperatureDeviation", "type": ["null", "int"], "doc": "Readiness temperature deviation in degrees Celsius.", "default": null}, + {"name": "readinessTemperatureTrendDeviation", "type": ["null", "int"], "doc": "Readiness trend deviation in degrees Celsius.", "default": null}, + {"name": "readinessScoreDelta", "type": ["null", "int"], "doc": "Effect on readiness score caused by this sleep period.", "default": null}, + {"name": "remSleepDuration", "type": ["null", "int"], "doc": "Duration spent in REM sleep in seconds.", "default": null}, + {"name": "restlessPeriods", "type": ["null", "int"], "doc": "Number of restless periods during sleep.", "default": null}, + {"name": "sleepPhaseFiveMin", "type": ["null", "int"], "doc": "The 5-minute sleep phase classification for the period where every character corresponds to: '1' = deep sleep, '2' = light sleep, '3' = REM sleep '4' = awake.", "default": null}, + {"name": "sleepScoreDelta", "type": ["null", "int"], "doc": "Effect on sleep score caused by this sleep period.", "default": null}, + {"name": "timeInBed", "type": ["null", "int"], "doc": "Duration spent in bed in seconds.", "default": null}, + {"name": "totalSleepDuration", "type": ["null", "int"], "doc": "Total sleep duration in seconds.", "default": null}, + {"name": "type", "type": ["null", "string"], "doc": "Possible sleep period types.", "default": null} + ] +} diff --git a/commons/connector/oura/oura_tag.avsc b/commons/connector/oura/oura_tag.avsc new file mode 100644 index 00000000..4f05061a --- /dev/null +++ b/commons/connector/oura/oura_tag.avsc @@ -0,0 +1,14 @@ +{ + "namespace": "org.radarcns.connector.oura", + "name": "OuraTag", + "type": "record", + "doc": "This describes the tags that Oura users enter within the Oura mobile app. Tags are a growing list of activities, environment factors, symptoms, emotions, and other aspects that provide broader context into what’s happening with users beyond the objective data generated by the Oura Ring.", + "fields": [ + {"name": "time", "type": "double", "doc": "Timestamp of the note containing the Oura tags."}, + {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, + {"name": "id", "type": ["null", "string"], "doc": "Tag id of the record.", "default": null}, + {"name": "day", "type": ["null", "string"], "doc": "ID of the note or tag group.", "default": null}, + {"name": "text", "type": ["null", "string"], "doc": "Textual contents of the note.", "default": null}, + {"name": "tag", "type": ["null", "string"], "doc": "Tag part of this tag group/note.", "default": null} + ] +} From 3f222266336a4351ec7616047cbeeaafe3f6f979 Mon Sep 17 00:00:00 2001 From: mpgxvii Date: Tue, 13 Jun 2023 16:42:31 +0100 Subject: [PATCH 07/42] Fix Oura personal info schema --- commons/connector/oura/oura_personal_info.avsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commons/connector/oura/oura_personal_info.avsc b/commons/connector/oura/oura_personal_info.avsc index 78db5ed0..e1d4f770 100644 --- a/commons/connector/oura/oura_personal_info.avsc +++ b/commons/connector/oura/oura_personal_info.avsc @@ -10,7 +10,7 @@ {"name": "age", "type": ["null", "string"], "doc": "Age of the user.", "default": null}, {"name": "weight", "type": ["null", "string"], "doc": "Weight of the user.", "default": null}, {"name": "height", "type": ["null", "string"], "doc": "Height of the user.", "default": null}, - {"name": "biological_sex", "type": ["null", "string"], "doc": "Biological sex of the user.", "default": null}, + {"name": "biologicalSex", "type": ["null", "string"], "doc": "Biological sex of the user.", "default": null}, {"name": "email", "type": ["null", "string"], "doc": "Email of the user.", "default": null} ] } From bddb724b81c9ae100a02e788af09835f38083146 Mon Sep 17 00:00:00 2001 From: mpgxvii Date: Tue, 13 Jun 2023 17:00:11 +0100 Subject: [PATCH 08/42] Fix Oura schema number types --- commons/connector/oura/oura_daily_activity.avsc | 2 +- commons/connector/oura/oura_daily_readiness.avsc | 4 ++-- commons/connector/oura/oura_met.avsc | 4 ++-- commons/connector/oura/oura_personal_info.avsc | 6 +++--- commons/connector/oura/oura_readiness.avsc | 4 ++-- commons/connector/oura/oura_sleep.avsc | 4 ++-- commons/connector/oura/oura_workout.avsc | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/commons/connector/oura/oura_daily_activity.avsc b/commons/connector/oura/oura_daily_activity.avsc index e265782b..2f177934 100644 --- a/commons/connector/oura/oura_daily_activity.avsc +++ b/commons/connector/oura/oura_daily_activity.avsc @@ -10,7 +10,7 @@ {"name": "fiveMinuteClass", "type": ["null", "int"], "doc": "A 5-minute activity classification for the activity period: 0 - Non-wear, 1 - Rest, 2 - Inactive, 3 - Low Activity, 4 - Medium Activity, 5 - High Activity. Null if unknown.", "default": null}, {"name": "score", "type": ["null", "int"], "doc": "Activity score in range [1, 100]. Null if unknown.", "default": null}, {"name": "activeCalories", "type": ["null", "int"], "doc": "Active calories expended (in kilocalories). Null if unknown.", "default": null}, - {"name": "averageMetMinutes", "type": ["null", "int"], "doc": "Average metabolic equivalent (MET) in minutes. Null if unknown.", "default": null}, + {"name": "averageMetMinutes", "type": ["null", "float"], "doc": "Average metabolic equivalent (MET) in minutes. Null if unknown.", "default": null}, {"name": "contributorMeetDailyTargets", "type": ["null", "int"], "doc": "Contribution of meeting previous 7-day daily activity targets in range [1, 100] to the activity score. Null if unknown.", "default": null}, {"name": "contributorMoveEveryHour", "type": ["null", "int"], "doc": "Contribution of previous 24-hour inactivity alerts in range [1, 100] to the activity score. Null if unknown.", "default": null}, {"name": "contributorRecoveryTime", "type": ["null", "int"], "doc": "Contribution of previous 7-day recovery time in range [1, 100] to the activity score. Null if unknown.", "default": null}, diff --git a/commons/connector/oura/oura_daily_readiness.avsc b/commons/connector/oura/oura_daily_readiness.avsc index b2bebf66..6d992981 100644 --- a/commons/connector/oura/oura_daily_readiness.avsc +++ b/commons/connector/oura/oura_daily_readiness.avsc @@ -17,7 +17,7 @@ {"name": "contributorSleepBalance", "type": ["null", "int"], "doc": "Contribution of sleep balance in range [1, 100] to the readiness score. Null if unknown.", "default": null}, {"name": "day", "type": ["null", "string"], "doc": "Day that the daily readiness belongs to. Null if unknown.", "default": null}, {"name": "score", "type": ["null", "int"], "doc": "Daily readiness score in range [1, 100]. Null if unknown.", "default": null}, - {"name": "temperatureDeviation", "type": ["null", "int"], "doc": "Temperature deviation in degrees Celsius. Null if unknown.", "default": null}, - {"name": "temperatureTrendDeviation", "type": ["null", "int"], "doc": "Temperature trend deviation in degrees Celsius. Null if unknown.", "default": null} + {"name": "temperatureDeviation", "type": ["null", "float"], "doc": "Temperature deviation in degrees Celsius. Null if unknown.", "default": null}, + {"name": "temperatureTrendDeviation", "type": ["null", "float"], "doc": "Temperature trend deviation in degrees Celsius. Null if unknown.", "default": null} ] } diff --git a/commons/connector/oura/oura_met.avsc b/commons/connector/oura/oura_met.avsc index bf164242..c7b0046f 100644 --- a/commons/connector/oura/oura_met.avsc +++ b/commons/connector/oura/oura_met.avsc @@ -2,10 +2,10 @@ "namespace": "org.radarcns.connector.oura", "name": "OuraMet", "type": "record", - "doc": "This describes the metabolic equivalent data (MET) during an activity.", + "doc": "This describes the metabolic equivalent data (MET) during an activity. MET is a common measure used to express the energy expenditure and intensity of different physical activities.", "fields": [ {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, - {"name": "met", "type": ["null", "int"], "doc": "Activity metabolic equivalent (MET) in seconds.", "default": null} + {"name": "met", "type": ["null", "float"], "doc": "Activity metabolic equivalent (MET) in seconds.", "default": null} ] } diff --git a/commons/connector/oura/oura_personal_info.avsc b/commons/connector/oura/oura_personal_info.avsc index e1d4f770..5b77a9c8 100644 --- a/commons/connector/oura/oura_personal_info.avsc +++ b/commons/connector/oura/oura_personal_info.avsc @@ -7,9 +7,9 @@ {"name": "time", "type": "double", "doc": "Timestamp of the record."}, {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, {"name": "id", "type": ["null", "string"], "doc": "ID of the record.", "default": null}, - {"name": "age", "type": ["null", "string"], "doc": "Age of the user.", "default": null}, - {"name": "weight", "type": ["null", "string"], "doc": "Weight of the user.", "default": null}, - {"name": "height", "type": ["null", "string"], "doc": "Height of the user.", "default": null}, + {"name": "age", "type": ["null", "int"], "doc": "Age of the user.", "default": null}, + {"name": "weight", "type": ["null", "float"], "doc": "Weight of the user.", "default": null}, + {"name": "height", "type": ["null", "float"], "doc": "Height of the user.", "default": null}, {"name": "biologicalSex", "type": ["null", "string"], "doc": "Biological sex of the user.", "default": null}, {"name": "email", "type": ["null", "string"], "doc": "Email of the user.", "default": null} ] diff --git a/commons/connector/oura/oura_readiness.avsc b/commons/connector/oura/oura_readiness.avsc index e2673321..38f7b86b 100644 --- a/commons/connector/oura/oura_readiness.avsc +++ b/commons/connector/oura/oura_readiness.avsc @@ -17,8 +17,8 @@ {"name": "contributorRecoveryIndex", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, {"name": "contributorRestingHeartRate", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, {"name": "contributorSleepBalance", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, - {"name": "temperatureDeviation", "type": ["null", "int"], "doc": "Temperature deviation in degrees Celsius.", "default": null}, - {"name": "temperatureTrendDeviation", "type": ["null", "int"], "doc": "Temperature trend deviation in degrees Celsius.", "default": null} + {"name": "temperatureDeviation", "type": ["null", "float"], "doc": "Temperature deviation in degrees Celsius.", "default": null}, + {"name": "temperatureTrendDeviation", "type": ["null", "float"], "doc": "Temperature trend deviation in degrees Celsius.", "default": null} ] } diff --git a/commons/connector/oura/oura_sleep.avsc b/commons/connector/oura/oura_sleep.avsc index 13bfda94..f6f4eef0 100644 --- a/commons/connector/oura/oura_sleep.avsc +++ b/commons/connector/oura/oura_sleep.avsc @@ -7,8 +7,8 @@ {"name": "time", "type": "double", "doc": "Timestamp of the note containing the Oura tags."}, {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, {"name": "id", "type": ["null", "string"], "doc": "ID of the sleep record.", "default": null}, - {"name": "averageBreath", "type": ["null", "int"], "doc": "Average breathing rate during sleep as breaths/second.", "default": null}, - {"name": "averageHeartRate", "type": ["null", "int"], "doc": "Average heart rate during sleep as beats/minute.", "default": null}, + {"name": "averageBreath", "type": ["null", "float"], "doc": "Average breathing rate during sleep as breaths/second.", "default": null}, + {"name": "averageHeartRate", "type": ["null", "float"], "doc": "Average heart rate during sleep as beats/minute.", "default": null}, {"name": "averageHrv", "type": ["null", "int"], "doc": "Average heart rate variability during sleep.", "default": null}, {"name": "awakeTime", "type": ["null", "int"], "doc": "Duration spent awake in seconds.", "default": null}, {"name": "bedtimeEnd", "type": ["null", "string"], "doc": "Bedtime end of the sleep.", "default": null}, diff --git a/commons/connector/oura/oura_workout.avsc b/commons/connector/oura/oura_workout.avsc index cfeb7677..7a4834ef 100644 --- a/commons/connector/oura/oura_workout.avsc +++ b/commons/connector/oura/oura_workout.avsc @@ -7,7 +7,7 @@ {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the workout from Oura.", "default": null}, - {"name": "calories", "type": ["null", "int"], "doc": "Energy burned in kilocalories during the workout. Null if unknown.", "default": null}, + {"name": "calories", "type": ["null", "float"], "doc": "Energy burned in kilocalories during the workout. Null if unknown.", "default": null}, {"name": "day", "type": ["null", "string"], "doc": "Day when the workout occurred. Null if unknown.", "default": null}, {"name": "distance", "type": ["null", "float"], "doc": "Distance traveled in meters during the workout. Null if unknown.", "default": null}, {"name": "startDateTime", "type": ["null", "string"], "doc": "Timestamp indicating when the workout started. Null if unknown.", "default": null}, From b3a441ef9229487c03ad55d307bce4b94d19a232 Mon Sep 17 00:00:00 2001 From: mpgxvii Date: Wed, 21 Jun 2023 15:52:58 +0100 Subject: [PATCH 09/42] Update Oura schemas --- commons/connector/oura/oura_heart_rate.avsc | 4 ++-- commons/connector/oura/oura_readiness.avsc | 24 --------------------- commons/connector/oura/oura_session.avsc | 9 ++++---- commons/connector/oura/oura_workout.avsc | 9 ++++---- 4 files changed, 10 insertions(+), 36 deletions(-) delete mode 100644 commons/connector/oura/oura_readiness.avsc diff --git a/commons/connector/oura/oura_heart_rate.avsc b/commons/connector/oura/oura_heart_rate.avsc index 94c6a9c6..0efef30b 100644 --- a/commons/connector/oura/oura_heart_rate.avsc +++ b/commons/connector/oura/oura_heart_rate.avsc @@ -8,7 +8,7 @@ {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, {"name": "bpm", "type": ["null", "int"], "doc": "Heart rate in beats per minute.", "default": null}, {"name": "source", "type": - {"name": "OuraHeartRateSource", "type": "enum", "symbols": ["AWAKE", "REST", "SLEEP", "SESSION", "LIVE", "UNKNOWN"], "doc": "Heart rate source type as computed by Oura."}, - "doc": "Heart rate source type as computed by Oura.", "default": "UNKNOWN" } + {"name": "OuraHeartRateSource", "type": "enum", "symbols": ["AWAKE", "REST", "SLEEP", "SESSION", "LIVE", "WORKOUT", "UNKNOWN"], "doc": "Heart rate source type as computed by Oura."}, + "doc": "Heart rate source type as computed by Oura. UNKNOWN when this data is not provided (e.g. samples from sleep API).", "default": "UNKNOWN" } ] } diff --git a/commons/connector/oura/oura_readiness.avsc b/commons/connector/oura/oura_readiness.avsc deleted file mode 100644 index 38f7b86b..00000000 --- a/commons/connector/oura/oura_readiness.avsc +++ /dev/null @@ -1,24 +0,0 @@ -{ - "namespace": "org.radarcns.connector.oura", - "name": "OuraReadiness", - "type": "record", - "doc": "This describes a user's readiness level. Readiness tells how ready you are for the day.", - "fields": [ - {"name": "time", "type": "double", "doc": "Timestamp of the daily readiness in seconds since the Unix Epoch (s)."}, - {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, - {"name": "id", "type": ["null", "string"], "doc": "ID of the record.", "default": null}, - {"name": "day", "type": ["null", "string"], "doc": "Day that the daily readiness belongs to.", "default": null}, - {"name": "score", "type": ["null", "int"], "doc": "Daily readiness score.", "default": null}, - {"name": "contributorActivityBalance", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, - {"name": "contributorBodyTemperature", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, - {"name": "contributorHrvBalance", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, - {"name": "contributorPreviousDayActivity", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, - {"name": "contributorPreviousNight", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, - {"name": "contributorRecoveryIndex", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, - {"name": "contributorRestingHeartRate", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, - {"name": "contributorSleepBalance", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, - {"name": "temperatureDeviation", "type": ["null", "float"], "doc": "Temperature deviation in degrees Celsius.", "default": null}, - {"name": "temperatureTrendDeviation", "type": ["null", "float"], "doc": "Temperature trend deviation in degrees Celsius.", "default": null} - - ] -} diff --git a/commons/connector/oura/oura_session.avsc b/commons/connector/oura/oura_session.avsc index ab64a0b8..2d194452 100644 --- a/commons/connector/oura/oura_session.avsc +++ b/commons/connector/oura/oura_session.avsc @@ -4,16 +4,15 @@ "type": "record", "doc": "The Sessions data scope provides information on how users engage with guided and unguided sessions in the Oura app, including the user’s biometric trends during the sessions.", "fields": [ - {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "time", "type": "double", "doc": "Start time of the session in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "endTime", "type": ["null", "string"], "doc": "Timestamp indicating when the session ended. Null if unknown.", "default": null}, {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the session from Oura.", "default": null}, - {"name": "startDateTime", "type": ["null", "string"], "doc": "Timestamp indicating when the workout started. Null if unknown.", "default": null}, - {"name": "endDateTime", "type": ["null", "string"], "doc": "Timestamp indicating when the workout ended. Null if unknown.", "default": null}, {"name": "type", "type": {"name": "OuraMomentType", "type": "enum", "symbols": ["BREATHING", "MEDITATION", "NAP", "RELAXATION", "REST", "BODY_STATUS", "UNKNOWN"], "doc": "Possible Oura Moment types."}, - "doc": "Oura Moment type.", "default": "UNKNOWN" }, + "doc": "Oura Moment type. UNKNOWN when this data is not provided by Oura.", "default": "UNKNOWN" }, {"name": "mood", "type": {"name": "OuraMomentMood", "type": "enum", "symbols": ["BAD", "WORSE", "SAME", "GOOD", "GREAT", "UNKNOWN"], "doc": "Possible Oura Moment moods."}, - "doc": "Oura Moment mood.", "default": "UNKNOWN" } + "doc": "Oura Moment mood. UNKNOWN when this data is not provided by Oura.", "default": "UNKNOWN" } ] } diff --git a/commons/connector/oura/oura_workout.avsc b/commons/connector/oura/oura_workout.avsc index 7a4834ef..1c408ac9 100644 --- a/commons/connector/oura/oura_workout.avsc +++ b/commons/connector/oura/oura_workout.avsc @@ -4,20 +4,19 @@ "type": "record", "doc": "The Workout data scope includes information about user workouts. This is a diverse, growing list of workouts that help inform how the user is training and exercising.", "fields": [ - {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "time", "type": "double", "doc": "Start time of the workout in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "endTime", "type": ["null", "string"], "doc": "Timestamp indicating when the workout ended. Null if unknown.", "default": null}, {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the workout from Oura.", "default": null}, {"name": "calories", "type": ["null", "float"], "doc": "Energy burned in kilocalories during the workout. Null if unknown.", "default": null}, {"name": "day", "type": ["null", "string"], "doc": "Day when the workout occurred. Null if unknown.", "default": null}, {"name": "distance", "type": ["null", "float"], "doc": "Distance traveled in meters during the workout. Null if unknown.", "default": null}, - {"name": "startDateTime", "type": ["null", "string"], "doc": "Timestamp indicating when the workout started. Null if unknown.", "default": null}, - {"name": "endDateTime", "type": ["null", "string"], "doc": "Timestamp indicating when the workout ended. Null if unknown.", "default": null}, {"name": "intensity", "type": {"name": "OuraWorkoutIntensity", "type": "enum", "symbols": ["EASY", "MODERATE", "HARD", "UNKNOWN"], "doc": "Workout intensity as computed by Oura."}, - "doc": "Workout intensity as computed by Oura.", "default": "UNKNOWN" }, + "doc": "Workout intensity as computed by Oura. UNKNOWN when this data is not provided by Oura.", "default": "UNKNOWN" }, {"name": "label", "type": ["null", "string"], "doc": "User-defined label for the workout. Null if unknown.", "default": null}, {"name": "source", "type": {"name": "OuraWorkoutSource", "type": "enum", "symbols": ["MANUAL", "AUTODETECTED", "CONFIRMED", "WORKOUT_HEART_RATE", "UNKNOWN"], "doc": "Workout source type as computed by Oura."}, - "doc": "Workout source type as computed by Oura.", "default": "UNKNOWN" } + "doc": "Workout source type as computed by Oura. UNKNOWN when this data is not provided by Oura.", "default": "UNKNOWN" } ] } From 13f920fd166fcb20b8c5c002a87946cd75fa6611 Mon Sep 17 00:00:00 2001 From: mpgxvii Date: Wed, 21 Jun 2023 16:36:01 +0100 Subject: [PATCH 10/42] Add Oura connector specifications --- .../connector/radar-oura-connector.yml | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 specifications/connector/radar-oura-connector.yml diff --git a/specifications/connector/radar-oura-connector.yml b/specifications/connector/radar-oura-connector.yml new file mode 100644 index 00000000..3c5341fc --- /dev/null +++ b/specifications/connector/radar-oura-connector.yml @@ -0,0 +1,41 @@ +name: RADAR-OURA-CONNECTOR +vendor: RADAR-base +model: radar-connect-oura-source +version: 0.0.1 +doc: Spec for Radar Oura connector. Schemas should be registered in the connector. +data: + - doc: The daily activity summary values and detailed activity levels. + topic: connect_oura_daily_activity + value_schema: .connector.oura.OuraDailyActivity + - doc: The daily readiness summary values. + topic: connect_oura_daily_readiness + value_schema: .connector.oura.OuraDailyReadiness + - doc: The daily sleep summary values. + topic: connect_oura_daily_sleep + value_schema: .connector.oura.OuraDailySleep + - doc: Timeseries heart rate data. + topic: connect_oura_heart_rate + value_schema: .connector.oura.OuraHeartRate + - doc: Timeseries heart rate variability data. + topic: connect_oura_heart_rate_variability + value_schema: .connector.oura.OuraHeartRateVariability + - doc: Timeseries MET (metabolic equivalent) data. This describes MET data during an activity. + topic: connect_oura_met + value_schema: .connector.oura.OuraMet + - doc: Timeseries motion count data. This describes motion count during a session. + topic: connect_oura_motion_count + value_schema: .connector.oura.OuraMotionCount + - doc: The tag data scope provides information on the tags the users enter in the mobile app, which includes activities, symptoms, etc. + topic: connect_oura_motion_count + - doc: The Sessions data scope provides information on how users engage with guided and unguided sessions in the Oura app. + topic: connect_oura_session + value_schema: .connector.oura.OuraSession + - doc: The sleep data for the specified Oura user within a given timeframe. A user can have multiple sleep periods per day. + topic: connect_oura_sleep + value_schema: .connector.oura.OuraSleep + - doc: The workout data scope includes information about user workouts. + topic: connect_oura_workout + value_schema: .connector.oura.OuraWorkout + - doc: The personal info scope includes personal information (e.g. age, email, weight, and height) about the user. + topic: connect_oura_personal_info + value_schema: .connector.oura.OuraPersonalInfo \ No newline at end of file From c98a292d0328cfb28b1c7047ec15a7a13d961dbe Mon Sep 17 00:00:00 2001 From: mpgxvii Date: Wed, 21 Jun 2023 16:45:46 +0100 Subject: [PATCH 11/42] Fix Oura motion count and tag specs --- specifications/connector/radar-oura-connector.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specifications/connector/radar-oura-connector.yml b/specifications/connector/radar-oura-connector.yml index 3c5341fc..fbd19da4 100644 --- a/specifications/connector/radar-oura-connector.yml +++ b/specifications/connector/radar-oura-connector.yml @@ -26,7 +26,8 @@ data: topic: connect_oura_motion_count value_schema: .connector.oura.OuraMotionCount - doc: The tag data scope provides information on the tags the users enter in the mobile app, which includes activities, symptoms, etc. - topic: connect_oura_motion_count + topic: connect_oura_tag + value_schema: .connector.oura.OuraTag - doc: The Sessions data scope provides information on how users engage with guided and unguided sessions in the Oura app. topic: connect_oura_session value_schema: .connector.oura.OuraSession From 049430cd4004cbae97692663b643869a3d0bd052 Mon Sep 17 00:00:00 2001 From: Yatharth Ranjan Date: Fri, 30 Jun 2023 20:24:36 +0530 Subject: [PATCH 12/42] snapshot version --- java-sdk/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java-sdk/build.gradle.kts b/java-sdk/build.gradle.kts index c125ce17..91e43b33 100644 --- a/java-sdk/build.gradle.kts +++ b/java-sdk/build.gradle.kts @@ -9,7 +9,7 @@ plugins { } allprojects { - version = "0.8.4" + version = "0.8.5-SNAPSHOT" group = "org.radarbase" } From f44dff3adc606c8d9403726182566e4b28c42a0e Mon Sep 17 00:00:00 2001 From: Aditya Mishra Date: Thu, 6 Jul 2023 14:48:52 +0530 Subject: [PATCH 13/42] Added schema for Activity Transition event --- .../google_activity_transition_event.avsc | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 commons/passive/google/google_activity_transition_event.avsc diff --git a/commons/passive/google/google_activity_transition_event.avsc b/commons/passive/google/google_activity_transition_event.avsc new file mode 100644 index 00000000..0ee2b214 --- /dev/null +++ b/commons/passive/google/google_activity_transition_event.avsc @@ -0,0 +1,22 @@ +{ + "namespace": "org.radarcns.passive.google", + "type": "record", + "name": "GoogleActivityTransitionEvent", + "doc": "Represents an activity transition event, for example start to walk, stop running etc.", + "fields": [ + { "name": "time", "type": "double", "doc": "The UNIX epoch time (s) for the moment when the activity takes place.." }, + { "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, + { "name": "activity", "type": { + "name": "ActivityType", + "type": "enum", + "doc": "The detected activity of the device. \nIN_VEHICLE indicates the device is in a vehicle, such as a car. \nON_BICYCLE indicates the device is on a bicycle. \n ON_FOOT indicates the device is on a user who is walking or running. \nRUNNING indicates the device is on a user who is running. This is a sub-activity of ON_FOOT. \nSTILL indicates the device is still (not moving). \nTILTING indicates the device angle relative to gravity changed significantly. This often occurs when a device is picked up from a desk or a user who is sitting stands up. \nWALKING indicates the device is on a user who is walking. This is a sub-activity of ON_FOOT. \nUNKNOWN indicates activity is not detected.", + "symbols": ["IN_VEHICLE", "ON_BICYCLE", "ON_FOOT", "RUNNING", "STILL", "TILTING", "WALKING", "UNKNOWN"] + }, "doc": "Gets the type of the activity of the transition.", "default": "UNKNOWN" }, + { "name": "transition", "type": { + "name": "TransitionType", + "type": "enum", + "doc": "Represents the transition associated with an activity listed in ActivityType. For instance start to walk, stop running etc. \nENTER represents user enters the given activity from ActivityType. \nEXIT represents user exits the given activity from ActivityType.", + "symbols": ["ENTER", "EXIT", "UNKNOWN"] + }, "doc": "Represents the transition associated with an activity listed in ActivityType.", "default": "UNKNOWN" } + ] +} From 7e27ae439e7d3627eb5079320c91e0ff96b15226 Mon Sep 17 00:00:00 2001 From: Aditya Mishra Date: Thu, 6 Jul 2023 14:49:41 +0530 Subject: [PATCH 14/42] Added new specification for google-activity-recognition --- .../passive/android_google_api-1.0.0.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 specifications/passive/android_google_api-1.0.0.yml diff --git a/specifications/passive/android_google_api-1.0.0.yml b/specifications/passive/android_google_api-1.0.0.yml new file mode 100644 index 00000000..7e0cf437 --- /dev/null +++ b/specifications/passive/android_google_api-1.0.0.yml @@ -0,0 +1,14 @@ +#======================================== Google APIs =============================================# +vendor: GOOGLE +model: API +version: 1.0.0 +data: + #Google Activity Recognition + - type: ACTIVITY_TRANSITION_EVENT + app_provider: .google.GoogleActivityProvider + unit: NON_DIMENSIONAL + processing_state: RAW + topic: android_google_activity_transition_event + value_schema: .passive.google.GoogleActivityTransitionEvent + sample_rate: + dynamic: true From c9324e5c37933f1b0ff84c3cd1068a7f0873099c Mon Sep 17 00:00:00 2001 From: Aditya Mishra Date: Thu, 6 Jul 2023 15:14:55 +0530 Subject: [PATCH 15/42] renamed model and specification file --- ...android_google_api-1.0.0.yml => google_activity-1.0.0.yml} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename specifications/passive/{android_google_api-1.0.0.yml => google_activity-1.0.0.yml} (83%) diff --git a/specifications/passive/android_google_api-1.0.0.yml b/specifications/passive/google_activity-1.0.0.yml similarity index 83% rename from specifications/passive/android_google_api-1.0.0.yml rename to specifications/passive/google_activity-1.0.0.yml index 7e0cf437..591e297e 100644 --- a/specifications/passive/android_google_api-1.0.0.yml +++ b/specifications/passive/google_activity-1.0.0.yml @@ -1,6 +1,6 @@ -#======================================== Google APIs =============================================# +#======================================= Google Activity ==========================================# vendor: GOOGLE -model: API +model: ACTIVITY version: 1.0.0 data: #Google Activity Recognition From dc8e102e66312d2e314731d45e0630ebc7be7c92 Mon Sep 17 00:00:00 2001 From: Aditya Mishra Date: Thu, 20 Jul 2023 20:25:37 +0530 Subject: [PATCH 16/42] removed unsupported activity types from activity transition event --- commons/passive/google/google_activity_transition_event.avsc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commons/passive/google/google_activity_transition_event.avsc b/commons/passive/google/google_activity_transition_event.avsc index 0ee2b214..89b5f184 100644 --- a/commons/passive/google/google_activity_transition_event.avsc +++ b/commons/passive/google/google_activity_transition_event.avsc @@ -9,8 +9,8 @@ { "name": "activity", "type": { "name": "ActivityType", "type": "enum", - "doc": "The detected activity of the device. \nIN_VEHICLE indicates the device is in a vehicle, such as a car. \nON_BICYCLE indicates the device is on a bicycle. \n ON_FOOT indicates the device is on a user who is walking or running. \nRUNNING indicates the device is on a user who is running. This is a sub-activity of ON_FOOT. \nSTILL indicates the device is still (not moving). \nTILTING indicates the device angle relative to gravity changed significantly. This often occurs when a device is picked up from a desk or a user who is sitting stands up. \nWALKING indicates the device is on a user who is walking. This is a sub-activity of ON_FOOT. \nUNKNOWN indicates activity is not detected.", - "symbols": ["IN_VEHICLE", "ON_BICYCLE", "ON_FOOT", "RUNNING", "STILL", "TILTING", "WALKING", "UNKNOWN"] + "doc": "The detected activity of the device. \nIN_VEHICLE indicates the device is in a vehicle, such as a car. \nON_BICYCLE indicates the device is on a bicycle. \n ON_FOOT indicates the device is on a user who is walking or running. \nRUNNING indicates the device is on a user who is running. This is a sub-activity of ON_FOOT. \nSTILL indicates the device is still (not moving). \nWALKING indicates the device is on a user who is walking. This is a sub-activity of ON_FOOT.", + "symbols": ["IN_VEHICLE", "ON_BICYCLE", "ON_FOOT", "RUNNING", "STILL", "WALKING", "UNKNOWN"] }, "doc": "Gets the type of the activity of the transition.", "default": "UNKNOWN" }, { "name": "transition", "type": { "name": "TransitionType", From 738a74f7887a30fa32a42f919d9ec7e0af6cc3a8 Mon Sep 17 00:00:00 2001 From: Aditya Mishra Date: Wed, 26 Jul 2023 21:33:16 +0530 Subject: [PATCH 17/42] Update default ActivityType to null --- commons/passive/google/google_activity_transition_event.avsc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commons/passive/google/google_activity_transition_event.avsc b/commons/passive/google/google_activity_transition_event.avsc index 89b5f184..dda10c76 100644 --- a/commons/passive/google/google_activity_transition_event.avsc +++ b/commons/passive/google/google_activity_transition_event.avsc @@ -6,12 +6,12 @@ "fields": [ { "name": "time", "type": "double", "doc": "The UNIX epoch time (s) for the moment when the activity takes place.." }, { "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, - { "name": "activity", "type": { + { "name": "activity", "type": ["null",{ "name": "ActivityType", "type": "enum", "doc": "The detected activity of the device. \nIN_VEHICLE indicates the device is in a vehicle, such as a car. \nON_BICYCLE indicates the device is on a bicycle. \n ON_FOOT indicates the device is on a user who is walking or running. \nRUNNING indicates the device is on a user who is running. This is a sub-activity of ON_FOOT. \nSTILL indicates the device is still (not moving). \nWALKING indicates the device is on a user who is walking. This is a sub-activity of ON_FOOT.", "symbols": ["IN_VEHICLE", "ON_BICYCLE", "ON_FOOT", "RUNNING", "STILL", "WALKING", "UNKNOWN"] - }, "doc": "Gets the type of the activity of the transition.", "default": "UNKNOWN" }, + }], "doc": "Gets the type of the activity of the transition.", "default": null }, { "name": "transition", "type": { "name": "TransitionType", "type": "enum", From 352c43fa36f1340995934dd094c986ac0091cb4c Mon Sep 17 00:00:00 2001 From: Aditya Mishra Date: Sat, 29 Jul 2023 13:19:39 +0530 Subject: [PATCH 18/42] Updated sleep segement status default value as null --- commons/passive/google/google_sleep_segment_event.avsc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commons/passive/google/google_sleep_segment_event.avsc b/commons/passive/google/google_sleep_segment_event.avsc index e690fe43..6fc46f9c 100644 --- a/commons/passive/google/google_sleep_segment_event.avsc +++ b/commons/passive/google/google_sleep_segment_event.avsc @@ -7,11 +7,11 @@ { "name": "time", "type": "double", "doc": "The UNIX epoch time (s) for the moment when the user goes to sleep." }, { "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, { "name": "endTime", "type": "double", "doc": "The UNIX epoch time (s) for the moment when the user wakes up." }, - { "name": "status", "type": { + { "name": "status", "type": [ "null", { "name": "SleepClassificationStatus", "type": "enum", "doc": "The status of the sleep segment detection. \nSUCCESSFUL indicates successful detection of sleep segment in the past day.\nNOT_DETECTED indicates Sleep segment is not detected in the past day, or there isn't enough confidence that the user slept during the past day. This could happen for a variety of reasons, including the following: too much missing data, the user sleeps with the light, the user interacts with their device often, or the user's device doesn't support the sensors needed for sleep detection. \nMISSING_DATA indicates sleep segment was detected, but there was some missing data near the detected sleep segment. This could happen for a variety of reasons, including the following: the user turned off their device, the user delayed logging into their device after a system reboot or system upgrade, or an event occurred that paused the detection.", "symbols": ["SUCCESSFUL", "MISSING_DATA", "NOT_DETECTED", "UNKNOWN"] - }, "doc": "Status that indicates whether the system succeeded in detecting sleep.", "default": "UNKNOWN" } + }], "doc": "Status that indicates whether the system succeeded in detecting sleep.", "default": null } ] } From 1651353cf61227e25babfc9114462e8001952515 Mon Sep 17 00:00:00 2001 From: Aditya Mishra Date: Sat, 29 Jul 2023 17:18:16 +0530 Subject: [PATCH 19/42] Added new events for phone-usage-event --- commons/passive/phone/phone_usage_event.avsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commons/passive/phone/phone_usage_event.avsc b/commons/passive/phone/phone_usage_event.avsc index 99ed6459..592b3cb4 100644 --- a/commons/passive/phone/phone_usage_event.avsc +++ b/commons/passive/phone/phone_usage_event.avsc @@ -13,7 +13,7 @@ "name": "UsageEventType", "type": "enum", "doc": "Android activity usage event type.", - "symbols": ["FOREGROUND", "BACKGROUND", "CONFIG", "SHORTCUT", "INTERACTION", "OTHER", "UNKNOWN"] + "symbols": ["FOREGROUND", "BACKGROUND", "CONFIG", "SHORTCUT", "INTERACTION", "FOREGROUND_SERVICE_START", "FOREGROUND_SERVICE_STOP", "STANDBY_BUCKET_CHANGED", "STOPPED", "OTHER", "UNKNOWN"] }, "doc": "Whether the event brought app to foreground or background or neither.", "default": "UNKNOWN" } ] } From be5fdd2631cbda776db342bca2b3030d051555bf Mon Sep 17 00:00:00 2001 From: Aditya Mishra Date: Wed, 2 Aug 2023 12:03:45 +0530 Subject: [PATCH 20/42] Added specifications for Google Places API data --- specifications/passive/google_places-1.0.0.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 specifications/passive/google_places-1.0.0.yml diff --git a/specifications/passive/google_places-1.0.0.yml b/specifications/passive/google_places-1.0.0.yml new file mode 100644 index 00000000..a6de7ab2 --- /dev/null +++ b/specifications/passive/google_places-1.0.0.yml @@ -0,0 +1,15 @@ +#======================================== Google Places =============================================# +vendor: GOOGLE +model: PLACES +version: 1.0.0 +data: + #Google Places + - type: GOOGLE_PLACES + app_provider: .google.GooglePlacesProvider + unit: NON_DIMENSIONAL + processing_state: RAW + topic: android_google_places_info + value_schema: .passive.google.GooglePlacesInfo + sample_rate: + frequency: 600 + configurable: true \ No newline at end of file From f2dbb34f6563843fdc86bf13b258ff568700a09e Mon Sep 17 00:00:00 2001 From: Aditya Mishra Date: Wed, 2 Aug 2023 12:21:38 +0530 Subject: [PATCH 21/42] Added schema for data retrieved from Google Places API --- .../passive/google/google_places_info.avsc | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 commons/passive/google/google_places_info.avsc diff --git a/commons/passive/google/google_places_info.avsc b/commons/passive/google/google_places_info.avsc new file mode 100644 index 00000000..2e50de20 --- /dev/null +++ b/commons/passive/google/google_places_info.avsc @@ -0,0 +1,23 @@ +{ + "namespace": "org.radarcns.passive.google", + "type": "record", + "name": "GooglePlacesInfo", + "doc": "Information of places where the user’s device is last known to be located along with an indication of the relative likelihood for each place.", + "fields": [ + { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, + { "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, + { "name": "types", "type": { + "type": "array", "items": { + "name": "PlacesType", + "type": "enum", + "doc": "Categories of places based on their characteristics or attributes.", + "symbols": [ "ACCOUNTING", "ADMINISTRATIVE_AREA_LEVEL_1", "ADMINISTRATIVE_AREA_LEVEL_2", "ADMINISTRATIVE_AREA_LEVEL_3", "ADMINISTRATIVE_AREA_LEVEL_4", "ADMINISTRATIVE_AREA_LEVEL_5", "ADMINISTRATIVE_AREA_LEVEL_6", "ADMINISTRATIVE_AREA_LEVEL_7", "AIRPORT", "AMUSEMENT_PARK", "AQUARIUM", "ARCHIPELAGO", "ART_GALLERY", "ATM", "BAKERY", "BANK", "BAR", "BEAUTY_SALON", "BICYCLE_STORE", "BOOK_STORE", "BOWLING_ALLEY", "BUS_STATION", "CAFE", "CAMPGROUND", "CAR_DEALER", "CAR_RENTAL", "CAR_REPAIR", "CAR_WASH", "CASINO", "CEMETERY", "CHURCH", "CITY_HALL", "CLOTHING_STORE", "COLLOQUIAL_AREA", "CONTINENT", "CONVENIENCE_STORE", "COUNTRY", "COURTHOUSE", "DENTIST", "DEPARTMENT_STORE", "DOCTOR", "DRUGSTORE", "ELECTRICIAN", "ELECTRONICS_STORE", "EMBASSY", "ESTABLISHMENT", "FINANCE", "FIRE_STATION", "FLOOR", "FLORIST", "FOOD", "FUNERAL_HOME", "FURNITURE_STORE", "GAS_STATION", "GENERAL_CONTRACTOR", "GEOCODE", "GROCERY_OR_SUPERMARKET", "GYM", "HAIR_CARE", "HARDWARE_STORE", "HEALTH", "HINDU_TEMPLE", "HOME_GOODS_STORE", "HOSPITAL", "INSURANCE_AGENCY", "INTERSECTION", "JEWELRY_STORE", "LAUNDRY", "LAWYER", "LIBRARY", "LIGHT_RAIL_STATION", "LIQUOR_STORE", "LOCAL_GOVERNMENT_OFFICE", "LOCALITY", "LOCKSMITH", "LODGING", "MEAL_DELIVERY", "MEAL_TAKEAWAY", "MOSQUE", "MOVIE_RENTAL", "MOVIE_THEATER", "MOVING_COMPANY", "MUSEUM", "NATURAL_FEATURE", "NEIGHBORHOOD", "NIGHT_CLUB", "PAINTER", "PARK", "PARKING", "PET_STORE", "PHARMACY", "PHYSIOTHERAPIST", "PLACE_OF_WORSHIP", "PLUMBER", "PLUS_CODE", "POINT_OF_INTEREST", "POLICE", "POLITICAL", "POST_BOX", "POST_OFFICE", "POSTAL_CODE_PREFIX", "POSTAL_CODE_SUFFIX", "POSTAL_CODE", "POSTAL_TOWN", "PREMISE", "PRIMARY_SCHOOL", "REAL_ESTATE_AGENCY", "RESTAURANT", "ROOFING_CONTRACTOR", "ROOM", "ROUTE", "RV_PARK", "SCHOOL", "SECONDARY_SCHOOL", "SHOE_STORE", "SHOPPING_MALL", "SPA", "STADIUM", "STORAGE", "STORE", "STREET_ADDRESS", "STREET_NUMBER", "SUBLOCALITY_LEVEL_1", "SUBLOCALITY_LEVEL_2", "SUBLOCALITY_LEVEL_3", "SUBLOCALITY_LEVEL_4", "SUBLOCALITY_LEVEL_5", "SUBLOCALITY", "SUBPREMISE", "SUBWAY_STATION", "SUPERMARKET", "SYNAGOGUE", "TAXI_STAND", "TOURIST_ATTRACTION", "TOWN_SQUARE", "TRAIN_STATION", "TRANSIT_STATION", "TRAVEL_AGENCY", "UNIVERSITY", "VETERINARY_CARE", "ZOO", "UNKNOWN" ] + }, "default": [ "UNKNOWN" ] + }, "doc": "The predefined categories or tags assigned to different places based on their characteristics. These types can represent various categories such as restaurants, cafes, museums, parks, hotels, airports, hospitals, and more."}, + { "name": "city", "type": ["null", "string"], "doc": "The city returned corresponds to the current location of the user's device.", "default": null }, + { "name": "state", "type": ["null", "string"], "doc": "The state returned corresponds to the current location of the user's device.", "default": null }, + { "name": "country", "type": ["null", "string"], "doc": "The city returned corresponds to the current location of the user's device.", "default": null }, + { "name": "placeId", "type": ["null", "string"], "doc": "A unique identifier assigned to each place in the Google Places database. It serves as a specific reference or key to a particular place entry and is used to retrieve detailed information about that place.", "default": null }, + { "name": "likelihood", "type": "double", "doc": "The likelihood provides a relative probability of the place being the best match within the list of returned places for a single request. A higher value means a greater probability that the place is the best match. It's value ranges between 0.0 and 1.0." } + ] +} From c65688fed23e44c75f08dfc0ac2437799a59ccfe Mon Sep 17 00:00:00 2001 From: Aditya Mishra Date: Wed, 2 Aug 2023 19:46:31 +0530 Subject: [PATCH 22/42] Added new field to detect broadcasts Changed frequency to intervals in specifications Updated type of array to pass tests --- commons/passive/google/google_places_info.avsc | 10 ++++++---- specifications/passive/google_places-1.0.0.yml | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/commons/passive/google/google_places_info.avsc b/commons/passive/google/google_places_info.avsc index 2e50de20..88524ffd 100644 --- a/commons/passive/google/google_places_info.avsc +++ b/commons/passive/google/google_places_info.avsc @@ -6,18 +6,20 @@ "fields": [ { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, { "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, - { "name": "types", "type": { + { "name": "types", "type": [{ "type": "array", "items": { "name": "PlacesType", "type": "enum", "doc": "Categories of places based on their characteristics or attributes.", "symbols": [ "ACCOUNTING", "ADMINISTRATIVE_AREA_LEVEL_1", "ADMINISTRATIVE_AREA_LEVEL_2", "ADMINISTRATIVE_AREA_LEVEL_3", "ADMINISTRATIVE_AREA_LEVEL_4", "ADMINISTRATIVE_AREA_LEVEL_5", "ADMINISTRATIVE_AREA_LEVEL_6", "ADMINISTRATIVE_AREA_LEVEL_7", "AIRPORT", "AMUSEMENT_PARK", "AQUARIUM", "ARCHIPELAGO", "ART_GALLERY", "ATM", "BAKERY", "BANK", "BAR", "BEAUTY_SALON", "BICYCLE_STORE", "BOOK_STORE", "BOWLING_ALLEY", "BUS_STATION", "CAFE", "CAMPGROUND", "CAR_DEALER", "CAR_RENTAL", "CAR_REPAIR", "CAR_WASH", "CASINO", "CEMETERY", "CHURCH", "CITY_HALL", "CLOTHING_STORE", "COLLOQUIAL_AREA", "CONTINENT", "CONVENIENCE_STORE", "COUNTRY", "COURTHOUSE", "DENTIST", "DEPARTMENT_STORE", "DOCTOR", "DRUGSTORE", "ELECTRICIAN", "ELECTRONICS_STORE", "EMBASSY", "ESTABLISHMENT", "FINANCE", "FIRE_STATION", "FLOOR", "FLORIST", "FOOD", "FUNERAL_HOME", "FURNITURE_STORE", "GAS_STATION", "GENERAL_CONTRACTOR", "GEOCODE", "GROCERY_OR_SUPERMARKET", "GYM", "HAIR_CARE", "HARDWARE_STORE", "HEALTH", "HINDU_TEMPLE", "HOME_GOODS_STORE", "HOSPITAL", "INSURANCE_AGENCY", "INTERSECTION", "JEWELRY_STORE", "LAUNDRY", "LAWYER", "LIBRARY", "LIGHT_RAIL_STATION", "LIQUOR_STORE", "LOCAL_GOVERNMENT_OFFICE", "LOCALITY", "LOCKSMITH", "LODGING", "MEAL_DELIVERY", "MEAL_TAKEAWAY", "MOSQUE", "MOVIE_RENTAL", "MOVIE_THEATER", "MOVING_COMPANY", "MUSEUM", "NATURAL_FEATURE", "NEIGHBORHOOD", "NIGHT_CLUB", "PAINTER", "PARK", "PARKING", "PET_STORE", "PHARMACY", "PHYSIOTHERAPIST", "PLACE_OF_WORSHIP", "PLUMBER", "PLUS_CODE", "POINT_OF_INTEREST", "POLICE", "POLITICAL", "POST_BOX", "POST_OFFICE", "POSTAL_CODE_PREFIX", "POSTAL_CODE_SUFFIX", "POSTAL_CODE", "POSTAL_TOWN", "PREMISE", "PRIMARY_SCHOOL", "REAL_ESTATE_AGENCY", "RESTAURANT", "ROOFING_CONTRACTOR", "ROOM", "ROUTE", "RV_PARK", "SCHOOL", "SECONDARY_SCHOOL", "SHOE_STORE", "SHOPPING_MALL", "SPA", "STADIUM", "STORAGE", "STORE", "STREET_ADDRESS", "STREET_NUMBER", "SUBLOCALITY_LEVEL_1", "SUBLOCALITY_LEVEL_2", "SUBLOCALITY_LEVEL_3", "SUBLOCALITY_LEVEL_4", "SUBLOCALITY_LEVEL_5", "SUBLOCALITY", "SUBPREMISE", "SUBWAY_STATION", "SUPERMARKET", "SYNAGOGUE", "TAXI_STAND", "TOURIST_ATTRACTION", "TOWN_SQUARE", "TRAIN_STATION", "TRANSIT_STATION", "TRAVEL_AGENCY", "UNIVERSITY", "VETERINARY_CARE", "ZOO", "UNKNOWN" ] - }, "default": [ "UNKNOWN" ] - }, "doc": "The predefined categories or tags assigned to different places based on their characteristics. These types can represent various categories such as restaurants, cafes, museums, parks, hotels, airports, hospitals, and more."}, + } + }], "doc": "The predefined categories or tags assigned to different places based on their characteristics. These types can represent various categories such as restaurants, cafes, museums, parks, hotels, airports, hospitals, and more.", "default": ["UNKNOWN"] + }, { "name": "city", "type": ["null", "string"], "doc": "The city returned corresponds to the current location of the user's device.", "default": null }, { "name": "state", "type": ["null", "string"], "doc": "The state returned corresponds to the current location of the user's device.", "default": null }, { "name": "country", "type": ["null", "string"], "doc": "The city returned corresponds to the current location of the user's device.", "default": null }, { "name": "placeId", "type": ["null", "string"], "doc": "A unique identifier assigned to each place in the Google Places database. It serves as a specific reference or key to a particular place entry and is used to retrieve detailed information about that place.", "default": null }, - { "name": "likelihood", "type": "double", "doc": "The likelihood provides a relative probability of the place being the best match within the list of returned places for a single request. A higher value means a greater probability that the place is the best match. It's value ranges between 0.0 and 1.0." } + { "name": "likelihood", "type": "double", "doc": "The likelihood provides a relative probability of the place being the best match within the list of returned places for a single request. A higher value means a greater probability that the place is the best match. It's value ranges between 0.0 and 1.0." }, + { "name": "fromBroadcast", "type": "boolean", "doc": "Whether the data was generated as a result of a change in device location (true) or as part of a fixed scheduled intervals (false)." } ] } diff --git a/specifications/passive/google_places-1.0.0.yml b/specifications/passive/google_places-1.0.0.yml index a6de7ab2..2b7430e7 100644 --- a/specifications/passive/google_places-1.0.0.yml +++ b/specifications/passive/google_places-1.0.0.yml @@ -11,5 +11,5 @@ data: topic: android_google_places_info value_schema: .passive.google.GooglePlacesInfo sample_rate: - frequency: 600 - configurable: true \ No newline at end of file + interval: 600 + configurable: true From 0d0d00cb89b676345baee91ec4912f8c0e644677 Mon Sep 17 00:00:00 2001 From: Aditya Mishra Date: Wed, 16 Aug 2023 16:36:13 +0530 Subject: [PATCH 23/42] Updated default value for PlacesTypes and modified doc for place-ID --- commons/passive/google/google_places_info.avsc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/commons/passive/google/google_places_info.avsc b/commons/passive/google/google_places_info.avsc index 88524ffd..32f16e87 100644 --- a/commons/passive/google/google_places_info.avsc +++ b/commons/passive/google/google_places_info.avsc @@ -6,19 +6,19 @@ "fields": [ { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, { "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, - { "name": "types", "type": [{ + { "name": "types", "type": ["null", { "type": "array", "items": { "name": "PlacesType", "type": "enum", "doc": "Categories of places based on their characteristics or attributes.", "symbols": [ "ACCOUNTING", "ADMINISTRATIVE_AREA_LEVEL_1", "ADMINISTRATIVE_AREA_LEVEL_2", "ADMINISTRATIVE_AREA_LEVEL_3", "ADMINISTRATIVE_AREA_LEVEL_4", "ADMINISTRATIVE_AREA_LEVEL_5", "ADMINISTRATIVE_AREA_LEVEL_6", "ADMINISTRATIVE_AREA_LEVEL_7", "AIRPORT", "AMUSEMENT_PARK", "AQUARIUM", "ARCHIPELAGO", "ART_GALLERY", "ATM", "BAKERY", "BANK", "BAR", "BEAUTY_SALON", "BICYCLE_STORE", "BOOK_STORE", "BOWLING_ALLEY", "BUS_STATION", "CAFE", "CAMPGROUND", "CAR_DEALER", "CAR_RENTAL", "CAR_REPAIR", "CAR_WASH", "CASINO", "CEMETERY", "CHURCH", "CITY_HALL", "CLOTHING_STORE", "COLLOQUIAL_AREA", "CONTINENT", "CONVENIENCE_STORE", "COUNTRY", "COURTHOUSE", "DENTIST", "DEPARTMENT_STORE", "DOCTOR", "DRUGSTORE", "ELECTRICIAN", "ELECTRONICS_STORE", "EMBASSY", "ESTABLISHMENT", "FINANCE", "FIRE_STATION", "FLOOR", "FLORIST", "FOOD", "FUNERAL_HOME", "FURNITURE_STORE", "GAS_STATION", "GENERAL_CONTRACTOR", "GEOCODE", "GROCERY_OR_SUPERMARKET", "GYM", "HAIR_CARE", "HARDWARE_STORE", "HEALTH", "HINDU_TEMPLE", "HOME_GOODS_STORE", "HOSPITAL", "INSURANCE_AGENCY", "INTERSECTION", "JEWELRY_STORE", "LAUNDRY", "LAWYER", "LIBRARY", "LIGHT_RAIL_STATION", "LIQUOR_STORE", "LOCAL_GOVERNMENT_OFFICE", "LOCALITY", "LOCKSMITH", "LODGING", "MEAL_DELIVERY", "MEAL_TAKEAWAY", "MOSQUE", "MOVIE_RENTAL", "MOVIE_THEATER", "MOVING_COMPANY", "MUSEUM", "NATURAL_FEATURE", "NEIGHBORHOOD", "NIGHT_CLUB", "PAINTER", "PARK", "PARKING", "PET_STORE", "PHARMACY", "PHYSIOTHERAPIST", "PLACE_OF_WORSHIP", "PLUMBER", "PLUS_CODE", "POINT_OF_INTEREST", "POLICE", "POLITICAL", "POST_BOX", "POST_OFFICE", "POSTAL_CODE_PREFIX", "POSTAL_CODE_SUFFIX", "POSTAL_CODE", "POSTAL_TOWN", "PREMISE", "PRIMARY_SCHOOL", "REAL_ESTATE_AGENCY", "RESTAURANT", "ROOFING_CONTRACTOR", "ROOM", "ROUTE", "RV_PARK", "SCHOOL", "SECONDARY_SCHOOL", "SHOE_STORE", "SHOPPING_MALL", "SPA", "STADIUM", "STORAGE", "STORE", "STREET_ADDRESS", "STREET_NUMBER", "SUBLOCALITY_LEVEL_1", "SUBLOCALITY_LEVEL_2", "SUBLOCALITY_LEVEL_3", "SUBLOCALITY_LEVEL_4", "SUBLOCALITY_LEVEL_5", "SUBLOCALITY", "SUBPREMISE", "SUBWAY_STATION", "SUPERMARKET", "SYNAGOGUE", "TAXI_STAND", "TOURIST_ATTRACTION", "TOWN_SQUARE", "TRAIN_STATION", "TRANSIT_STATION", "TRAVEL_AGENCY", "UNIVERSITY", "VETERINARY_CARE", "ZOO", "UNKNOWN" ] } - }], "doc": "The predefined categories or tags assigned to different places based on their characteristics. These types can represent various categories such as restaurants, cafes, museums, parks, hotels, airports, hospitals, and more.", "default": ["UNKNOWN"] + }], "doc": "The predefined categories or tags assigned to different places based on their characteristics. These types can represent various categories such as restaurants, cafes, museums, parks, hotels, airports, hospitals, and more.", "default": null }, { "name": "city", "type": ["null", "string"], "doc": "The city returned corresponds to the current location of the user's device.", "default": null }, { "name": "state", "type": ["null", "string"], "doc": "The state returned corresponds to the current location of the user's device.", "default": null }, - { "name": "country", "type": ["null", "string"], "doc": "The city returned corresponds to the current location of the user's device.", "default": null }, - { "name": "placeId", "type": ["null", "string"], "doc": "A unique identifier assigned to each place in the Google Places database. It serves as a specific reference or key to a particular place entry and is used to retrieve detailed information about that place.", "default": null }, + { "name": "country", "type": ["null", "string"], "doc": "The country returned corresponds to the current location of the user's device.", "default": null }, + { "name": "placeId", "type": ["null", "string"], "doc": "A unique identifier assigned to each place in the Google Places database. It serves as a specific reference or key to a particular place entry and is used to retrieve detailed information about that place. By default, it is not retrieved to respect the user's privacy. To retrieve place IDs, Firebase parameters need to be explicitly set.", "default": null }, { "name": "likelihood", "type": "double", "doc": "The likelihood provides a relative probability of the place being the best match within the list of returned places for a single request. A higher value means a greater probability that the place is the best match. It's value ranges between 0.0 and 1.0." }, { "name": "fromBroadcast", "type": "boolean", "doc": "Whether the data was generated as a result of a change in device location (true) or as part of a fixed scheduled intervals (false)." } ] From c0aad16418779f4525505ca241b5a7f1437669e9 Mon Sep 17 00:00:00 2001 From: Aditya Mishra Date: Wed, 16 Aug 2023 16:37:11 +0530 Subject: [PATCH 24/42] Updated sample rate to dynamic also --- specifications/passive/google_places-1.0.0.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/specifications/passive/google_places-1.0.0.yml b/specifications/passive/google_places-1.0.0.yml index 2b7430e7..9b60951d 100644 --- a/specifications/passive/google_places-1.0.0.yml +++ b/specifications/passive/google_places-1.0.0.yml @@ -13,3 +13,4 @@ data: sample_rate: interval: 600 configurable: true + dynamic: true From db62a0b171f5c23ce6e9564b513d0556b1ffac42 Mon Sep 17 00:00:00 2001 From: Aditya Mishra Date: Thu, 17 Aug 2023 19:54:30 +0530 Subject: [PATCH 25/42] Removed UNKNOWN and some unavailable types from PlacesTypes enum --- commons/passive/google/google_places_info.avsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commons/passive/google/google_places_info.avsc b/commons/passive/google/google_places_info.avsc index 32f16e87..7f289908 100644 --- a/commons/passive/google/google_places_info.avsc +++ b/commons/passive/google/google_places_info.avsc @@ -11,7 +11,7 @@ "name": "PlacesType", "type": "enum", "doc": "Categories of places based on their characteristics or attributes.", - "symbols": [ "ACCOUNTING", "ADMINISTRATIVE_AREA_LEVEL_1", "ADMINISTRATIVE_AREA_LEVEL_2", "ADMINISTRATIVE_AREA_LEVEL_3", "ADMINISTRATIVE_AREA_LEVEL_4", "ADMINISTRATIVE_AREA_LEVEL_5", "ADMINISTRATIVE_AREA_LEVEL_6", "ADMINISTRATIVE_AREA_LEVEL_7", "AIRPORT", "AMUSEMENT_PARK", "AQUARIUM", "ARCHIPELAGO", "ART_GALLERY", "ATM", "BAKERY", "BANK", "BAR", "BEAUTY_SALON", "BICYCLE_STORE", "BOOK_STORE", "BOWLING_ALLEY", "BUS_STATION", "CAFE", "CAMPGROUND", "CAR_DEALER", "CAR_RENTAL", "CAR_REPAIR", "CAR_WASH", "CASINO", "CEMETERY", "CHURCH", "CITY_HALL", "CLOTHING_STORE", "COLLOQUIAL_AREA", "CONTINENT", "CONVENIENCE_STORE", "COUNTRY", "COURTHOUSE", "DENTIST", "DEPARTMENT_STORE", "DOCTOR", "DRUGSTORE", "ELECTRICIAN", "ELECTRONICS_STORE", "EMBASSY", "ESTABLISHMENT", "FINANCE", "FIRE_STATION", "FLOOR", "FLORIST", "FOOD", "FUNERAL_HOME", "FURNITURE_STORE", "GAS_STATION", "GENERAL_CONTRACTOR", "GEOCODE", "GROCERY_OR_SUPERMARKET", "GYM", "HAIR_CARE", "HARDWARE_STORE", "HEALTH", "HINDU_TEMPLE", "HOME_GOODS_STORE", "HOSPITAL", "INSURANCE_AGENCY", "INTERSECTION", "JEWELRY_STORE", "LAUNDRY", "LAWYER", "LIBRARY", "LIGHT_RAIL_STATION", "LIQUOR_STORE", "LOCAL_GOVERNMENT_OFFICE", "LOCALITY", "LOCKSMITH", "LODGING", "MEAL_DELIVERY", "MEAL_TAKEAWAY", "MOSQUE", "MOVIE_RENTAL", "MOVIE_THEATER", "MOVING_COMPANY", "MUSEUM", "NATURAL_FEATURE", "NEIGHBORHOOD", "NIGHT_CLUB", "PAINTER", "PARK", "PARKING", "PET_STORE", "PHARMACY", "PHYSIOTHERAPIST", "PLACE_OF_WORSHIP", "PLUMBER", "PLUS_CODE", "POINT_OF_INTEREST", "POLICE", "POLITICAL", "POST_BOX", "POST_OFFICE", "POSTAL_CODE_PREFIX", "POSTAL_CODE_SUFFIX", "POSTAL_CODE", "POSTAL_TOWN", "PREMISE", "PRIMARY_SCHOOL", "REAL_ESTATE_AGENCY", "RESTAURANT", "ROOFING_CONTRACTOR", "ROOM", "ROUTE", "RV_PARK", "SCHOOL", "SECONDARY_SCHOOL", "SHOE_STORE", "SHOPPING_MALL", "SPA", "STADIUM", "STORAGE", "STORE", "STREET_ADDRESS", "STREET_NUMBER", "SUBLOCALITY_LEVEL_1", "SUBLOCALITY_LEVEL_2", "SUBLOCALITY_LEVEL_3", "SUBLOCALITY_LEVEL_4", "SUBLOCALITY_LEVEL_5", "SUBLOCALITY", "SUBPREMISE", "SUBWAY_STATION", "SUPERMARKET", "SYNAGOGUE", "TAXI_STAND", "TOURIST_ATTRACTION", "TOWN_SQUARE", "TRAIN_STATION", "TRANSIT_STATION", "TRAVEL_AGENCY", "UNIVERSITY", "VETERINARY_CARE", "ZOO", "UNKNOWN" ] + "symbols": [ "ACCOUNTING", "ADMINISTRATIVE_AREA_LEVEL_1", "ADMINISTRATIVE_AREA_LEVEL_2", "ADMINISTRATIVE_AREA_LEVEL_3", "ADMINISTRATIVE_AREA_LEVEL_4", "ADMINISTRATIVE_AREA_LEVEL_5", "AIRPORT", "AMUSEMENT_PARK", "AQUARIUM", "ARCHIPELAGO", "ART_GALLERY", "ATM", "BAKERY", "BANK", "BAR", "BEAUTY_SALON", "BICYCLE_STORE", "BOOK_STORE", "BOWLING_ALLEY", "BUS_STATION", "CAFE", "CAMPGROUND", "CAR_DEALER", "CAR_RENTAL", "CAR_REPAIR", "CAR_WASH", "CASINO", "CEMETERY", "CHURCH", "CITY_HALL", "CLOTHING_STORE", "COLLOQUIAL_AREA", "CONTINENT", "CONVENIENCE_STORE", "COUNTRY", "COURTHOUSE", "DENTIST", "DEPARTMENT_STORE", "DOCTOR", "DRUGSTORE", "ELECTRICIAN", "ELECTRONICS_STORE", "EMBASSY", "ESTABLISHMENT", "FINANCE", "FIRE_STATION", "FLOOR", "FLORIST", "FOOD", "FUNERAL_HOME", "FURNITURE_STORE", "GAS_STATION", "GENERAL_CONTRACTOR", "GEOCODE", "GROCERY_OR_SUPERMARKET", "GYM", "HAIR_CARE", "HARDWARE_STORE", "HEALTH", "HINDU_TEMPLE", "HOME_GOODS_STORE", "HOSPITAL", "INSURANCE_AGENCY", "INTERSECTION", "JEWELRY_STORE", "LAUNDRY", "LAWYER", "LIBRARY", "LIGHT_RAIL_STATION", "LIQUOR_STORE", "LOCAL_GOVERNMENT_OFFICE", "LOCALITY", "LOCKSMITH", "LODGING", "MEAL_DELIVERY", "MEAL_TAKEAWAY", "MOSQUE", "MOVIE_RENTAL", "MOVIE_THEATER", "MOVING_COMPANY", "MUSEUM", "NATURAL_FEATURE", "NEIGHBORHOOD", "NIGHT_CLUB", "PAINTER", "PARK", "PARKING", "PET_STORE", "PHARMACY", "PHYSIOTHERAPIST", "PLACE_OF_WORSHIP", "PLUMBER", "PLUS_CODE", "POINT_OF_INTEREST", "POLICE", "POLITICAL", "POST_BOX", "POST_OFFICE", "POSTAL_CODE_PREFIX", "POSTAL_CODE_SUFFIX", "POSTAL_CODE", "POSTAL_TOWN", "PREMISE", "PRIMARY_SCHOOL", "REAL_ESTATE_AGENCY", "RESTAURANT", "ROOFING_CONTRACTOR", "ROOM", "ROUTE", "RV_PARK", "SCHOOL", "SECONDARY_SCHOOL", "SHOE_STORE", "SHOPPING_MALL", "SPA", "STADIUM", "STORAGE", "STORE", "STREET_ADDRESS", "STREET_NUMBER", "SUBLOCALITY_LEVEL_1", "SUBLOCALITY_LEVEL_2", "SUBLOCALITY_LEVEL_3", "SUBLOCALITY_LEVEL_4", "SUBLOCALITY_LEVEL_5", "SUBLOCALITY", "SUBPREMISE", "SUBWAY_STATION", "SUPERMARKET", "SYNAGOGUE", "TAXI_STAND", "TOURIST_ATTRACTION", "TOWN_SQUARE", "TRAIN_STATION", "TRANSIT_STATION", "TRAVEL_AGENCY", "UNIVERSITY", "VETERINARY_CARE", "ZOO"] } }], "doc": "The predefined categories or tags assigned to different places based on their characteristics. These types can represent various categories such as restaurants, cafes, museums, parks, hotels, airports, hospitals, and more.", "default": null }, From 05ee070b22aac116186d2ed056daa9755f7955f4 Mon Sep 17 00:00:00 2001 From: Pauline Conde Date: Fri, 18 Aug 2023 15:24:24 +0100 Subject: [PATCH 26/42] Fix typo --- commons/connector/oura/oura_daily_activity.avsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commons/connector/oura/oura_daily_activity.avsc b/commons/connector/oura/oura_daily_activity.avsc index 2f177934..bea3efc5 100644 --- a/commons/connector/oura/oura_daily_activity.avsc +++ b/commons/connector/oura/oura_daily_activity.avsc @@ -15,7 +15,7 @@ {"name": "contributorMoveEveryHour", "type": ["null", "int"], "doc": "Contribution of previous 24-hour inactivity alerts in range [1, 100] to the activity score. Null if unknown.", "default": null}, {"name": "contributorRecoveryTime", "type": ["null", "int"], "doc": "Contribution of previous 7-day recovery time in range [1, 100] to the activity score. Null if unknown.", "default": null}, {"name": "contributorStayActive", "type": ["null", "int"], "doc": "Contribution of previous 24-hour activity in range [1, 100] to the activity score. Null if unknown.", "default": null}, - {"name": "contirbutorTrainingFrequency", "type": ["null", "int"], "doc": "Contribution of previous 7-day exercise frequency in range [1, 100] to the activity score. Null if unknown.", "default": null}, + {"name": "contributorTrainingFrequency", "type": ["null", "int"], "doc": "Contribution of previous 7-day exercise frequency in range [1, 100] to the activity score. Null if unknown.", "default": null}, {"name": "contributorTrainingVolume", "type": ["null", "int"], "doc": "Contribution of previous 7-day exercise volume in range [1, 100] to the activity score. Null if unknown.", "default": null}, {"name": "equivalentWalkingDistance", "type": ["null", "int"], "doc": "Equivalent walking distance (in meters) of energy expenditure. Null if unknown.", "default": null}, {"name": "highActivityMetMinutes", "type": ["null", "int"], "doc": "High activity metabolic equivalent (MET) in minutes. Null if unknown.", "default": null}, From 3b1e99e6139ed4c700b5fc597e08bc9cf271dfb9 Mon Sep 17 00:00:00 2001 From: Pauline Date: Fri, 18 Aug 2023 16:20:23 +0100 Subject: [PATCH 27/42] Fix missing properties and incorrect types --- commons/connector/oura/oura_daily_activity.avsc | 2 +- commons/connector/oura/oura_session.avsc | 2 +- commons/connector/oura/oura_workout.avsc | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/commons/connector/oura/oura_daily_activity.avsc b/commons/connector/oura/oura_daily_activity.avsc index 2f177934..bea3efc5 100644 --- a/commons/connector/oura/oura_daily_activity.avsc +++ b/commons/connector/oura/oura_daily_activity.avsc @@ -15,7 +15,7 @@ {"name": "contributorMoveEveryHour", "type": ["null", "int"], "doc": "Contribution of previous 24-hour inactivity alerts in range [1, 100] to the activity score. Null if unknown.", "default": null}, {"name": "contributorRecoveryTime", "type": ["null", "int"], "doc": "Contribution of previous 7-day recovery time in range [1, 100] to the activity score. Null if unknown.", "default": null}, {"name": "contributorStayActive", "type": ["null", "int"], "doc": "Contribution of previous 24-hour activity in range [1, 100] to the activity score. Null if unknown.", "default": null}, - {"name": "contirbutorTrainingFrequency", "type": ["null", "int"], "doc": "Contribution of previous 7-day exercise frequency in range [1, 100] to the activity score. Null if unknown.", "default": null}, + {"name": "contributorTrainingFrequency", "type": ["null", "int"], "doc": "Contribution of previous 7-day exercise frequency in range [1, 100] to the activity score. Null if unknown.", "default": null}, {"name": "contributorTrainingVolume", "type": ["null", "int"], "doc": "Contribution of previous 7-day exercise volume in range [1, 100] to the activity score. Null if unknown.", "default": null}, {"name": "equivalentWalkingDistance", "type": ["null", "int"], "doc": "Equivalent walking distance (in meters) of energy expenditure. Null if unknown.", "default": null}, {"name": "highActivityMetMinutes", "type": ["null", "int"], "doc": "High activity metabolic equivalent (MET) in minutes. Null if unknown.", "default": null}, diff --git a/commons/connector/oura/oura_session.avsc b/commons/connector/oura/oura_session.avsc index 2d194452..3943b697 100644 --- a/commons/connector/oura/oura_session.avsc +++ b/commons/connector/oura/oura_session.avsc @@ -5,7 +5,7 @@ "doc": "The Sessions data scope provides information on how users engage with guided and unguided sessions in the Oura app, including the user’s biometric trends during the sessions.", "fields": [ {"name": "time", "type": "double", "doc": "Start time of the session in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, - {"name": "endTime", "type": ["null", "string"], "doc": "Timestamp indicating when the session ended. Null if unknown.", "default": null}, + {"name": "endTime", "type": "double", "doc": "End time of the session in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the session from Oura.", "default": null}, {"name": "type", "type": diff --git a/commons/connector/oura/oura_workout.avsc b/commons/connector/oura/oura_workout.avsc index 1c408ac9..324929e1 100644 --- a/commons/connector/oura/oura_workout.avsc +++ b/commons/connector/oura/oura_workout.avsc @@ -5,9 +5,10 @@ "doc": "The Workout data scope includes information about user workouts. This is a diverse, growing list of workouts that help inform how the user is training and exercising.", "fields": [ {"name": "time", "type": "double", "doc": "Start time of the workout in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, - {"name": "endTime", "type": ["null", "string"], "doc": "Timestamp indicating when the workout ended. Null if unknown.", "default": null}, + {"name": "endTime", "type": "double", "doc": "End time of the workout in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the workout from Oura.", "default": null}, + {"name": "activity", "type": ["null", "string"], "doc": "Type of the workout activity.", "default": null}, {"name": "calories", "type": ["null", "float"], "doc": "Energy burned in kilocalories during the workout. Null if unknown.", "default": null}, {"name": "day", "type": ["null", "string"], "doc": "Day when the workout occurred. Null if unknown.", "default": null}, {"name": "distance", "type": ["null", "float"], "doc": "Distance traveled in meters during the workout. Null if unknown.", "default": null}, From cfcb243d1686a2c87355b1403ad079331d45f9ea Mon Sep 17 00:00:00 2001 From: Aditya Mishra Date: Mon, 21 Aug 2023 19:46:50 +0530 Subject: [PATCH 28/42] Modified the Places Types from an array to enums. --- commons/passive/google/google_places_info.avsc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/commons/passive/google/google_places_info.avsc b/commons/passive/google/google_places_info.avsc index 7f289908..dc189ed3 100644 --- a/commons/passive/google/google_places_info.avsc +++ b/commons/passive/google/google_places_info.avsc @@ -6,15 +6,15 @@ "fields": [ { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, { "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, - { "name": "types", "type": ["null", { - "type": "array", "items": { + { "name": "type1", "type": ["null", { "name": "PlacesType", "type": "enum", - "doc": "Categories of places based on their characteristics or attributes.", + "doc": "The predefined categories or tags assigned to different places based on their characteristics. These types can represent various categories such as restaurants, cafes, museums, parks, hotels, airports, hospitals, and more.", "symbols": [ "ACCOUNTING", "ADMINISTRATIVE_AREA_LEVEL_1", "ADMINISTRATIVE_AREA_LEVEL_2", "ADMINISTRATIVE_AREA_LEVEL_3", "ADMINISTRATIVE_AREA_LEVEL_4", "ADMINISTRATIVE_AREA_LEVEL_5", "AIRPORT", "AMUSEMENT_PARK", "AQUARIUM", "ARCHIPELAGO", "ART_GALLERY", "ATM", "BAKERY", "BANK", "BAR", "BEAUTY_SALON", "BICYCLE_STORE", "BOOK_STORE", "BOWLING_ALLEY", "BUS_STATION", "CAFE", "CAMPGROUND", "CAR_DEALER", "CAR_RENTAL", "CAR_REPAIR", "CAR_WASH", "CASINO", "CEMETERY", "CHURCH", "CITY_HALL", "CLOTHING_STORE", "COLLOQUIAL_AREA", "CONTINENT", "CONVENIENCE_STORE", "COUNTRY", "COURTHOUSE", "DENTIST", "DEPARTMENT_STORE", "DOCTOR", "DRUGSTORE", "ELECTRICIAN", "ELECTRONICS_STORE", "EMBASSY", "ESTABLISHMENT", "FINANCE", "FIRE_STATION", "FLOOR", "FLORIST", "FOOD", "FUNERAL_HOME", "FURNITURE_STORE", "GAS_STATION", "GENERAL_CONTRACTOR", "GEOCODE", "GROCERY_OR_SUPERMARKET", "GYM", "HAIR_CARE", "HARDWARE_STORE", "HEALTH", "HINDU_TEMPLE", "HOME_GOODS_STORE", "HOSPITAL", "INSURANCE_AGENCY", "INTERSECTION", "JEWELRY_STORE", "LAUNDRY", "LAWYER", "LIBRARY", "LIGHT_RAIL_STATION", "LIQUOR_STORE", "LOCAL_GOVERNMENT_OFFICE", "LOCALITY", "LOCKSMITH", "LODGING", "MEAL_DELIVERY", "MEAL_TAKEAWAY", "MOSQUE", "MOVIE_RENTAL", "MOVIE_THEATER", "MOVING_COMPANY", "MUSEUM", "NATURAL_FEATURE", "NEIGHBORHOOD", "NIGHT_CLUB", "PAINTER", "PARK", "PARKING", "PET_STORE", "PHARMACY", "PHYSIOTHERAPIST", "PLACE_OF_WORSHIP", "PLUMBER", "PLUS_CODE", "POINT_OF_INTEREST", "POLICE", "POLITICAL", "POST_BOX", "POST_OFFICE", "POSTAL_CODE_PREFIX", "POSTAL_CODE_SUFFIX", "POSTAL_CODE", "POSTAL_TOWN", "PREMISE", "PRIMARY_SCHOOL", "REAL_ESTATE_AGENCY", "RESTAURANT", "ROOFING_CONTRACTOR", "ROOM", "ROUTE", "RV_PARK", "SCHOOL", "SECONDARY_SCHOOL", "SHOE_STORE", "SHOPPING_MALL", "SPA", "STADIUM", "STORAGE", "STORE", "STREET_ADDRESS", "STREET_NUMBER", "SUBLOCALITY_LEVEL_1", "SUBLOCALITY_LEVEL_2", "SUBLOCALITY_LEVEL_3", "SUBLOCALITY_LEVEL_4", "SUBLOCALITY_LEVEL_5", "SUBLOCALITY", "SUBPREMISE", "SUBWAY_STATION", "SUPERMARKET", "SYNAGOGUE", "TAXI_STAND", "TOURIST_ATTRACTION", "TOWN_SQUARE", "TRAIN_STATION", "TRANSIT_STATION", "TRAVEL_AGENCY", "UNIVERSITY", "VETERINARY_CARE", "ZOO"] - } - }], "doc": "The predefined categories or tags assigned to different places based on their characteristics. These types can represent various categories such as restaurants, cafes, museums, parks, hotels, airports, hospitals, and more.", "default": null + }], "doc": "Categorizing places based on their characteristics or attributes, this field represents the first type, if any, among the retrieved place categories.", "default": null }, + { "name": "type2", "type": ["null", "org.radarcns.passive.google.PlacesType"], "doc": "Categorizing places based on their characteristics or attributes, this field represents the second type, if any, among the retrieved place categories.", "default": null }, + { "name": "type3", "type": ["null", "org.radarcns.passive.google.PlacesType"], "doc": "Categorizing places based on their characteristics or attributes, this field represents the third type, if any, among the retrieved place categories.", "default": null }, { "name": "city", "type": ["null", "string"], "doc": "The city returned corresponds to the current location of the user's device.", "default": null }, { "name": "state", "type": ["null", "string"], "doc": "The state returned corresponds to the current location of the user's device.", "default": null }, { "name": "country", "type": ["null", "string"], "doc": "The country returned corresponds to the current location of the user's device.", "default": null }, From ff11b11ab2084b85c87188b02216a847805444a2 Mon Sep 17 00:00:00 2001 From: Pauline Date: Tue, 22 Aug 2023 17:47:44 +0100 Subject: [PATCH 29/42] Add ids to Oura subtypes --- commons/connector/oura/oura_heart_rate.avsc | 1 + commons/connector/oura/oura_heart_rate_variability.avsc | 1 + commons/connector/oura/oura_met.avsc | 1 + commons/connector/oura/oura_motion_count.avsc | 1 + 4 files changed, 4 insertions(+) diff --git a/commons/connector/oura/oura_heart_rate.avsc b/commons/connector/oura/oura_heart_rate.avsc index 0efef30b..95aea69a 100644 --- a/commons/connector/oura/oura_heart_rate.avsc +++ b/commons/connector/oura/oura_heart_rate.avsc @@ -6,6 +6,7 @@ "fields": [ {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, + {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the Oura session or sleep record the heart rate data is taken from.", "default": null}, {"name": "bpm", "type": ["null", "int"], "doc": "Heart rate in beats per minute.", "default": null}, {"name": "source", "type": {"name": "OuraHeartRateSource", "type": "enum", "symbols": ["AWAKE", "REST", "SLEEP", "SESSION", "LIVE", "WORKOUT", "UNKNOWN"], "doc": "Heart rate source type as computed by Oura."}, diff --git a/commons/connector/oura/oura_heart_rate_variability.avsc b/commons/connector/oura/oura_heart_rate_variability.avsc index 977d8d75..ab8021a1 100644 --- a/commons/connector/oura/oura_heart_rate_variability.avsc +++ b/commons/connector/oura/oura_heart_rate_variability.avsc @@ -6,6 +6,7 @@ "fields": [ {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, + {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the Oura session or sleep record the hrv data is taken from.", "default": null}, {"name": "hrv", "type": ["null", "float"], "doc": "The HRV value in milliseconds.", "default": null} ] } diff --git a/commons/connector/oura/oura_met.avsc b/commons/connector/oura/oura_met.avsc index c7b0046f..f998a5d1 100644 --- a/commons/connector/oura/oura_met.avsc +++ b/commons/connector/oura/oura_met.avsc @@ -6,6 +6,7 @@ "fields": [ {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, + {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the Oura activity record the met data is taken from.", "default": null}, {"name": "met", "type": ["null", "float"], "doc": "Activity metabolic equivalent (MET) in seconds.", "default": null} ] } diff --git a/commons/connector/oura/oura_motion_count.avsc b/commons/connector/oura/oura_motion_count.avsc index 4e2ae15c..8eccf1bb 100644 --- a/commons/connector/oura/oura_motion_count.avsc +++ b/commons/connector/oura/oura_motion_count.avsc @@ -6,6 +6,7 @@ "fields": [ {"name": "time", "type": "double", "doc": "Start time of the session in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, + {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the Oura session the motion count data is taken from.", "default": null}, {"name": "motionCount", "type": ["null", "int"], "doc": "Motion count during a session.", "default": null} ] } From c6e89bcda29a67d3289b021860b5305f766dd90c Mon Sep 17 00:00:00 2001 From: Pauline Date: Tue, 22 Aug 2023 17:48:02 +0100 Subject: [PATCH 30/42] Fix sleep and activity schemas --- commons/connector/oura/oura_daily_activity.avsc | 4 ---- commons/connector/oura/oura_sleep.avsc | 11 +++++++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/commons/connector/oura/oura_daily_activity.avsc b/commons/connector/oura/oura_daily_activity.avsc index bea3efc5..f33dc8ee 100644 --- a/commons/connector/oura/oura_daily_activity.avsc +++ b/commons/connector/oura/oura_daily_activity.avsc @@ -7,7 +7,6 @@ {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the activity from Oura.", "default": null}, - {"name": "fiveMinuteClass", "type": ["null", "int"], "doc": "A 5-minute activity classification for the activity period: 0 - Non-wear, 1 - Rest, 2 - Inactive, 3 - Low Activity, 4 - Medium Activity, 5 - High Activity. Null if unknown.", "default": null}, {"name": "score", "type": ["null", "int"], "doc": "Activity score in range [1, 100]. Null if unknown.", "default": null}, {"name": "activeCalories", "type": ["null", "int"], "doc": "Active calories expended (in kilocalories). Null if unknown.", "default": null}, {"name": "averageMetMinutes", "type": ["null", "float"], "doc": "Average metabolic equivalent (MET) in minutes. Null if unknown.", "default": null}, @@ -25,9 +24,6 @@ {"name": "lowActivityTime", "type": ["null", "int"], "doc": "Low activity metabolic equivalent (MET) in seconds. Null if unknown.", "default": null}, {"name": "mediumActivityMetMinutes", "type": ["null", "int"], "doc": "Medium activity metabolic equivalent (MET) in minutes. Null if unknown.", "default": null}, {"name": "mediumActivityTime", "type": ["null", "int"], "doc": "Medium activity metabolic equivalent (MET) in seconds. Null if unknown.", "default": null}, - {"name": "metSampleInterval", "type": ["null", "int"], "doc": "Interval in seconds between the sampled items. Null if unknown.", "default": null}, - {"name": "metSampleItems", "type": ["null", "int"], "doc": "Recorded sample items. Null if unknown.", "default": null}, - {"name": "metSampleTimestamp", "type": ["null", "int"], "doc": "Timestamp when the sample recording started. Null if unknown.", "default": null}, {"name": "metersToTarget", "type": ["null", "int"], "doc": "Remaining meters to target. Null if unknown.", "default": null}, {"name": "nonWearTime", "type": ["null", "int"], "doc": "The time (in seconds) in which the ring was not worn. Null if unknown.", "default": null}, {"name": "restingTime", "type": ["null", "int"], "doc": "Resting time (in seconds). Null if unknown.", "default": null}, diff --git a/commons/connector/oura/oura_sleep.avsc b/commons/connector/oura/oura_sleep.avsc index f6f4eef0..3cb791e8 100644 --- a/commons/connector/oura/oura_sleep.avsc +++ b/commons/connector/oura/oura_sleep.avsc @@ -20,7 +20,6 @@ {"name": "lightSleepDuration", "type": ["null", "int"], "doc": "Duration spent in light sleep in seconds.", "default": null}, {"name": "lowBatteryAlert", "type": ["null", "boolean"], "doc": "Flag indicating if a low battery alert occurred.", "default": null}, {"name": "lowestHeartRate", "type": ["null", "int"], "doc": "Lowest heart rate during sleep.", "default": null}, - {"name": "movementThirtySec", "type": ["null", "string"], "doc": "The 30-second movement classification for the period where every character corresponds to: '1' = no motion, '2' = restless, '3' = tossing and turning '4' = active.", "default": null}, {"name": "period", "type": ["null", "int"], "doc": "ECore sleep period identifier.", "default": null}, {"name": "readinessContributorActivityBalance", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, {"name": "readinessContributorBodyTemperature", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, @@ -36,10 +35,14 @@ {"name": "readinessScoreDelta", "type": ["null", "int"], "doc": "Effect on readiness score caused by this sleep period.", "default": null}, {"name": "remSleepDuration", "type": ["null", "int"], "doc": "Duration spent in REM sleep in seconds.", "default": null}, {"name": "restlessPeriods", "type": ["null", "int"], "doc": "Number of restless periods during sleep.", "default": null}, - {"name": "sleepPhaseFiveMin", "type": ["null", "int"], "doc": "The 5-minute sleep phase classification for the period where every character corresponds to: '1' = deep sleep, '2' = light sleep, '3' = REM sleep '4' = awake.", "default": null}, {"name": "sleepScoreDelta", "type": ["null", "int"], "doc": "Effect on sleep score caused by this sleep period.", "default": null}, + {"name": "sleepAlgorithmVersion", "type": + {"name": "OuraSleepAlgorithmVersion", "type": "enum", "symbols": ["V1", "V2"], "doc": "Oura Sleep algorithm version."}, + "doc": "Version of the sleep algorithm used to calculate the sleep data.", "default": "V2" }, {"name": "timeInBed", "type": ["null", "int"], "doc": "Duration spent in bed in seconds.", "default": null}, {"name": "totalSleepDuration", "type": ["null", "int"], "doc": "Total sleep duration in seconds.", "default": null}, - {"name": "type", "type": ["null", "string"], "doc": "Possible sleep period types.", "default": null} - ] + {"name": "type", "type": + {"name": "OuraSleepType", "type": "enum", "symbols": ["DELETED", "SLEEP", "LONG_SLEEP", "LATE_NAP", "REST", "UNKNOWN"], "doc": "Sleep type as computed by Oura."}, + "doc": "Possible sleep period types. UNKNOWN when this data is not provided.", "default": "UNKNOWN" } + ] } From 20268b5c478a58d73c11528f5c6d7071696d5998 Mon Sep 17 00:00:00 2001 From: Pauline Date: Tue, 22 Aug 2023 18:06:26 +0100 Subject: [PATCH 31/42] Add activity and sleep classification schemas --- commons/connector/oura/oura_activity_class.avsc | 14 ++++++++++++++ commons/connector/oura/oura_sleep_movement.avsc | 14 ++++++++++++++ commons/connector/oura/oura_sleep_phase.avsc | 14 ++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 commons/connector/oura/oura_activity_class.avsc create mode 100644 commons/connector/oura/oura_sleep_movement.avsc create mode 100644 commons/connector/oura/oura_sleep_phase.avsc diff --git a/commons/connector/oura/oura_activity_class.avsc b/commons/connector/oura/oura_activity_class.avsc new file mode 100644 index 00000000..1507a8fd --- /dev/null +++ b/commons/connector/oura/oura_activity_class.avsc @@ -0,0 +1,14 @@ +{ + "namespace": "org.radarcns.connector.oura", + "name": "OuraActivityClass", + "type": "record", + "doc": "Oura Activity class in 5-minute intervals as defined in https://cloud.ouraring.com/v2/docs#operation/Single_daily_activity_Document_v2_usercollection_daily_activity__document_id__get.", + "fields": [ + {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, + {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the Oura activity record the activity class data is taken from.", "default": null}, + {"name": "class", "type": + {"name": "OuraActivityClassType", "type": "enum", "symbols": ["NON_WEAR", "REST", "INACTIVE", "LOW_ACTIVITY", "MEDIUM_ACTIVITY", "HIGH_ACTIVITY", "UNKNOWN"], "doc": "Activity class type as computed by Oura."}, + "doc": "Activity classification at a 5-minute interval. UNKNOWN when this data is not provided.", "default": "UNKNOWN" } + ] +} diff --git a/commons/connector/oura/oura_sleep_movement.avsc b/commons/connector/oura/oura_sleep_movement.avsc new file mode 100644 index 00000000..827b9936 --- /dev/null +++ b/commons/connector/oura/oura_sleep_movement.avsc @@ -0,0 +1,14 @@ +{ + "namespace": "org.radarcns.connector.oura", + "name": "OuraSleepMovement", + "type": "record", + "doc": "Oura Sleep movement in 30-second intervals as defined in https://cloud.ouraring.com/v2/docs#operation/Single_sleep_Document_v2_usercollection_sleep__document_id__get.", + "fields": [ + {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, + {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the Oura sleep record the sleep movement data is taken from.", "default": null}, + {"name": "movement", "type": + {"name": "OuraSleepMovementType", "type": "enum", "symbols": ["NO_MOTION", "RESTLESS", "TOSSING_AND_TURNING", "ACTIVE", "UNKNOWN"], "doc": "Sleep movement type as computed by Oura."}, + "doc": "Sleep movement at a 30-second interval. UNKNOWN when this data is not provided (e.g. samples from sleep API).", "default": "UNKNOWN" } + ] +} diff --git a/commons/connector/oura/oura_sleep_phase.avsc b/commons/connector/oura/oura_sleep_phase.avsc new file mode 100644 index 00000000..3c14c873 --- /dev/null +++ b/commons/connector/oura/oura_sleep_phase.avsc @@ -0,0 +1,14 @@ +{ + "namespace": "org.radarcns.connector.oura", + "name": "OuraSleepPhase", + "type": "record", + "doc": "Oura Sleep phases in 5-minute intervals as defined in https://cloud.ouraring.com/v2/docs#operation/Single_sleep_Document_v2_usercollection_sleep__document_id__get.", + "fields": [ + {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, + {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the Oura sleep record the sleep stage data is taken from.", "default": null}, + {"name": "phase", "type": + {"name": "OuraSleepPhaseType", "type": "enum", "symbols": ["DEEP", "LIGHT", "REM", "AWAKE", "UNKNOWN"], "doc": "Sleep phase type as computed by Oura."}, + "doc": "Sleep phase at a 5-minute interval. UNKNOWN when this data is not provided (e.g. samples from sleep API).", "default": "UNKNOWN" } + ] +} From 1a5cf9f1ca1875c08e76173f869b1c0b0525d49d Mon Sep 17 00:00:00 2001 From: Pauline Date: Tue, 22 Aug 2023 18:16:25 +0100 Subject: [PATCH 32/42] Update Oura specification --- specifications/connector/radar-oura-connector.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/specifications/connector/radar-oura-connector.yml b/specifications/connector/radar-oura-connector.yml index fbd19da4..7ac5bb96 100644 --- a/specifications/connector/radar-oura-connector.yml +++ b/specifications/connector/radar-oura-connector.yml @@ -39,4 +39,13 @@ data: value_schema: .connector.oura.OuraWorkout - doc: The personal info scope includes personal information (e.g. age, email, weight, and height) about the user. topic: connect_oura_personal_info - value_schema: .connector.oura.OuraPersonalInfo \ No newline at end of file + value_schema: .connector.oura.OuraPersonalInfo + - doc: Sleep data with 5-minute granularity. 'Sleep Phase' levels include deep, light, rem, and awake. + topic: connect_oura_sleep_phase + value_schema: .connector.oura.OuraSleepPhase + - doc: Sleep movement data with 30-second granularity. 'Sleep Movement' levels include no motion, restless, tossing and turning, and active. + topic: connect_oura_sleep_movement + value_schema: .connector.oura.OuraSleepMovement + - doc: Activity data with 5-minute granularity. 'Activity Classes' include non-wear, rest, inactive, high, low, and medium activity. + topic: connect_oura_activity_class + value_schema: .connector.oura.OuraActivityClass From a135455d80403cd7ba6f2d4c78610ba7181b19bc Mon Sep 17 00:00:00 2001 From: Aditya Mishra Date: Thu, 24 Aug 2023 00:21:20 +0530 Subject: [PATCH 33/42] Added additional type for PlacesTypes --- commons/passive/google/google_places_info.avsc | 1 + 1 file changed, 1 insertion(+) diff --git a/commons/passive/google/google_places_info.avsc b/commons/passive/google/google_places_info.avsc index dc189ed3..2302ee89 100644 --- a/commons/passive/google/google_places_info.avsc +++ b/commons/passive/google/google_places_info.avsc @@ -15,6 +15,7 @@ }, { "name": "type2", "type": ["null", "org.radarcns.passive.google.PlacesType"], "doc": "Categorizing places based on their characteristics or attributes, this field represents the second type, if any, among the retrieved place categories.", "default": null }, { "name": "type3", "type": ["null", "org.radarcns.passive.google.PlacesType"], "doc": "Categorizing places based on their characteristics or attributes, this field represents the third type, if any, among the retrieved place categories.", "default": null }, + { "name": "type4", "type": ["null", "org.radarcns.passive.google.PlacesType"], "doc": "Categorizing places based on their characteristics or attributes, this field represents the fourth type, if any, among the retrieved place categories.", "default": null }, { "name": "city", "type": ["null", "string"], "doc": "The city returned corresponds to the current location of the user's device.", "default": null }, { "name": "state", "type": ["null", "string"], "doc": "The state returned corresponds to the current location of the user's device.", "default": null }, { "name": "country", "type": ["null", "string"], "doc": "The country returned corresponds to the current location of the user's device.", "default": null }, From e4e819424ce89ba7dea2d956608117e1b31600f9 Mon Sep 17 00:00:00 2001 From: Pauline Date: Thu, 24 Aug 2023 18:38:14 +0100 Subject: [PATCH 34/42] Fix OurActivityClass since 'class' is a keyword --- commons/connector/oura/oura_activity_class.avsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commons/connector/oura/oura_activity_class.avsc b/commons/connector/oura/oura_activity_class.avsc index 1507a8fd..b5a37490 100644 --- a/commons/connector/oura/oura_activity_class.avsc +++ b/commons/connector/oura/oura_activity_class.avsc @@ -7,7 +7,7 @@ {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the Oura activity record the activity class data is taken from.", "default": null}, - {"name": "class", "type": + {"name": "type", "type": {"name": "OuraActivityClassType", "type": "enum", "symbols": ["NON_WEAR", "REST", "INACTIVE", "LOW_ACTIVITY", "MEDIUM_ACTIVITY", "HIGH_ACTIVITY", "UNKNOWN"], "doc": "Activity class type as computed by Oura."}, "doc": "Activity classification at a 5-minute interval. UNKNOWN when this data is not provided.", "default": "UNKNOWN" } ] From f22982cda639b3e4e4fc3494bf625e571d8b1ba9 Mon Sep 17 00:00:00 2001 From: Pauline Date: Tue, 12 Sep 2023 17:35:27 +0100 Subject: [PATCH 35/42] Add Oura spo2 schema --- .../oura/oura_daily_oxygen_saturation.avsc | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 commons/connector/oura/oura_daily_oxygen_saturation.avsc diff --git a/commons/connector/oura/oura_daily_oxygen_saturation.avsc b/commons/connector/oura/oura_daily_oxygen_saturation.avsc new file mode 100644 index 00000000..fdab940e --- /dev/null +++ b/commons/connector/oura/oura_daily_oxygen_saturation.avsc @@ -0,0 +1,13 @@ +{ + "namespace": "org.radarcns.connector.oura", + "name": "OuraDailyOxygenSaturation", + "type": "record", + "doc": "This includes the daily blood oxygen saturation (spO2) average. Data only available for Gen 3 rings.", + "fields": [ + {"name": "time", "type": "double", "doc": "Start time of the sleep in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, + {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the sleep data from Oura.", "default": null}, + {"name": "spo2AveragePercentage", "type": ["null", "float"], "doc": "The average oxygen saturation percentage value over a single day.", "default": null}, + {"name": "day", "type": ["null", "string"], "doc": "Day that the daily oxygen saturation data belongs to. Null if unknown.", "default": null}, + ] +} From a72d48ac3a6c1f2c7ee2ebe9d900d7cfc0c0db61 Mon Sep 17 00:00:00 2001 From: Pauline Date: Tue, 12 Sep 2023 17:49:57 +0100 Subject: [PATCH 36/42] Fix spo2 schema --- commons/connector/oura/oura_daily_oxygen_saturation.avsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commons/connector/oura/oura_daily_oxygen_saturation.avsc b/commons/connector/oura/oura_daily_oxygen_saturation.avsc index fdab940e..c4cd2460 100644 --- a/commons/connector/oura/oura_daily_oxygen_saturation.avsc +++ b/commons/connector/oura/oura_daily_oxygen_saturation.avsc @@ -8,6 +8,6 @@ {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the sleep data from Oura.", "default": null}, {"name": "spo2AveragePercentage", "type": ["null", "float"], "doc": "The average oxygen saturation percentage value over a single day.", "default": null}, - {"name": "day", "type": ["null", "string"], "doc": "Day that the daily oxygen saturation data belongs to. Null if unknown.", "default": null}, + {"name": "day", "type": ["null", "string"], "doc": "Day that the daily oxygen saturation data belongs to. Null if unknown.", "default": null} ] } From a4717667d3b4c5a0048975d845188e6962b8e115 Mon Sep 17 00:00:00 2001 From: Pauline Date: Thu, 14 Sep 2023 20:01:15 +0100 Subject: [PATCH 37/42] Add updated Oura schemas from latest version of API --- .../oura/oura_daily_oxygen_saturation.avsc | 2 +- .../oura/oura_recommended_sleep_time.avsc | 21 +++++++++++++++++ .../connector/oura/oura_rest_mode_period.avsc | 14 +++++++++++ .../oura/oura_ring_configuration.avsc | 23 +++++++++++++++++++ 4 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 commons/connector/oura/oura_recommended_sleep_time.avsc create mode 100644 commons/connector/oura/oura_rest_mode_period.avsc create mode 100644 commons/connector/oura/oura_ring_configuration.avsc diff --git a/commons/connector/oura/oura_daily_oxygen_saturation.avsc b/commons/connector/oura/oura_daily_oxygen_saturation.avsc index c4cd2460..530f0c9b 100644 --- a/commons/connector/oura/oura_daily_oxygen_saturation.avsc +++ b/commons/connector/oura/oura_daily_oxygen_saturation.avsc @@ -6,7 +6,7 @@ "fields": [ {"name": "time", "type": "double", "doc": "Start time of the sleep in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, - {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the sleep data from Oura.", "default": null}, + {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the spO2 data from Oura.", "default": null}, {"name": "spo2AveragePercentage", "type": ["null", "float"], "doc": "The average oxygen saturation percentage value over a single day.", "default": null}, {"name": "day", "type": ["null", "string"], "doc": "Day that the daily oxygen saturation data belongs to. Null if unknown.", "default": null} ] diff --git a/commons/connector/oura/oura_recommended_sleep_time.avsc b/commons/connector/oura/oura_recommended_sleep_time.avsc new file mode 100644 index 00000000..dd132998 --- /dev/null +++ b/commons/connector/oura/oura_recommended_sleep_time.avsc @@ -0,0 +1,21 @@ +{ + "namespace": "org.radarcns.connector.oura", + "name": "OuraRecommendedSleepTime", + "type": "record", + "doc": "Oura recommendations for the optimal bedtime window that is calculated based on sleep data.", + "fields": [ + {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, + {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the Oura sleep time recommendation.", "default": null}, + {"name": "day", "type": ["null", "string"], "doc": "Day that the sleep recommendation record belongs to. Null if unknown.", "default": null}, + {"name": "bedtimeStartOffset", "type": ["null", "int"], "doc": "Day that the daily sleep belongs to. Null if unknown.", "default": null}, + {"name": "bedtimeEndOffset", "type": ["null", "int"], "doc": "Day that the daily sleep belongs to. Null if unknown.", "default": null}, + {"name": "timezoneOffset", "type": ["null", "int"], "doc": "Day that the daily sleep belongs to. Null if unknown.", "default": null}, + {"name": "recommendation", "type": + {"name": "OuraSleepRecommendation", "type": "enum", "symbols": ["IMPROVE_EFFICIENCY", "EARLIER_BEDTIME", "LATER_BEDTIME", "EARLIER_WAKE_UP_TIME", "LATER_WAKE_UP_TIME", "FOLLOW_OPTIMAL_BEDTIME", "UNKNOWN"], "doc": "Sleep phase type as computed by Oura."}, + "doc": "Oura recommendation action type for bedtime.", "default": "UNKNOWN" }, + {"name": "status", "type": + {"name": "OuraSleepStatus", "type": "enum", "symbols": ["NOT_ENOUGH_NIGHTS", "NOT_ENOUGH_RECENT_NIGHTS", "BAD_SLEEP_QUALITY", "ONLY_RECOMMENDED_FOUND", "OPTIMAL_FOUND", "UNKNOWN"], "doc": "Sleep phase type as computed by Oura."}, + "doc": "Oura sleep time status type. This is used to inform sleep time recommendation.", "default": "UNKNOWN" } + ] +} diff --git a/commons/connector/oura/oura_rest_mode_period.avsc b/commons/connector/oura/oura_rest_mode_period.avsc new file mode 100644 index 00000000..517fdc78 --- /dev/null +++ b/commons/connector/oura/oura_rest_mode_period.avsc @@ -0,0 +1,14 @@ +{ + "namespace": "org.radarcns.connector.oura", + "name": "OuraRestModePeriod", + "type": "record", + "doc": "The Rest Mode scope includes information about rest mode periods.", + "fields": [ + {"name": "time", "type": "double", "doc": "Start time of the rest mode period in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "endTime", "type": "double", "doc": "End time of the rest mode period in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, + {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the rest mode period from Oura.", "default": null}, + {"name": "startDay", "type": ["null", "string"], "doc": "Start date of the rest mode period. Null if unknown.", "default": null}, + {"name": "endDay", "type": ["null", "string"], "doc": "End date of the rest mode period. Null if unknown.", "default": null} + ] +} diff --git a/commons/connector/oura/oura_ring_configuration.avsc b/commons/connector/oura/oura_ring_configuration.avsc new file mode 100644 index 00000000..2a52d500 --- /dev/null +++ b/commons/connector/oura/oura_ring_configuration.avsc @@ -0,0 +1,23 @@ +{ + "namespace": "org.radarcns.connector.oura", + "name": "OuraRingConfiguration", + "type": "record", + "doc": "The Ring Configuration scope includes information about the user's ring(s). This includes the model, size, color, etc.", + "fields": [ + {"name": "time", "type": "double", "doc": "Start time of the rest mode period in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, + {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the ring configuration from Oura.", "default": null}, + {"name": "color", "type": + {"name": "OuraRingColor", "type": "enum", "symbols": ["GLOSSY_BLACK", "STEALTH_BLACK", "ROSE", "SILVER", "GLOSSY_GOLD", "UNKNOWN"], "doc": "Oura ring colors."}, + "doc": "Oura ring color.", "default": "UNKNOWN" }, + {"name": "design", "type": + {"name": "OuraRingDesign", "type": "enum", "symbols": ["HERITAGE", "HORIZON", "UNKNOWN"], "doc": "Oura ring designs."}, + "doc": "Oura ring design.", "default": "UNKNOWN" }, + {"name": "firmwareVersion", "type": ["null", "string"], "doc": "End date of the rest mode period. Null if unknown.", "default": null}, + {"name": "hardwareType", "type": + {"name": "OuraRingHardwareType", "type": "enum", "symbols": ["GEN1", "GEN2", "GEN2M", "GEN3", "UNKNOWN"], "doc": "Oura ring hardware type."}, + "doc": "Oura ring hardware types.", "default": "UNKNOWN" }, + {"name": "setUpAt", "type": ["null", "double"], "doc": "Timestamp indicating when the ring was set up. Null if unknown.", "default": null}, + {"name": "size", "type": ["null", "int"], "doc": "US size of the Oura ring. Null if unknown.", "default": null} + ] +} From e704929f3e2c6ed16175cc75e90e09b412f03410 Mon Sep 17 00:00:00 2001 From: Pauline Date: Thu, 21 Sep 2023 15:34:04 +0100 Subject: [PATCH 38/42] Fix Oura recommended sleep schema docs --- commons/connector/oura/oura_recommended_sleep_time.avsc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commons/connector/oura/oura_recommended_sleep_time.avsc b/commons/connector/oura/oura_recommended_sleep_time.avsc index dd132998..ca8057fa 100644 --- a/commons/connector/oura/oura_recommended_sleep_time.avsc +++ b/commons/connector/oura/oura_recommended_sleep_time.avsc @@ -8,9 +8,9 @@ {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the Oura sleep time recommendation.", "default": null}, {"name": "day", "type": ["null", "string"], "doc": "Day that the sleep recommendation record belongs to. Null if unknown.", "default": null}, - {"name": "bedtimeStartOffset", "type": ["null", "int"], "doc": "Day that the daily sleep belongs to. Null if unknown.", "default": null}, - {"name": "bedtimeEndOffset", "type": ["null", "int"], "doc": "Day that the daily sleep belongs to. Null if unknown.", "default": null}, - {"name": "timezoneOffset", "type": ["null", "int"], "doc": "Day that the daily sleep belongs to. Null if unknown.", "default": null}, + {"name": "bedtimeStartOffset", "type": ["null", "int"], "doc": "Recommended optimal bedtime start offset from midnight. Null if unknown.", "default": null}, + {"name": "bedtimeEndOffset", "type": ["null", "int"], "doc": "Recommended optimal bedtime end offset from midnight. Null if unknown.", "default": null}, + {"name": "timezoneOffset", "type": ["null", "int"], "doc": "Timezone offset in second from GMT of the day. Null if unknown.", "default": null}, {"name": "recommendation", "type": {"name": "OuraSleepRecommendation", "type": "enum", "symbols": ["IMPROVE_EFFICIENCY", "EARLIER_BEDTIME", "LATER_BEDTIME", "EARLIER_WAKE_UP_TIME", "LATER_WAKE_UP_TIME", "FOLLOW_OPTIMAL_BEDTIME", "UNKNOWN"], "doc": "Sleep phase type as computed by Oura."}, "doc": "Oura recommendation action type for bedtime.", "default": "UNKNOWN" }, From a11dc005d17b2027b18fe3bc322946bfa5440637 Mon Sep 17 00:00:00 2001 From: Pauline Date: Fri, 6 Oct 2023 14:42:18 +0100 Subject: [PATCH 39/42] Rename schemas and update docs --- ..._daily_oxygen_saturation.avsc => oura_daily_spo2.avsc} | 2 +- commons/connector/oura/oura_heart_rate.avsc | 2 +- commons/connector/oura/oura_heart_rate_variability.avsc | 2 +- commons/connector/oura/oura_recommended_sleep_time.avsc | 8 ++++---- commons/connector/oura/oura_ring_configuration.avsc | 2 +- commons/connector/oura/oura_sleep.avsc | 2 +- commons/connector/oura/oura_sleep_movement.avsc | 2 +- commons/connector/oura/oura_sleep_phase.avsc | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) rename commons/connector/oura/{oura_daily_oxygen_saturation.avsc => oura_daily_spo2.avsc} (95%) diff --git a/commons/connector/oura/oura_daily_oxygen_saturation.avsc b/commons/connector/oura/oura_daily_spo2.avsc similarity index 95% rename from commons/connector/oura/oura_daily_oxygen_saturation.avsc rename to commons/connector/oura/oura_daily_spo2.avsc index 530f0c9b..da2508ca 100644 --- a/commons/connector/oura/oura_daily_oxygen_saturation.avsc +++ b/commons/connector/oura/oura_daily_spo2.avsc @@ -1,6 +1,6 @@ { "namespace": "org.radarcns.connector.oura", - "name": "OuraDailyOxygenSaturation", + "name": "OuraDailySpo2", "type": "record", "doc": "This includes the daily blood oxygen saturation (spO2) average. Data only available for Gen 3 rings.", "fields": [ diff --git a/commons/connector/oura/oura_heart_rate.avsc b/commons/connector/oura/oura_heart_rate.avsc index 95aea69a..f4134cee 100644 --- a/commons/connector/oura/oura_heart_rate.avsc +++ b/commons/connector/oura/oura_heart_rate.avsc @@ -4,7 +4,7 @@ "type": "record", "doc": "The Heart Rate data scope includes time-series heart rate data throughout the day and night. Heart rate is provided at 5-minute increments.", "fields": [ - {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "time", "type": "double", "doc": "Timestamp of the heart rate in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the Oura session or sleep record the heart rate data is taken from.", "default": null}, {"name": "bpm", "type": ["null", "int"], "doc": "Heart rate in beats per minute.", "default": null}, diff --git a/commons/connector/oura/oura_heart_rate_variability.avsc b/commons/connector/oura/oura_heart_rate_variability.avsc index ab8021a1..b6693571 100644 --- a/commons/connector/oura/oura_heart_rate_variability.avsc +++ b/commons/connector/oura/oura_heart_rate_variability.avsc @@ -4,7 +4,7 @@ "type": "record", "doc": "This describes the heart rate variability provided by the Oura Ring.", "fields": [ - {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "time", "type": "double", "doc": "Start time of the hrv in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the Oura session or sleep record the hrv data is taken from.", "default": null}, {"name": "hrv", "type": ["null", "float"], "doc": "The HRV value in milliseconds.", "default": null} diff --git a/commons/connector/oura/oura_recommended_sleep_time.avsc b/commons/connector/oura/oura_recommended_sleep_time.avsc index ca8057fa..b6dcfb88 100644 --- a/commons/connector/oura/oura_recommended_sleep_time.avsc +++ b/commons/connector/oura/oura_recommended_sleep_time.avsc @@ -4,13 +4,13 @@ "type": "record", "doc": "Oura recommendations for the optimal bedtime window that is calculated based on sleep data.", "fields": [ - {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "time", "type": "double", "doc": "Start time of the recomended sleep time period in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the Oura sleep time recommendation.", "default": null}, {"name": "day", "type": ["null", "string"], "doc": "Day that the sleep recommendation record belongs to. Null if unknown.", "default": null}, - {"name": "bedtimeStartOffset", "type": ["null", "int"], "doc": "Recommended optimal bedtime start offset from midnight. Null if unknown.", "default": null}, - {"name": "bedtimeEndOffset", "type": ["null", "int"], "doc": "Recommended optimal bedtime end offset from midnight. Null if unknown.", "default": null}, - {"name": "timezoneOffset", "type": ["null", "int"], "doc": "Timezone offset in second from GMT of the day. Null if unknown.", "default": null}, + {"name": "optimalBedtimeStartOffset", "type": ["null", "int"], "doc": "Recommended optimal bedtime start offset from midnight. Null if unknown.", "default": null}, + {"name": "optimalBedtimeEndOffset", "type": ["null", "int"], "doc": "Recommended optimal bedtime end offset from midnight. Null if unknown.", "default": null}, + {"name": "optimalBedtimeTimezoneOffset", "type": ["null", "int"], "doc": "Timezone offset in second from GMT of the day. Null if unknown.", "default": null}, {"name": "recommendation", "type": {"name": "OuraSleepRecommendation", "type": "enum", "symbols": ["IMPROVE_EFFICIENCY", "EARLIER_BEDTIME", "LATER_BEDTIME", "EARLIER_WAKE_UP_TIME", "LATER_WAKE_UP_TIME", "FOLLOW_OPTIMAL_BEDTIME", "UNKNOWN"], "doc": "Sleep phase type as computed by Oura."}, "doc": "Oura recommendation action type for bedtime.", "default": "UNKNOWN" }, diff --git a/commons/connector/oura/oura_ring_configuration.avsc b/commons/connector/oura/oura_ring_configuration.avsc index 2a52d500..8a10be7f 100644 --- a/commons/connector/oura/oura_ring_configuration.avsc +++ b/commons/connector/oura/oura_ring_configuration.avsc @@ -4,7 +4,7 @@ "type": "record", "doc": "The Ring Configuration scope includes information about the user's ring(s). This includes the model, size, color, etc.", "fields": [ - {"name": "time", "type": "double", "doc": "Start time of the rest mode period in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "time", "type": "double", "doc": "Timestamp of the record in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the ring configuration from Oura.", "default": null}, {"name": "color", "type": diff --git a/commons/connector/oura/oura_sleep.avsc b/commons/connector/oura/oura_sleep.avsc index 3cb791e8..10055cac 100644 --- a/commons/connector/oura/oura_sleep.avsc +++ b/commons/connector/oura/oura_sleep.avsc @@ -4,7 +4,7 @@ "type": "record", "doc": "Oura Sleep data for the specified Oura user within a given timeframe. A user can have multiple sleep periods per day.", "fields": [ - {"name": "time", "type": "double", "doc": "Timestamp of the note containing the Oura tags."}, + {"name": "time", "type": "double", "doc": "Start time of the sleep in seconds."}, {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, {"name": "id", "type": ["null", "string"], "doc": "ID of the sleep record.", "default": null}, {"name": "averageBreath", "type": ["null", "float"], "doc": "Average breathing rate during sleep as breaths/second.", "default": null}, diff --git a/commons/connector/oura/oura_sleep_movement.avsc b/commons/connector/oura/oura_sleep_movement.avsc index 827b9936..39063145 100644 --- a/commons/connector/oura/oura_sleep_movement.avsc +++ b/commons/connector/oura/oura_sleep_movement.avsc @@ -4,7 +4,7 @@ "type": "record", "doc": "Oura Sleep movement in 30-second intervals as defined in https://cloud.ouraring.com/v2/docs#operation/Single_sleep_Document_v2_usercollection_sleep__document_id__get.", "fields": [ - {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "time", "type": "double", "doc": "Start time of the sleep movement in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the Oura sleep record the sleep movement data is taken from.", "default": null}, {"name": "movement", "type": diff --git a/commons/connector/oura/oura_sleep_phase.avsc b/commons/connector/oura/oura_sleep_phase.avsc index 3c14c873..eb8a4386 100644 --- a/commons/connector/oura/oura_sleep_phase.avsc +++ b/commons/connector/oura/oura_sleep_phase.avsc @@ -4,7 +4,7 @@ "type": "record", "doc": "Oura Sleep phases in 5-minute intervals as defined in https://cloud.ouraring.com/v2/docs#operation/Single_sleep_Document_v2_usercollection_sleep__document_id__get.", "fields": [ - {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "time", "type": "double", "doc": "Start time of the sleep phase in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the Oura sleep record the sleep stage data is taken from.", "default": null}, {"name": "phase", "type": From 4a68c3249ad0ae2f217a1ffbe9896e1dfbeb9485 Mon Sep 17 00:00:00 2001 From: Pauline Date: Fri, 6 Oct 2023 14:43:55 +0100 Subject: [PATCH 40/42] Update docs --- commons/connector/oura/oura_ring_configuration.avsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commons/connector/oura/oura_ring_configuration.avsc b/commons/connector/oura/oura_ring_configuration.avsc index 8a10be7f..d1f00fbe 100644 --- a/commons/connector/oura/oura_ring_configuration.avsc +++ b/commons/connector/oura/oura_ring_configuration.avsc @@ -13,7 +13,7 @@ {"name": "design", "type": {"name": "OuraRingDesign", "type": "enum", "symbols": ["HERITAGE", "HORIZON", "UNKNOWN"], "doc": "Oura ring designs."}, "doc": "Oura ring design.", "default": "UNKNOWN" }, - {"name": "firmwareVersion", "type": ["null", "string"], "doc": "End date of the rest mode period. Null if unknown.", "default": null}, + {"name": "firmwareVersion", "type": ["null", "string"], "doc": "Firmware version of the ring. Null if unknown.", "default": null}, {"name": "hardwareType", "type": {"name": "OuraRingHardwareType", "type": "enum", "symbols": ["GEN1", "GEN2", "GEN2M", "GEN3", "UNKNOWN"], "doc": "Oura ring hardware type."}, "doc": "Oura ring hardware types.", "default": "UNKNOWN" }, From 5c980eec3e21bd4fe2a032a1bdc3bc0f22b80fc0 Mon Sep 17 00:00:00 2001 From: Pauline Date: Fri, 6 Oct 2023 15:33:28 +0100 Subject: [PATCH 41/42] Update Oura specs --- specifications/connector/radar-oura-connector.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/specifications/connector/radar-oura-connector.yml b/specifications/connector/radar-oura-connector.yml index 7ac5bb96..7034e6f6 100644 --- a/specifications/connector/radar-oura-connector.yml +++ b/specifications/connector/radar-oura-connector.yml @@ -49,3 +49,15 @@ data: - doc: Activity data with 5-minute granularity. 'Activity Classes' include non-wear, rest, inactive, high, low, and medium activity. topic: connect_oura_activity_class value_schema: .connector.oura.OuraActivityClass + - doc: The daily spO2 data of the user. This contains the spO2 average. + topic: connect_oura_daily_spo2 + value_schema: .connector.oura.OuraDailySpo2 + - doc: The Rest Mode scope includes information about rest mode periods. + topic: connect_oura_rest_mode_period + value_schema: .connector.oura.OuraRestModePeriod + - doc: The Ring Configuration scope includes information about the user's ring(s). This includes the model, size, color, etc. + topic: connect_oura_ring_configuration + value_schema: .connector.oura.OuraRingConfiguration + - doc: This includes recommendations for the optimal bedtime window that is calculated based on sleep data. + topic: connect_oura_recommended_sleep_time + value_schema: .connector.oura.OuraRecommendedSleepTime \ No newline at end of file From fb3ad79c797aa329bbc3426deaec314a424a4dc5 Mon Sep 17 00:00:00 2001 From: Pauline Conde Date: Tue, 10 Oct 2023 10:53:25 +0100 Subject: [PATCH 42/42] Bump version --- java-sdk/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java-sdk/build.gradle.kts b/java-sdk/build.gradle.kts index 91e43b33..6ae361c9 100644 --- a/java-sdk/build.gradle.kts +++ b/java-sdk/build.gradle.kts @@ -9,7 +9,7 @@ plugins { } allprojects { - version = "0.8.5-SNAPSHOT" + version = "0.8.5" group = "org.radarbase" }