Fitbit

Integrating Fitbit’s health metrics with Avicenna’s research tools can provide a comprehensive view of individual well-being, allowing for more accurate health analyses and personalized care plans. This section explains how Fitbit integrates with Avicenna, making it easier for researchers to understand and use participants’ health data..

Supported Fitbit Metrics in Avicenna

This section lists the range of Fitbit metrics that Avicenna supports.

Fitbit Activity Summary

Provides a summary of a user’s daily activities. It is stored internally as fitbit_daily_activity, and includes the following fields:

  • Record Time: Start time of the day the summary pertains to. Internally recorded as record_time.
  • Activity Calories: Calories burned during active periods throughout the day. Internally recorded as activity_calories.
  • Calories: Total calories burned, including BMR, tracked activity, and manual logs. Internally recorded as calories.
  • BMR Calories: Number of BMR calories. Internally recorded as calories_bmr.
  • Distance: Estimated daily distance traveled, in meters. Internally recorded as distance.
  • Elevation: Change in altitude throughout the day, in meters. Internally recorded as elevation.
  • Floors: Approximate number of floors climbed. Internally recorded as floors.
  • Sedentary Duration: Total minutes spent sedentary during the day. Internally stored as minutes_sedentary.
  • Lightly Active Duration: Total minutes spent lightly active during the day. Internally stored as minutes_lightly_active.
  • Fairly Active Duration: Total minutes spent fairly active during the day. Internally stored as minutes_fairly_active.
  • Very Active Duration: Total minutes spent very active during the day. Internally stored as minutes_very_active.
  • Steps: Number of steps taken. Internally recorded as steps.

Fitbit Activity Intraday

Download Sample Data

Offers a snapshot of the user’s activity in 1-minute intervals. This is internally stored in the fitbit_activity table. The available fields for this metric are:

  • Record Time: Start time of the interval for which the data is recorded. Internally stored as record_time.
  • Calories: Total calories burned during the time interval, including BMR, tracked activities, and manually logged exercises. Internally stored as calories.
  • Distance: Estimated distance traversed by the participant during the time interval, in meters. Internally stored as distance.
  • Elevation: Estimated change in vertical height during the time interval, in meters. Internally stored as elevation.
  • Floors: Approximate number of floors ascended during the time interval. Internally stored as floors.
  • Sedentary Duration: Total minutes spent sedentary during the interval during the time interval. Internally stored as minutes_sedentary.
  • Lightly Active Duration: Total minutes spent lightly active during the time interval. Internally stored as minutes_lightly_active.
  • Fairly Active Duration: Total minutes spent fairly active during the time interval. Internally stored as minutes_fairly_active.
  • Very Active Duration: Total minutes spent very active during the time interval. Internally stored as minutes_very_active.
  • Steps: Total number of steps taken by the participant during the time interval. Internally stored as steps.

Fitbit Sleep

Download Sample Data

Contains details about a participant’s sleep patterns. It is internally recorded in the fitbit_sleep database table, and includes these fields:

  • Start Time: Start time of the sleep log. Internally recorded as start_time.
  • End Time: End time of the sleep log. Internally recorded as end_time.
  • Log Type: Type of sleep log based on the detection method, either auto-detected or manually logged. Internally recorded as log_type. The following values are included:
    • auto_detected: Automatically detected by the sleep detection service.
    • manual: Logged or edited manually by the participant.
  • Duration: Total length of the sleep log, in seconds. Internally recorded as duration_sec.
  • Efficiency: The sleep efficiency score (out of 100). Internally recorded as sleep_efficiency.
  • Main Sleep: A boolean value indicating if the log pertains to the main sleep session of the day. Internally recorded as is_main_sleep.
  • After Wake Duration: Total minutes remained awake after initially waking up. Internally recorded as minutes_after_wakeup.
  • Asleep Duration: Total minutes spent asleep. Internally recorded as minutes_asleep.
  • Awake Duration: Total minutes spent awake during the sleep session. Internally recorded as minutes_awake.
  • To Fall Sleep Duration: Total minutes taken to fall asleep (usually 0 for auto-detected logs). Internally recorded as minutes_to_fall_sleep.
  • In-Bed Duration: Total minutes spent in bed. Internally recorded as minutes_in_bed.

Fitbit Heart Rate

Download Sample Data

Includes the heart-rate-related data. It is recorded internally as fitbit_heart_rate, and includes these fields:

  • Record Time: When the heart rate value was recorded. Internally recorded as record_time.
  • Heart Rate: Heart rate value during the day, in BPM. Internally recorded as heart_rate.

Fitbit Weight Log

Contains the user’s weight logs. It is stored internally as fitbit_weight_log, and includes these fields:

  • Weight: The weight value, in kilograms. Internally recorded as weight.
  • BMI: The Body Mass Index value. Internally recorded as bmi.
  • Fat: The fat percentage. If it is not available, this field will not be present. Internally recorded as fat.
  • Source: The source of the weight data. Possible values:
    • API: data originated from a 3rd party integration using the Web API, the data was manually entered into the Fitbit mobile or web application, or the data recorded by a predefined scale was manually edited.
    • Aria: The data originated from an Aria or Aria 2 scale.
    • AriaAir: The data originated from an Aria Air scale.
    • Withings: The data originated from a Withings scale. Internally recorded as source.

Data Collection Behavior

Whenever new Fitbit data is available, Fitbit’s servers send it to Avicenna.

Adding Fitbit As a Data Source

See Accessing Data Sources.

Monitoring and Exporting Fitbit Data

There are two ways to monitor and export Fitbit data: using the Data Export page and using Kibana.

Fitbit Data Source in Participant App

After joining a study, participants must grant Avicenna access to their Fitbit data:

  1. Go to to the study homepage.

  2. Click the Data Sources button at the bottom of the page to view the study’s data sources.

  3. Click Grant Access next to the Fitbit data source.

  4. Sign in on the Fitbit official website and choose which data to share.

[!note]
Checking the Allow All check box and then pressing the Allow button will allow Avicenna to collect all Fitbit data types added to the study.

[!note]
Please make sure to grant access to your Fitbit Profile. This allows the system to capture your timezone, ensuring accurate readings since Fitbit data is recorded in UTC.

Participants are redirected to the study’s Data Sources page in the Avicenna app after successfully granting access. They can stop sharing the data anytime by clicking on Revoke Access on the Data Sources page.