Skip to main content

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
}
}
FieldTypeDescription
timestampintegerUnix timestamp in milliseconds when the data was collected
sensorstringThe SensorSpec identifier (e.g., lamp.gps, lamp.accelerometer)
dataobjectSensor-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 SDKimport LAMP for 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:

  1. Raw features — Retrieve sensor event data directly (e.g., gps, accelerometer, device_state).
  2. Primary features — Compute intermediate metrics (e.g., significant_locations, trips, screen_active, acc_jerk).
  3. 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 SensorSpecReplaced ByNotes
lamp.gyroscopelamp.device_motionRotation data now in rotation sub-object
lamp.magnetometerlamp.device_motionMagnetic field data now in magnetic sub-object
lamp.screen_statelamp.device_stateIdentical schema — renamed for clarity
lamp.callslamp.telephonyCall type changed from integer codes to string labels
lamp.smslamp.telephonyText metadata now combined with call data
lamp.bluetoothlamp.nearby_deviceField names changed; now includes WiFi alongside Bluetooth
lamp.wifilamp.nearby_deviceBSSID/SSID fields changed to address/name
lamp.distanceRemoved. Distance available via lamp.steps with type: "distance"
lamp.flightsRemoved. No direct replacement.
lamp.weightRemoved. No direct replacement.
lamp.heightRemoved. No direct replacement.