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
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 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
.
Fitbit Weight Log
This metric 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. Internally recorded as
fat
. If it is not available, this field will not be present. - Source: The source of the weight data.
API
means 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
means the data originated from an Aria or Aria 2 scale.AriaAir
means the data originated from an Aria Air scale.Withings
means the data originated from a Withings scale. Internally recorded assource
.
Data Collection Behavior
Whenever there is new Fitbit data, the Fitbit's server will send the new data to Avicenna.
Adding Fitbit As a Data Source
Monitoring 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 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:
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(s), there is a Grant Access
button:
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:
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.
The participants can stop sharing the data anytime by clicking on
Revoke Access
on the Data Sources page.