Skip to main content

Data Overview

Prefixes

PrefixDescription
api_Backend settings
app_App related information
id_ID fields such as id_participant, id_password, id_onesignal
pss_Phone survey settings
q_Watch survey question responses
si_System information
ts_Time series
ws_Watch survey
wss_watch survey settings

Settings and index

Field nameTypeLogging rateSampling intervalDescriptionField name in Cozie v2
id_experimentStringLogged with any other data point-Unique identifier for each experimentid_experiment
id_onesignalStringLogged with any other data point-Unique OneSignal player id provided by OneSignalid_one_signal
id_participantStringLogged with any other data point-Unique identifier for each participantid_participant
id_passwordStringLogged with any other data point-'Backend tab': Password for participant. It should be unique for each participant. It prevents data corruption by participants changing their id_participant or id_experimentnot available
location_changeBoolean***-Indicates location change of more than 50mnot available
pss_reminder_daysStringLogged when any sync button in the Cozie iPhone app-Days on which the phone survey reminder is shown.not available
pss_reminder_enabledBooleanLogged when any sync button in the Cozie iPhone app-Indicates whether the a phone survey reminder is enabled. (enabled: True)not available
pss_reminder_timeStringLogged when any sync button in the Cozie iPhone app-Time at which the phone survey reminder is shown.not available
timestamp_lambdaStringLogged with any other data point-Timestamp (UTC) of when the AWS Lambda function was invoked to insert the row into the databasetimestamp_lambda
transmit_triggerStringLogged with any other data point-Action that triggered the logging of the data corresponding to the same rownot available
time/indexStringLogged with any other data point-Timestamp (UTC) of when watch survey was submitted, also serves as indextimestamp_end

HealthKit data logged on the iPhone

Field nameTypeLogging rateSampling intervalDescriptionField name in Cozie v2
ts_HRVInteger*15minHeart Rate Variability in ms, provided by Apple HealthKitnot available
ts_altitudeInteger***-Altitude in mnot available
ts_audio_exposure_
environment
Integer*30minNoise level in dB(A), provided by Apple HealthKitts_hearingEnvironmental
Exposure, sound_pressure
ts_audio_exposure_
headphones
Float?*30s?Audio exposure in dB(A) from headphones, provided by Apple HealthKitnot available
ts_heart_rateInteger?*3-6min (sometimes less)Heart rate in bpm, provided by Apple HealthKitts_heartRate, heart_rate
ts_altitudeFloat***-Latitude in °not available
ts_location_
accuracy_horizontal
Float?***-Horizontal positioning accuracy in m (see ts_latitude, ts_longitude)not available
ts_location_
accuracy_vertical
Float?***-Vertical positioning accuracy in m (see ts_altitude)not available
ts_location_
acquisition_method
String?***-not available
ts_location_floorFloat?***-not available
ts_location_
source_device
String?***-not available
ts_longitudeFloat***-Longitude in °not available
ts_oxygen_saturationInteger**1hBlood oxygen saturation in % provided by Apple HealthKitts_oxygenSaturation
ts_resting_heart_rateInteger*1dResting heart rate in bpm, provided by Apple HealthKitts_restingHeartRate
ts_sleep_REMFloat?*-Duration of REM sleep in min, provided by Apple HealthKitnot available
ts_sleep_awakeFloat?*-Duration of the participant being awake in min, provided by Apple HealthKitnot available
ts_sleep_coreFloat?*-Duration of light or intermediate sleep in min, provided by Apple HealthKitnot available
ts_sleep_deepFloat?*-Duration of deep sleep in min, provided by Apple HealthKitnot available
ts_sleep_in_bedFloat?*-Duration of the participant being in bed in min, provided by Apple HealthKitnot available
ts_stand_timeInteger*-Stand time in min?, provided by Apple HealthKitts_standTime
ts_step_countInteger*?Number of steps walked, provided by Apple HealthKit. The timestamp time marks the first step in the sample.ts_stepCount
ts_timestamp_locationString*?Timestamp (UTC) of when the GPS was retrievedtimestamp_location
ts_walking_distanceFloat*?Distance walked in m, provided by Apple HealthKit, The timestamp time marks the first meter in the sample.ts_walkingDistance
ts_wrist_temperatureInteger*1dWrist temperature during sleep, provided by Apple HealthKitnot available

Watch survey data

Field nameTypeLogging rateSampling intervalDescriptionField name in Cozie v2
q_...StringLogged when the submit button at the end of the watch survey is pressed.-For field names of watch survey responses, see on the page for each watch survey example
ws_HRVFloat?**15minHeart Rate Variability in ms, provided by Apple HealthKitnot available
ws_altitudeInteger**-Altitude in mnot available
ws_audio_exposure_
environment
Float?**15minNoise level in dB(A), provided by Apple HealthKitnot available
ws_audio_exposure_
headphones
Float?**30s?Audio exposure in dB(A) from headphones, provided by Apple HealthKitnot available
ws_heart_rateFloat?**3-6min (sometimes less)Heart rate in bpm, provided by Apple HealthKit, submitted when iPhone Cozie app is opened.not available
ws_latitudeFloat**-Latitude in ° provided by GPSlatitude
ws_location_
accuracy_horizontal
Float?**-Horizontal positioning accuracy in m (see ws_latitude, ws_longitude)not available
ws_location_
accuracy_vertical
Float?**-Vertical positioning accuracy in m (see ws_altitude)not available
ws_location_
acquisition_method
String?**-not available
ws_location_floorInteger?**-not available
ws_location_
source_device
String**-not available
ws_longitudeFloat**-Longitude in ° provided by GPSlongitude

HealthKit data logged on the Apple Watch

Field nameTypeLogging rateSampling intervalDescriptionField name in Cozie v2
ws_oxygen_saturationInteger**1hBlood oxygen saturation in % provided by Apple HealthKitnot available
ws_resting_heart_rateFloat?**1dResting heart rate in bpm, provided by Apple HealthKitnot available
ws_sleep_REMFloat?**-Duration of REM sleep in min, provided by Apple HealthKitnot available
ws_sleep_awakeFloat?**-Duration of the participant being awake in min, provided by Apple HealthKitnot available
ws_sleep_coreFloat?**-Duration of light or intermediate sleep in min, provided by Apple HealthKitnot available
ws_sleep_deepFloat?**-Duration of deep sleep in min, provided by Apple HealthKitnot available
ws_sleep_in_bedFloat?**-Duration of the participant being in bed in min, provided by Apple HealthKitnot available
ws_stand_timeFloat?**?Stand time in min?, provided by Apple HealthKitnot available
ws_step_countInteger?**?Number of steps walked, provided by Apple HealthKit. The timestamp time marks the first step in the sample.not available
ws_survey_countInteger**-Increasing key for each micro-survey response. Resets when Cozie app is (re-)installed.vote_count
ws_timestamp_locationString**-Timestamp of the location measurement in UTC, Format: "%Y-%m-%dT%H:%M:%S.%fZ"timestamp_location
ws_timestamp_startString**-Timestamp (UTC) of when micro survey was startedtimestamp_start
ws_walking_distanceFloat**-Distance walked in m, provided by Apple HealthKit. The timestamp time marks the first meter in the sample.not available
ws_wrist_temperatureFloat**1dWrist temperature during sleep, provided by Apple HealthKitnot available
wss_goalInteger?Logged when any sync button in the Cozie iPhone app-Watch survey response goal in the 'Settings' tabnot available
wss_participation_daysStringLogged when any sync button in the Cozie iPhone app-Participation days set in the Cozie app by the participantsettings_participation_days
wss_participation_
time_end
StringLogged when any sync button in the Cozie iPhone app-Daily reminder end time set in the Cozie app by the participantsettings_participation_
time_end
wss_participation_
time_start
StringLogged when any sync button in the Cozie iPhone app-Daily reminder start time set in the Cozie app by the participantsettings_participation_
time_start
wss_reminder_enabledBoolean?Logged when any sync button in the Cozie iPhone app-Enable setting for the watch survey reminder in the 'Settings' tabnot available
wss_reminder_intervalStringLogged when any sync button in the Cozie iPhone app-Reminder frequency set in the Cozie app by the participantsettings_notification_frequency
wss_time_outIntegerNot yet implemented-Minimal allowed duration between two watch survey responsesnot available
wss_titleStringLogged when any sync button in the Cozie iPhone app-Title of watch survey selected in the 'Settings' tabnot available

Settings and metadata

Field nameTypeLogging rateSampling intervalDescriptionField name in Cozie v2
api_phone_survey_urlStringLogged when any sync button in the Cozie iPhone app-'Backend tab': URL pointing to the phone survey, e.g., Qualtrics, Google Form or similarnot available
api_read_keyStringLogged when any sync button in the Cozie iPhone app-'Backend tab': Access key for the api_read_urlnot available
api_read_urlStringLogged when any sync button in the Cozie iPhone app-'Backend tab': URL pointing to the database read APInot available
api_watch_survey_urlStringLogged when any sync button in the Cozie iPhone app-'Backend tab': URL pointing to the JSON file with a custom watch surveynot available
api_write_keyStringLogged when any sync button in the Cozie iPhone app-'Backend tab': Access key for the api_write_urlnot available
api_write_urlStringLogged when any sync button in the Cozie iPhone app-'Backend tab': URL pointing to the database write APInot available
app_bundle_build_
number
StringLogged when any sync button in the Cozie iPhone app-Build number of iOS applicationnot available
app_bundle_build_
version
StringLogged when any sync button in the Cozie iPhone app-Build version of iOS applicationnot available
app_bundle_nameStringLogged when any sync button in the Cozie iPhone app-iOS application namenot available
app_one_signal_app_idStringLogged when any sync button in the Cozie iPhone app-OneSignal app ID (provided by OneSignal)not available
si_ios_versionStringLogged when any sync button in the Cozie iPhone app-iOS versionnot available
si_iphone_battery_
charge_state
FloatNot yet implemented-iPhone battery charge statenot available
si_iphone_cellular_
signal_strength
FloatNot yet implemented-Cellular signal strength on the iPhonenot available
si_iphone_device_idStringNot yet implemented-Unique iPhone hardware identifiernot available
si_iphone_location_
service_enabled
BooleanNot yet implemented-iPhone location services statenot available
si_iphone_low_battery_
mode_enabled
BooleanNot yet implemented-iPhone low power battery mode statenot available
si_iphone_modelStringNot yet implemented-iPhone hardware model identifiernot available
si_iphone_wifi_
signal_strength
FloatNot yet implemented-Wifi signal strength on the iPhonenot available
si_watch_battery_
charge_state
FloatNot yet implemented-Apple watch battery charge statenot available
si_watch_cellular_
signal_strength
FloatNot yet implemented-Cellular signal strength on the Apple Watchnot available
si_watch_connected_
to_phone
BooleanNot yet implemented-State of connection between iPhone and Apple Watchnot available
si_watch_device_idStringNot yet implemented-Unique identifier for Apple Watch hardwarenot available
si_watch_location_
service_enabled
BooleanNot yet implemented-Apple Watch location services statenot available
si_watch_modelStringNot yet implemented-Apple Watch hardware model identifiernot available
si_watch_wifi_
signal_strength
FloatNot yet implemented-Wifi signal strength on the Apple Watchnot available
si_watchos_versionStringNot yet implemented-WatchOS versionnot available

Difference between ts_ and ws_

The logging of time series data with the ts_ prefix is triggered by several actions:

  • Opening of the Cozie iPhone app
  • Pressing any sync button in the Cozie iPhone app
  • Background task

Logging time series data with the ws_ prefix is triggered by the submit button at the end of the watch survey.

By the end of the experiment, the ts_ data and ws_ data should be nearly identical, e.g., the values for given timestamps for ts_heart_rate and ws_heart_rate should be the same. The difference is the device that submits the data and the time the data is submitted. Because it is very difficult to sync the Cozie app on the Apple Watch with its counterpart on the Apple Watch in the background, we decided to log the data twice and then merge the two columns while processing the data. This approach maximizes the data upload frequency, maintainability, and ability to debug the app.

It is very likely that the ts_ data and ws_ data will not be identical. Here are some reasons why:

  • More ts_ data was collected after the last watch survey was submitted.

  • ts_ data wasn't updated after the last watch survey was sent.

  • Some data might have been lost somewhere between the app and the database.

    You can merge two corresponding ts_ data and ws_ data columns, as shown in the following code snippet:

    df["ts_heart_rate_combined"] = df.groupby("id_participant")["ts_heart_rate"].fillna(df["ws_heart_rate"])

Location data

Location data, e.g., ts_latitude, ts_longitude, with the ts_ prefix is only sent every time the participant changes their location more than 50 meters, i.e., when and while the participant changes the location. Location data with the ws_ prefix is sent when the submit button at the end of the watch survey is pressed, exactly the same as all other data with the ws_ prefix (see **).

Unlike the HealthKit data, e.g., ts_heart_rate/ws_heart_rate, the ws_ and ts_ location data are not to be expected to be the same. Nevertheless, you might consider combining the corresponding columns, depending on your application.

Lambda timestamp and trigger

For some of the field names there are two more accompanying fields for the timestamp of when the data was inserted into the database and what trigger the logging action. The field lambda_timestamp serves the same purpose. However this field value might over written in instances where values with identical id_participant, id_experiment, and timestamp are logged. The table below shows an example for ts_HRV. The columns ts_HRV_lambda and ts_HRV_trigger are used for debugging and development purposes. Unless you are investigating data anomalies or are working on app development, you can ignore these fields.

Field nameTypeSampling rateDescription/QuestionField name in Cozie v2
ts_HRVInteger*15minnot available
ts_HRV_lambdaString*Timestamp of when the value of ts_HRV was logged in UTC, Format: "%Y-%m-%dT%H:%M:%S.%fZ"not available
ts_HRV_triggerString*String of what triggered the logging action of ts_HRVnot available

These metadata columns shown in the example above are available for the following field names:

  • ts_HRV
  • ts_audio_exposure_environment
  • ts_audio_exposure_headphones
  • ts_heart_rate
  • ts_latitude
  • ts_oxygen_saturation
  • ts_resting_heart_rate
  • ts_sleep_REM
  • ts_sleep_awake
  • ts_sleep_core
  • ts_sleep_deep
  • ts_sleep_in_bed
  • ts_stand_time
  • ts_step_count
  • ts_walking_distance
  • ws_HRV
  • ws_audio_exposure_environment
  • ws_audio_exposure_headphones
  • ws_heart_rate
  • ws_latitude
  • ws_oxygen_saturation
  • ws_resting_heart_rate
  • ws_sleep_REM
  • ws_sleep_awake
  • ws_sleep_core
  • ws_sleep_deep
  • ws_sleep_in_bed
  • ws_stand_time
  • ws_step_count
  • ws_walking_distance
  • ws_survey_count
  • Difference between logging interval and sampling interval

    The logging interval describes at what points in time the data is sent to the database. The sampling interval describes the time between two samples of the same data. For some data, these two are the same, e.g., for ws_survey_count, one data point is sent to the database when the submit button in the watch survey is pressed. For ws_heart_rate, the Apple Watch records one data point every 3-6 minutes. This is the sampling interval. However, the data points are not sent to the database at the same time. The ws_heart_rate data points are only sent to the database when the submit button in the watch survey is pressed. When the submit button is pressed, all ws_heart_rate data points since the last time the submit button was pressed are sent to the database. Hence, the log interval can be much longer than the sampling interval.