Skip to main content

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 the health-related data of their participants.

Supported Fitbit Metrics in Avicenna

In this section, we list the comprehensive 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, measured in meters. Internally recorded as distance.
  • Elevation: Change in altitude throughout the day, measured in meters. Internally recorded as elevation.
  • Floors: Approximate number of floors climbed. Internally recorded as floors.
  • Sedentary Duration: The cumulative duration of the participant being sedentary over the day, measured in minutes. Internally stored as minutes_sedentary.
  • Lightly Active Duration: The cumulative duration of the participant being lightly active over the day, measured in minutes. Internally stored as minutes_lightly_active.
  • Fairly Active Duration: The cumulative duration of the participant being fairly active over the day, measured in minutes. Internally stored as minutes_fairly_active.
  • Very Active Duration: The cumulative duration of the participant being very active over the day, measured in minutes. Internally stored as minutes_very_active.
  • Steps: Number of steps taken. Internally recorded as steps.

Fitbit Activity Intraday

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: Starting time of the interval for which the data is recorded. Internally stored as record_time.
  • Calories: Total calories burned, including BMR, tracked activities, and manually logged exercises during the time interval. Internally stored as calories.
  • Distance: Estimated distance in meters traversed by the participant within the time interval. Internally stored as distance.
  • Elevation: Estimated change in vertical height in meters during the time interval. Internally stored as elevation.
  • Floors: Approximate number of floors ascended by the participant throughout the time interval. Internally stored as floors.
  • Sedentary Duration: Total time in minutes the participant was sedentary during the time interval. Internally stored as minutes_sedentary.
  • Lightly Active Duration: Cumulative time in minutes the participant was lightly active throughout the time interval. Internally stored as minutes_lightly_active.
  • Fairly Active Duration: Cumulative time in minutes the participant was moderately active throughout the time interval. Internally stored as minutes_fairly_active.
  • Very Active Duration: Cumulative time in minutes that the participant was intensely active throughout 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

It contains details about the user's sleep patterns. It is internally recorded in the fitbit_sleep databse table, and including 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 user.
  • Duration: Total length of the sleep log, measured in seconds. Internally recorded as duration_sec.
  • Efficiency: The sleep efficiency score, is calculated 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 number of minutes the user remained awake after initially waking up. Internally recorded as minutes_after_wakeup.
  • Asleep Duration: Total number of minutes the user was asleep. Internally recorded as minutes_asleep.
  • Awake Duration: Total number of minutes the user was awake during the sleep session. Internally recorded as minutes_awake.
  • To Fall Sleep Duration: Time in minutes it took for the user to fall asleep. This is generally 0 for auto-detected sleep logs. Internally recorded as minutes_to_fall_sleep.
  • In-Bed Duration: Total time in minutes the user spent in bed. Internally recorded as minutes_in_bed.

Fitbit Heart Rate

This metric 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.

Adding Fitbit As a Data Source

To add Fitbit as a data source in your study, first, navigate to the Data Sources page on your researcher dashboard. Here, under the Fitbit section, you'll find options like Fitbit Activity Summary, Fitbit Activity Intraday, Fitbit Sleep, and Fitbit Heart Rate. Select the desired metrics and proceed to provide a name and description for this data source. You'll also have the option to determine whether this data source is mandatory for participants. Once these details are filled out, simply click on Add to finalize adding your chosen Fitbit metrics to your study.

Monitoring Fitbit Data

There are two ways to monitor and export Fitbit data:

Using the Data Export page

After going to the Data Export page on the Researcher Dashboard, select one of the Fitbit metrics for the Data Source field. Also, you can select the participants and period for the to-be-exported data. Then clicking on Export will result in a new export request. The exported file will be in CSV format including the details of the metric which is explained above.

info

You can also do this by going to the Data Sources page, clicking on the three-dot button, and then selecting Go to Data Export. This will take you to the Data Export page. As a result, you do not need to select the data source anymore and it's already selected for you.

Using Kibana integration

You can also monitor and analyze the Fitbit metrics' data using Kibana integration. Choose a specific Fitbit-related index and then you can see the data according to the selected period. You can also add the desired fields to be shown in the table. Then by clicking on the Save button on the top right corner, you can export your data.

Using Kibana to monitor the Fitbit data

note

At first, the period for your data to be shown in Kibana is 15 minutes and you may not see any data. You have to change the period to see data for a wider range.

Fitbit Data Source in Participant App

After a participant joins a study, they need to grant access to Avicenna to collect data. To do that, the participant needs to go to Settings on the Avicenna app and click on My Studies. Then they should choose the study that is collecting Fitbit data. On the study's page, clicking on the Data Sources will take them to the data sources page:

Study's Data Sources page in the Avicenna app

On this page, the participant will see all of the data sources that the study uses to collect data. Among these data sources, on the corner of the Fitbit data source, there is a Grant Access button:

Granting access to Fitbit on the Data Sources page

By clicking on the Grant Access button, the participant will be directed to the sign-in page of the Fitbit official website. Then, they can decide what information is going to be shared with Avicenna:

Selecting which Fitbit metrics to grant access to
note

Checking the Allow All check box and then pressing the Allow button, will allow Avicenna to collect all kinds of data from Fitbit, in case the researcher added another metric to the study.

After clicking on Allow, the participant will be redirected to the Data Sources page of the study in the Avicenna app, and they have successfully granted access to Avicenna to gather Fitbit data.

Simply the participants can stop sharing the data anytime by clicking on Revoke Access on the Data Sources page.

Revoking access in the Avicenna app