Environmental Sensors

Environmental sensors record the conditions around the participant’s phone: temperature, light, air pressure, nearby objects, and humidity. Use them to add context to survey responses and other data, for example how bright the room was when the participant reported their mood.

All five sensors collect data on Android. Pressure also collects data on iOS. Each sensor works only on phones that have the matching hardware, so check the Phones Without the Sensor note before you rely on one.

Data source Measures Unit Android iOS Data source ID
Ambient Temperature Air temperature around the phone °C Yes No 2
Light Light level at the phone’s screen lx Yes No 5
Pressure Air pressure hPa Yes Yes 9
Proximity Distance of an object from the screen cm Yes No 10
Relative Humidity Relative humidity around the phone % Yes No 11

How Data Is Collected

Collection Schedule

On Android, environmental sensors use episodic (burst-based) collection. Once every data collection cycle, the app listens to each sensor for 10 seconds. The cycle is every 5 minutes by default, and you can change it in the Interval Settings.

How many records a burst produces depends on the sensor:

  • Pressure: The phone reports readings continuously, so each burst usually contains many records, several per second.
  • Ambient Temperature, Light, Proximity, and Relative Humidity: The phone reports a reading only when the value changes. A burst in a dark, quiet room can contain one record or none.

On iOS, Pressure records about one reading per second while the app is collecting data. The Interval Settings don’t change this.

Phones Without the Sensor

If the participant’s phone doesn’t have a sensor, the app records a “sensor not supported” event and collects no data for that data source. Light and Proximity sensors are on almost every Android phone. Temperature and humidity sensors are rare, so expect most participants to have no data for Ambient Temperature and Relative Humidity.

Accuracy

Every record contains an Accuracy value, internally stored as accu. It’s the phone’s own rating of the reading:

  • 3: High accuracy.
  • 2: Medium accuracy.
  • 1: Low accuracy.
  • 0: Unreliable.
  • -1: No accuracy reported. All iOS Pressure records have this value, because iOS doesn’t rate pressure readings.

Ambient Temperature

Supported on Android.

Measures the temperature of the air around the phone, in degrees Celsius.

Use Cases

  • Sleep research: Studying how room temperature affects sleep quality and duration
  • Physical health studies: Examining how temperature affects physiological and cardiovascular responses
  • Mood and behavior research: Investigating the relationship between temperature and mental well-being

Data Structure

Besides the common data fields, each record contains:

  • Temperature: Ambient air temperature, in degrees Celsius. Internally stored as temp_c.
  • Accuracy: See Accuracy. Internally stored as accu.

Light

Supported on Android.

Download Sample Data

Measures the light level (illuminance) at the phone’s screen, in lux (lx). The sensor sits on the front of the phone, so the reading is low when the phone is in a pocket, a bag, or face down. As a rough guide, indoor lighting is a few hundred lx, and outdoor daylight is often above 10,000 lx.

On iOS, ambient light is available through SensorKit Ambient Light instead.

Use Cases

  • Sleep research: Analyzing how light exposure relates to sleep-wake cycles
  • Mood and mental health studies: Investigating links between light levels, seasonal affective disorder, and mood
  • Physical activity and lifestyle studies: Using light patterns to estimate indoor and outdoor time and daily routines

Data Structure

Besides the common data fields, each record contains:

  • Illuminance: Light level, in lx. Internally stored as illuminance_lx.
  • Accuracy: See Accuracy. Internally stored as accu.

Pressure

Supported on Android & iOS.

Download Sample Data

Measures the air pressure (barometric pressure) around the phone, in hectopascals (hPa). One hPa equals one millibar (mbar). Pressure falls as altitude rises, by about 12 hPa for every 100 m, so changes over minutes usually come from climbing or descending. Slower changes over hours usually come from the weather.

Use Cases

  • Environmental health studies: Analyzing how changes in barometric pressure relate to headaches, migraines, joint pain, and respiratory illnesses such as chronic obstructive pulmonary disease (COPD)
  • Physical activity research: Detecting changes in altitude, such as climbing stairs or hiking
  • Mood and behavior studies: Investigating how pressure changes tied to the weather relate to mood and well-being

Data Structure

Besides the common data fields, each record contains:

  • Pressure: Air pressure, in hPa. Internally stored as pressure_hpa.
  • Accuracy: See Accuracy. Internally stored as accu.

Proximity

Supported on Android.

Measures the distance, in centimeters, between the phone’s screen and the nearest object. Phones use this sensor to turn off the screen when it’s held against the ear during a call.

[!note] Near and Far Values
The sensor only reaches a few centimeters. On many phones, it reports just two values: its maximum distance (often 5 cm) when nothing is near, and a smaller value, often 0, when something is near.

Use Cases

  • Communication behavior studies: Detecting when the phone is held to the ear, as an indicator of phone calls
  • Phone use and well-being studies: Detecting when the phone is covered, for example in a pocket or face down, to complement screen and app usage data

Data Structure

Besides the common data fields, each record contains:

  • Distance: Distance from the screen to the nearest object, in centimeters. Internally stored as dist_cm.
  • Accuracy: See Accuracy. Internally stored as accu.

Relative Humidity

Supported on Android.

Measures the relative humidity of the air around the phone, as a percentage from 0 to 100.

Use Cases

  • Respiratory health studies: Analyzing how humidity levels relate to respiratory conditions such as asthma, bronchitis, and COPD
  • Skin health and dermatology research: Investigating the relationship between humidity and skin conditions such as eczema, psoriasis, and dry skin
  • Environmental and sleep research: Examining how humidity relates to sleep quality

Data Structure

Besides the common data fields, each record contains:

  • Humidity: Relative humidity, in percent. Internally stored as humidity_percent.
  • Accuracy: See Accuracy. Internally stored as accu.

Additional Information for Environmental Sensors

The following information applies to all the environmental sensor data sources listed above.

Adding Data Sources

See Adding Data Sources.

Monitoring and Exporting Data

Export environmental sensor data from the Data Export page. To check how much data each participant is sending, download the record counts.

Environmental Sensors in the Participant App

On Android, participants don’t need to grant any permission. Data collection starts as soon as they join the study.

On iOS 17.5 and later, Pressure requires the Motion & Fitness permission to collect data. If the participant hasn’t granted this permission, the study homepage indicates that setup is incomplete, as explained in Permissions and Setup Flow.