Sensor Data Format
All sensor data in mindLAMP follows a consistent event-based format, making retrieval and analysis straightforward.
SensorEvent Structureโ
{
"timestamp": 1649859212042,
"sensor": "lamp.gps",
"data": {
"latitude": 42.3601,
"longitude": -71.0589,
"altitude": 12.5,
"accuracy": 10.0
}
}
| Field | Type | Description |
|---|---|---|
timestamp | integer | Unix timestamp in milliseconds when the data was collected |
sensor | string | The SensorSpec identifier (e.g., lamp.gps, lamp.accelerometer) |
data | object | Sensor-specific payload โ structure varies by sensor type |
The data payload structure depends on the sensor. See the Sensor Reference for the fields produced by each sensor.
Data Retrievalโ
Data can be retrieved through:
- REST API โ Query sensor events for specific participants, time ranges, and types. See the API documentation.
- Python SDK โ
import LAMPfor programmatic data access. See Python SDK. - Cortex โ Process raw events into computed behavioral features automatically. See Cortex.
- Dashboard โ View and export data through the Data Portal or the Portal tab.
Cortex Analysisโ
Sensor event data โ sometimes referred to as raw data โ is what the Cortex pipeline uses to calculate higher-level behavioral metrics. Cortex transforms this raw sensor data into behavioral insights through three stages:
- Raw features โ Retrieve sensor event data directly (e.g.,
gps,accelerometer,device_state). - Primary features โ Compute intermediate metrics (e.g.,
significant_locations,trips,screen_active,acc_jerk). - Secondary features โ Aggregate into behavioral measures (e.g.,
hometime,entropy,screen_duration,step_count).
See the Cortex documentation for details. For per-sensor schemas, see the Sensor Reference.
Deprecated Sensorsโ
The following sensor identifiers have been superseded. Data collected under these identifiers may still appear in historical records. Cortex handles both old and new identifiers automatically.
| Old SensorSpec | Replaced By | Notes |
|---|---|---|
lamp.gyroscope | lamp.device_motion | Rotation data now in rotation sub-object |
lamp.magnetometer | lamp.device_motion | Magnetic field data now in magnetic sub-object |
lamp.screen_state | lamp.device_state | Identical schema โ renamed for clarity |
lamp.calls | lamp.telephony | Call type changed from integer codes to string labels |
lamp.sms | lamp.telephony | Text metadata now combined with call data |
lamp.bluetooth | lamp.nearby_device | Field names changed; now includes WiFi alongside Bluetooth |
lamp.wifi | lamp.nearby_device | BSSID/SSID fields changed to address/name |
lamp.distance | โ | Removed. Distance available via lamp.steps with type: "distance" |
lamp.flights | โ | Removed. No direct replacement. |
lamp.weight | โ | Removed. No direct replacement. |
lamp.height | โ | Removed. No direct replacement. |