Skip to content

Commit

Permalink
Add sensorkit schema and specification
Browse files Browse the repository at this point in the history
  • Loading branch information
peyman-mohtashami committed Oct 17, 2024
1 parent 462c691 commit 1e49305
Show file tree
Hide file tree
Showing 16 changed files with 203 additions and 197 deletions.
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)." }
]
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"namespace": "org.radarcns.passive.phone",
"type": "record",
"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)." }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{
"namespace": "org.radarcns.passive.phone",
"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": "chromaticityX", "type": "float", "doc": "x-value of the coordinate pair that describes the light brightness and tint." },
{ "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": ["frontBottom", "frontBottomLeft", "frontBottomRight", "frontLeft", "frontRight", "frontTop", "frontTopLeft", "frontTopRight", "unknown"]
}, "doc": "The light’s location relative to the sensor.", "default": "UNKNOWN"},
"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." }
]
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"namespace": "org.radarcns.passive.phone",
"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." },
{ "name": "totalUniqueContacts", "type": "int", "doc": "The user’s number of contacts." }
]
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"namespace": "org.radarcns.passive.phone",
"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",
Expand All @@ -20,6 +21,6 @@
"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)." },
{ "name": "onWristDate", "type": "double", "doc": "On Wrist Date timestamp in UTC (s)." }
]
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{
"namespace": "org.radarcns.passive.phone",
"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": "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." }
]
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
{
"namespace": "org.radarcns.passive.phone",
"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." },
{ "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." }

]
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"namespace": "org.radarcns.passive.phone",
"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)." },
Expand All @@ -19,6 +20,6 @@
"type": "enum",
"doc": "Types of locations.",
"symbols": ["GYM", "HOME", "SCHOOL", "WORK", "UNKNOWN"]
}, "doc": "The location’s type.", "default": "UNKNOWN"},
}, "doc": "The location’s type.", "default": "UNKNOWN"}
]
}
Loading

0 comments on commit 1e49305

Please sign in to comment.