Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sensorkit schema #391

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions commons/passive/apple/ios/ios_magnetic_field.avsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"namespace": "org.radarcns.passive.apple.ios",
"type": "record",
"name": "IosMagneticField",
"doc": "Data from the 3-axis magnetometer.",
"fields": [
{ "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." },
{ "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." },
{ "name": "x", "type": "float", "doc": "Magnetic field in the x-axis (μT)." },
{ "name": "y", "type": "float", "doc": "Magnetic field in the y-axis (μT)." },
{ "name": "z", "type": "float", "doc": "Magnetic field in the z-axis (μT)." }
]
}
14 changes: 14 additions & 0 deletions commons/passive/apple/sensorkit/sensorkit_acceleration.avsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"namespace": "org.radarcns.passive.apple.sensorkit",
"name": "SensorKitAcceleration",
"type": "record",
"doc": "Data from 3-axis accelerometer sensor with gravitational constant g as unit.",
"fields": [
{ "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." },
{ "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." },
{ "name": "device", "type": "string", "doc": "Device model." },
{ "name": "x", "type": "float", "doc": "Acceleration in the x-axis (g)." },
{ "name": "y", "type": "float", "doc": "Acceleration in the y-axis (g)." },
{ "name": "z", "type": "float", "doc": "Acceleration in the z-axis (g)." }
]
}
20 changes: 20 additions & 0 deletions commons/passive/apple/sensorkit/sensorkit_ambient_light.avsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"namespace": "org.radarcns.passive.apple.sensorkit",
"type": "record",
"name": "SensorKitAmbientLight",
"doc": "Data describes the amount of ambient light in the user’s environment.",
"fields": [
{ "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." },
{ "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." },
{ "name": "device", "type": "string", "doc": "Device model." },
{ "name": "chromaticityX", "type": "float", "doc": "x-value of the coordinate pair that describes the light brightness and tint." },
{ "name": "chromaticityY", "type": "float", "doc": "y-value of the coordinate pair that describes the light brightness and tint." },
{ "name": "lux", "type": "float", "doc": "Illuminance (lx)." },
{ "name": "placement", "type": {
"name": "SensorPlacement",
"type": "enum",
"doc": "Directional values that describe light-source location with respect to the sensor.",
"symbols": ["FRONT_BOTTOM", "FRONT_BOTTOM_LEFT", "FRONT_BOTTOM_RIGHT", "FRONT_LEFT", "FRONT_RIGHT", "FRONT_TOP", "FRONT_TOP_LEFT", "FRONT_TOP_RIGHT", "UNKNOWN"]
}, "doc": "The light’s location relative to the sensor.", "default": "UNKNOWN"}
]
}
13 changes: 13 additions & 0 deletions commons/passive/apple/sensorkit/sensorkit_ambient_pressure.avsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"namespace": "org.radarcns.passive.apple.sensorkit",
"type": "record",
"name": "SensorKitAmbientPressure",
"doc": "A measurement of the ambient pressure and temperature.",
"fields": [
{ "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." },
{ "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." },
{ "name": "device", "type": "string", "doc": "Device model." },
{ "name": "pressure", "type": "double", "doc": "The ambient pressure (Pascal)." },
{ "name": "temperature", "type": "double", "doc": "The temperature (Celsius)." }
]
}
19 changes: 19 additions & 0 deletions commons/passive/apple/sensorkit/sensorkit_device_usage.avsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"namespace": "org.radarcns.passive.apple.sensorkit",
"type": "record",
"name": "SensorKitDeviceUsage",
"doc": "Describes the frequency and relative duration that the user uses their device, particular Apple apps, or websites.",
"fields": [
{ "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." },
{ "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." },
{ "name": "device", "type": "string", "doc": "Device model." },
{ "name": "duration", "type": "double", "doc": "The duration that the report spans (s)." },
{ "name": "totalScreenWakes", "type": "int", "doc": "The total number of screen wakes for the device." },
{ "name": "totalUnlocks", "type": "int", "doc": "The total number of unlocks for the device." },
{ "name": "totalUnlockDuration", "type": "double", "doc": " The duration of time the device is in an unlocked state (s)." },
{ "name": "version", "type": "string", "doc": "Version" },
{ "name": "applicationUsageByCategory", "type": "string", "doc": "The usage time of apps per category." },
{ "name": "notificationUsageByCategory", "type": "string", "doc": "The frequency of notifications per category." },
{ "name": "webUsageByCategory", "type": "string", "doc": "The amount of time the user accesses domains per category." }
]
}
18 changes: 18 additions & 0 deletions commons/passive/apple/sensorkit/sensorkit_keyboard_metrics.avsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"namespace": "org.radarcns.passive.apple.sensorkit",
"type": "record",
"name": "SensorKitKeyboardMetrics",
"doc": "Data that describes the configuration of a device’s keyboard and its usage patterns.",
"fields": [
{ "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." },
{ "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." },
{ "name": "device", "type": "string", "doc": "Device model." },
{ "name": "totalWords", "type": "int", "doc": "The total number of typed words for the keyboard." },
{ "name": "totalAlteredWords", "type": "int", "doc": "The total number of altered words for the keyboard." },
{ "name": "totalTaps", "type": "int", "doc": "The total number of taps for the keyboard." },
{ "name": "totalEmojis", "type": "int", "doc": "The total number of emojis for the keyboard." },
{ "name": "totalTypingDuration", "type": "double", "doc": "The total amount of typing time for the keyboard." },
{ "name": "totalPauses", "type": "int", "doc": "The total number of pauses during the session." },
{ "name": "totalTypingEpisodes", "type": "int", "doc": "The total number of continuous typing episodes during the session." }
]
}
15 changes: 15 additions & 0 deletions commons/passive/apple/sensorkit/sensorkit_message_usage.avsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"namespace": "org.radarcns.passive.apple.sensorkit",
"type": "record",
"name": "SensorKitMessageUsage",
"doc": "Data that describes the user’s Messages app activity over a period of time.",
"fields": [
{ "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." },
{ "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." },
{ "name": "device", "type": "string", "doc": "Device model." },
{ "name": "duration", "type": "double", "doc": "The duration that the report spans (s)." },
{ "name": "totalIncomingMessages", "type": "int", "doc": "The number of messages the user receives." },
{ "name": "totalOutgoingMessages", "type": "int", "doc": "The number of messages the user sends." },
{ "name": "totalUniqueContacts", "type": "int", "doc": "The user’s number of contacts." }
]
}
26 changes: 26 additions & 0 deletions commons/passive/apple/sensorkit/sensorkit_on_wrist.avsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"namespace": "org.radarcns.passive.apple.sensorkit",
"type": "record",
"name": "SensorKitOnWrist",
"doc": "Data about the configuration of a watch on the wearer’s wrist.",
"fields": [
{ "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." },
{ "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." },
{ "name": "device", "type": "string", "doc": "Device model." },
{ "name": "crownOrientation", "type": {
"name": "CrownOrientation",
"type": "enum",
"doc": "Directions the Digital Crown can face with respect to the wearer.",
"symbols": ["LEFT", "RIGHT"]
}, "doc": "A value that indicates the direction the Digital Crown faces with respect to the wearer." },
{ "name": "onWrist", "type": "boolean", "doc": "A value that indicates whether the watch is on the user’s wrist." },
{ "name": "wristLocation", "type": {
"name": "WristLocation",
"type": "enum",
"doc": "Preferences for where a user wears a watch.",
"symbols": ["LEFT", "RIGHT"]
}, "doc": "A value that indicates the wrist where the user wears the watch." },
{ "name": "offWristDate", "type": "double", "doc": "Off Wrist Date timestamp in UTC (s)." },
{ "name": "onWristDate", "type": "double", "doc": "On Wrist Date timestamp in UTC (s)." }
]
}
20 changes: 20 additions & 0 deletions commons/passive/apple/sensorkit/sensorkit_pedometer.avsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"namespace": "org.radarcns.passive.apple.sensorkit",
"type": "record",
"name": "SensorKitPedometer",
"doc": "Data about the distance traveled by a user on foot.",
"fields": [
{"name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." },
{"name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." },
{ "name": "device", "type": "string", "doc": "Device model." },
{"name": "startDate", "type": "double", "doc": "The start time for the pedometer data timestamp in UTC (s)." },
{"name": "endDate", "type": "double", "doc": "The end time for the pedometer data timestamp in UTC (s)." },
{"name": "numberOfSteps", "type": "int", "doc": "Number of steps taken between this and the previous record." },
{"name": "distance", "type": "double", "doc": "The estimated distance (in meters) traveled by the user." },
{"name": "averageActivePace", "type": "double", "doc": "The average pace of the user, measured in seconds per meter." },
{"name": "currentPace", "type": "double", "doc": "The current pace of the user, measured in seconds per meter." },
{"name": "currentCadence", "type": "double", "doc": "The rate at which steps are taken, measured in steps per second." },
{"name": "floorsAscended", "type": "int", "doc": "The approximate number of floors ascended by walking." },
{"name": "floorsDescended", "type": "int", "doc": "The approximate number of floors descended by walking." }
]
}
16 changes: 16 additions & 0 deletions commons/passive/apple/sensorkit/sensorkit_phone_usage.avsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"namespace": "org.radarcns.passive.apple.sensorkit",
"type": "record",
"name": "SensorKitPhoneUsage",
"doc": "Data that describes the user’s phone activity over a period of time.",
"fields": [
{ "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." },
{ "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." },
{ "name": "device", "type": "string", "doc": "Device model." },
{ "name": "duration", "type": "double", "doc": "The duration that the report spans (s)." },
{ "name": "totalIncomingCalls", "type": "int", "doc": "The number of calls the user receives." },
{ "name": "totalOutgoingCalls", "type": "int", "doc": "The number of calls the user makes." },
{ "name": "totalPhoneCallDuration", "type": "double", "doc": "The total duration of all calls. (s)" },
{ "name": "totalUniqueContacts", "type": "int", "doc": "The user’s number of contacts." }
]
}
14 changes: 14 additions & 0 deletions commons/passive/apple/sensorkit/sensorkit_rotation_rate.avsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"namespace": "org.radarcns.passive.apple.sensorkit",
"name": "SensorKitRotationRate",
"type": "record",
"doc": "Data from the 3-axis gyroscope sensor (rotation-rate).",
"fields": [
{ "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." },
{ "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." },
{ "name": "device", "type": "string", "doc": "Device model." },
{ "name": "x", "type": "float", "doc": "Gyration in the x-axis (rad/s)." },
{ "name": "y", "type": "float", "doc": "Gyration in the y-axis (rad/s)." },
{ "name": "z", "type": "float", "doc": "Gyration in the z-axis (rad/s)." }
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"namespace": "org.radarcns.passive.apple.sensorkit",
"type": "record",
"name": "SensorKitTelephonySpeechMetrics",
"doc": "Describes the metrics about a range of speech.",
"fields": [
{ "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." },
{ "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." },
{ "name": "device", "type": "string", "doc": "Device model." },

{ "name": "audioLevelStart", "type": ["null", "double"], "doc": "The start time of the time range in the audio stream that the level applies to, in seconds relative to time (s)." },
{ "name": "audioLevelDuration", "type": ["null", "double"], "doc": "The duration of the time range in the audio stream that the level applies to (s)." },
{ "name": "audioLevelLoudness", "type": ["null", "double"], "doc": "The measure of the audio level in decibels." },

{ "name": "soundClassificationStart", "type": ["null", "double"], "doc": "The start time of the time span that corresponds to the result’s classifications, in seconds relative to time (s)." },
{ "name": "soundClassificationDuration", "type": ["null", "double"], "doc": "The duration of the time span that corresponds to the result’s classifications (s)." },
{ "name": "soundClassification", "type": ["null", "string"], "doc": "The confidence value the model has in its prediction." },

{ "name": "speechExpressionStart", "type": ["null", "double"], "doc": "The start time of the time range in the audio stream that the metrics and analytics apply to, in seconds relative to time (s)." },
{ "name": "speechExpressionDuration", "type": ["null", "double"], "doc": "The duration of the time range in the audio stream that the metrics and analytics apply to (s)." },
{ "name": "speechExpressionActivation", "type": ["null", "double"], "doc": "The level of energy or activation of the speaker." },
{ "name": "speechExpressionConfidence", "type": ["null", "double"], "doc": "The level of confidence of the speaker." },
{ "name": "speechExpressionDominance", "type": ["null", "double"], "doc": "The degree of how strong or meek the speaker sounds." },
{ "name": "speechExpressionMood", "type": ["null", "double"], "doc": "An indication of how slurry, tired, or exhausted the speaker sounds compared to normal speech." },
{ "name": "speechExpressionValence", "type": ["null", "double"], "doc": "The degree of positive or negative emotion or sentiment of the speaker." }

]
}
25 changes: 25 additions & 0 deletions commons/passive/apple/sensorkit/sensorkit_visits.avsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"namespace": "org.radarcns.passive.apple.sensorkit",
"type": "record",
"name": "SensorKitVisits",
"doc": "The user’s progress in their daily travel routine.",
"fields": [
{ "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." },
{ "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." },
{ "name": "device", "type": "string", "doc": "Device model." },
{ "name": "identifier", "type": "string", "doc": "A value that maps to a unique geographic location." },
{ "name": "arrivalDateIntervalStart", "type": "double", "doc": "The start date of a range of time within which the user arrives at a location of interest timestamp in UTC (s)." },
{ "name": "arrivalDateIntervalEnd", "type": "double", "doc": "The end date of a range of time within which the user arrives at a location of interest timestamp in UTC (s)." },
{ "name": "arrivalDateIntervalDuration", "type": "double", "doc": "The duration of a range of time within which the user arrives at a location of interest (s)." },
{ "name": "departureDateIntervalStart", "type": "double", "doc": "The start date of a range of time within which the user departs from a location of interest timestamp in UTC (s)." },
{ "name": "departureDateIntervalEnd", "type": "double", "doc": "The end date of a range of time within which the user departs from a location of interest timestamp in UTC (s)." },
{ "name": "departureDateIntervalDuration", "type": "double", "doc": "The duration of a range of time within which the user departs from a location of interest (s)." },
{ "name": "distanceFromHome", "type": "double", "doc": "The location’s distance from the home-category location." },
{ "name": "locationCategory", "type": {
"name": "LocationCategory",
"type": "enum",
"doc": "Types of locations.",
"symbols": ["GYM", "HOME", "SCHOOL", "WORK", "UNKNOWN"]
}, "doc": "The location’s type.", "default": "UNKNOWN"}
]
}
68 changes: 68 additions & 0 deletions specifications/passive/apple_sensorkit-1.0.0.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#====================================== Apple SensorKit =====================================#
name: apple-sensorkit
vendor: Apple
model: SensorKit
version: 1.0.0
doc: "Apple SensorKit integration"
data:
- type: ACCELERATION
topic: sensorkit_acceleration
value_schema: .passive.apple.sensorkit.SensorKitAcceleration
sample_rate:
dynamic: true
- type: GYROSCOPE
topic: sensorkit_rotation_rate
value_schema: .passive.apple.sensorkit.SensorKitRotationRate
sample_rate:
dynamic: true
unit: RADAIAN_PER_SEC
- type: AMBIENT_LIGHT
topic: sensorkit_ambient_light
value_schema: .passive.apple.sensorkit.SensorKitAmbientLight
sample_rate:
dynamic: true
- type: AMBIENT_PRESSURE
topic: sensorkit_ambient_pressure
value_schema: .passive.apple.sensorkit.SensorKitAmbientPressure
sample_rate:
dynamic: true
- type: KEYBOARD_METRICS
topic: sensorkit_keyboard_metrics
value_schema: .passive.apple.sensorkit.SensorKitKeyboardMetrics
sample_rate:
dynamic: true
- type: MESSAGE_USAGE
topic: sensorkit_message_usage
value_schema: .passive.apple.sensorkit.SensorKitMessageUsage
sample_rate:
dynamic: true
- type: ON_WRIST
topic: sensorkit_on_wrist
value_schema: .passive.apple.sensorkit.SensorKitOnWrist
sample_rate:
dynamic: true
- type: PEDOMETER
topic: sensorkit_pedometer
value_schema: .passive.apple.sensorkit.SensorKitPedometer
sample_rate:
dynamic: true
- type: PHONE_USAGE
topic: sensorkit_phone_usage
value_schema: .passive.apple.sensorkit.SensorKitPhoneUsage
sample_rate:
dynamic: true
- type: VISITS
topic: sensorkit_visits
value_schema: .passive.apple.sensorkit.SensorKitVisits
sample_rate:
dynamic: true
- type: DEVICE_USAGE
topic: sensorkit_device_usage
value_schema: .passive.apple.sensorkit.SensorKitDeviceUsage
sample_rate:
dynamic: true
- type: TELEPHONY_SPEECH_METRICS
topic: sensorkit_telephony_speech_metrics
value_schema: .passive.apple.sensorkit.SensorKitTelephonySpeechMetrics
sample_rate:
dynamic: true
Loading