Database Development and Exploration: Capturing Activity Tracking Device Data During Pregnancy
INTRODUCTION
The use of innovative technologies, especially wearable devices (e.g., smart watches, bracelets, armbands, apps for mobile health), has the potential to revolutionize antenatal care with the goal of enhancing maternal and newborn health. In a recent scoping review of studies in which authors used wearable devices during pregnancy (1), 21 papers published between 2000 and 2022 were identified in which authors focused on maternal outcomes. Of these, authors of 15 studies examined objective physical activity (PA) and/or step count, with authors of 9 using commercial-grade devices (4 of which used Fitbits). Among these 9 studies, authors mostly focused on feasibility or validity (2–6), 2 were case studies (7,8), 1 was a randomized controlled trial targeting women with gestational diabetes (9), and 1 was a protocol paper (10). Excluding the protocol paper, sample sizes ranged from 1 (7) to 60 (9), and race or ethnicity data were often not reported (2–4,9). Our study is the largest and most racial or ethnically diverse study in which objective prenatal PA is longitudinally measured using a commercial-grade device.
Previously studied devices, such as research-grade accelerometers like ActiGraph, have been reported to lack aesthetic appeal, and their limited ability to provide real-time feedback to users has negatively impacted study adherence (11,12). Activity tracking devices (ATDs), such as those made by Fitbit (San Francisco, California), are more accurate in quantifying PA compared with self-reported measures in pregnant populations (5,13,14). The research in this area is rapidly evolving, necessitating continuous updates on the latest devices, emerging challenges, and future directions. A gap exists in research on specific pregnancy outcomes, with insufficient evidence to design effective interventions (1). High-quality research is essential to determine which wearable devices can most effectively support antenatal care.
Fitbits are increasingly popular in PA and health promotion research (15). They require a Bluetooth-enabled device (e.g., smart phone, tablet) to synchronize data with the Fitbit application. Researchers can use third-party commercial (e.g., Fitabase) or research platforms (e.g., iCardia, Mytapp) to remotely capture data from participants’ accounts using Fitbit’s application programming interface (API). To enhance flexibility, we developed the Henry Ford Health Fitbit Tool (HFH-FiT), a customizable in-house platform that adapts to existing protocols, provides tailored data outputs or analytics, and allows for modifications to meet evolving study needs. This platform enables granular control over data collection frequency and metrics, ensuring multiple opportunities for participants to sync their data and improving data capture. Overall, compared with a third-party platform, HFH-FiT, offers greater control and independence, flexibility (e.g., no need for third-party approvals, simplicity in scaling up the study), and cost savings in the long term (e.g., avoid subscription fees), while ensuring data privacy (e.g., data ownership, compliance) and meeting study requirements.
In this paper, we describe REACH-Fitbit, a subcohort of the longitudinal birth cohort study Research Enterprise to Advance Children’s Health (REACH). REACH aims at recruiting 3,000 racially and ethnically diverse mother-child pairs from metropolitan Detroit to investigate a range of exposures and health outcomes (including birth outcomes and childhood allergy and asthma). REACH-Fitbit provides a Fitbit Charge 4, 5, or 6 to subjects early in pregnancy, with a goal to recruit 500 participants. In REACH-Fitbit, the effect of PA during pregnancy on obstetrics outcomes, perinatal mental health, and the maternal gut microbiome is examined. In this paper, we highlight the development and interim results of the HFH-FiT used to capture Fitbit data.
METHODS
REACH-Fitbit participants receive a Fitbit (color of their choosing) during their midpregnancy research visit (i.e., 14–30 weeks gestation) and continue participation in the broader REACH study (i.e., both prenatally and postnatally, REACH participants provide numerous biological samples and respond to surveys covering various topics). Fitbit data collection continues until delivery, after which participants are allowed to keep their Fitbit. Microsoft Structured Query Language (SQL) Server was used to develop an internal database where Python scripts initiate data collection. A Python application displays data related to Fitbit variables (e.g., PA time, heart rate [HR]) and allows the creation of customized tables and graphs to be generated for in-depth analysis of participant data as well as immediate identification of nonadherence (e.g., no data being captured would constitute a phone call with the participant to provide support as needed). Compliance is encouraged through engagement materials such as weekly text messages, newsletters, and personalized phone calls.
Compliance to the REACH-Fitbit study protocol is assessed using intraday HR, which is measured every 15 min. Intraday HR was selected as the compliance measure after an initial preliminary analysis completed on a subset of participants revealed that certain pregnancy-related events (e.g., prescribed bed rest or back pain) could reduce PA levels. Data from these participants are still considered valid, as they may have health implications, but using step count alone (16,17) as a compliance metric could have excluded participants who were wearing and syncing the Fitbit but engaging in limited PA. Consequently, to minimize these issues, HR was chosen for compliance, with compliance defined as HR data for ≥10 h·d−1 (18,19). An overall compliance percentage is calculated as the ratio of compliant days to total days enrolled in the study. Recruitment for REACH-Fitbit began February 2022 and is ongoing. This manuscript is based on data from subcohort inception through September 1, 2023.
The study was conducted in accordance with the Declaration of Helsinki, and the protocol was approved by the Ethics Committee of Henry Ford Health (13198-01; August 28, 2019). All subjects gave their informed consent for inclusion before they participated in the study.
Software Architecture
During a midpregnancy research visit, REACH-Fitbit participants are issued a Fitbit, create a Fitbit account, and authorize HFH-FiT to collect data via the Fitbit API. Study team members answer any questions and provide a Welcome to REACH-Fitbit packet that outlines study aims, tracked data, key Fitbit features, instructions for wearing the device on the nondominant wrist, syncing instructions, and troubleshooting resources.
REACH-Fitbit Authorization
After receiving their Fitbit and creating a Fitbit account, participants download the Fitbit mobile application to their smartphone. Participants then grant HFH-FiT access to their personal data via the Authorization Portal (Figure 1). The Authorization Portal lists the many categories of data that are collected by the Fitbit and could be captured through the Fitbit API. As a data privacy measure, study staff explain that authorization is requested only for the activities, sleep, and HR scopes (Fitbit’s name for these categories).


Citation: Journal of Clinical Exercise Physiology 14, 3; 10.31189/2165-7629-14.3.94
Data Collection
The software that enables the HFH-FiT is a complete and open-source Python library that implements the Fitbit API (20). A script was developed to pull the variables of interest, such as sleep data, by calling the sleep function with a user ID and date. Other scripts run daily to download data for active participants.
Study personnel monitor the daily data download via the Data Portal (Figure 2), which is used to track participant compliance. The data download process has a 1-day lag, meaning that data collection starts the day after participants receive their Fitbit and continues until the day after they give birth. Each week, study personnel provide REACH-Fitbit participants their compliance rating via phone or text. These tailored communications encourage participants to sync their Fitbits regularly, ideally once a week, to ensure the most complete dataset.


Citation: Journal of Clinical Exercise Physiology 14, 3; 10.31189/2165-7629-14.3.94
Upon study completion (i.e., after the participant delivers her baby), the dataset is downloaded 1 final time, generating a Finals dataset that includes all available data from the study period. This dataset is used for downstream statistical analyses. Periodically, a script is executed to identify empty activity or sleep records in the daily feed, querying the Fitbit server to check if missing data has been added. If new data are found, the daily download record is updated in the database.
The Data Portal displays datasets in a table format that allows for plotting and data manipulation via the Pandastable (21) open-source library. This library allows study personnel to query large datasets with multiple criteria, for plotting of results, and for exporting to statistical software programs.
RESULTS
Maternal demographic characteristics were obtained from the Electronic Medical Record. On average, participants were 28.5 (±5.8) years old with a prepregnancy body mass index of 30.1 ± 9.3 kg·m−2. Most were Black (63.5%), non-Hispanic or Latino (91.2%), single (64.2%), and had ≥4 pregnancies (38.6%). PA data ranging from 12 to 41 weeks gestation are shown in Table 1. On average, 69 ± 50 days were compliant with mean steps per day of 5,500 ± 2,452. Participants averaged 879 ± 171 sedentary min·d−1, 230 ± 78 light active min·d−1, and 405 ± 135 sleep min·d−1. HR data ranged from 44 to 207 b·min−1 (22). The most common categories of PAs were walking, running, swimming, and interval workouts. The average of the percentage of weeks that each participant met the American College of Obstetricians and Gynecologists (ACOG) recommended guidelines for pregnant women to complete at least 150 min of moderate-intensity PA per week (23) was 10.2% (±18.2%); 56.9% of participants had 0 weeks that met the recommended PA or exercise guidelines.
DISCUSSION AND CONCLUSION
Authors of studies that have reported on ATD use in pregnancy are limited, fewer specifically using Fitbit (1). REACH-Fitbit is one of the first studies in which prenatal PA was longitudinally followed using a Fitbit, in a racially or ethnically diverse pregnant population, providing an opportunity to generate a more accurate depiction of daily activity during pregnancy. Having a customizable database and using the newest Fitbit technology has allowed for better definitions of participant compliance and has expanded the repository of available variables. The adaptability of the HFH-FiT improves upon past research on prenatal PA, allowing for real-time and objective data.
Our findings have similarities and differences compared with prior reports. We observed a comparable level of inactivity with other antenatal cohorts using Fitbit data (5,12, 16). Based on published indices (24) and ACOG guidelines for PA during pregnancy (23), our cohort is low activity (5000–7499 steps·d−1), and they do not meet PA recommendations (≥150 min of moderate-intensity PA per week). In contrast, mean ± SD participant compliance rate (49.4 ± 35.4%) appears to be lower than in previous studies in which Fitbits were used in a pregnant cohort (i.e., 55.6%–80%) (5,16,17). However, authors of previous studies in which Fitbit use during pregnancy was explored have used Fitbit models that did not have the capability to capture HR data and for a shorter amount of time, which could also influence compliance. Previous compliance definitions used step count (16,17), self-reported wear time (4/7 d for 10 h·d−1 of wear time a week) (5,12), or days with more than 0 min of registered activity (25). In REACH-Fitbit, as Fitbit’s newest Charge model technology was used, pivoting from step count (which may inappropriately conflate sedentary with noncompliant, particularly in a pregnant population) to intraday HR data should allow for a more accurate measure of compliance.
The goal of REACH-Fitbit is to better understand the relationship between PA and pregnancy and obstetric outcomes. In addition to providing initial illustrative objective PA data, in this paper, we aim at serving as a starting place for developing software to work with ATDs, suggesting additional ways to capture compliance that do not rely on self-report or being active, and empowering new opportunities in the mobile health space.

A snapshot of the Henry Ford Health Fitbit Tool (HFH-FiT) desktop application Authorization Portal, which includes information for the study team (left) and an example of what will be participant facing on the Fitbit mobile application (right). The HFH-FiT can request access to participants’ personal data via the Authorization Portal. The authorization screen requests only limited access (left side of figure) to all the data collected by Fitbit. REACH-Fitbit study team members would choose the participant’s unique study ID from the drop down (left side of figure) and indicate to the participant that only access to the activities, sleep, and heart rate scopes (Fitbit’s name for these categories) data are requested. Participants would have downloaded the Fitbit mobile application on their personal device and would be prompted to grant/allow access to data (right side of the figure) needing to be collected for the REACH-Fitbit study.

A snapshot of the Henry Ford Health Fitbit Tool (HFH-FiT) desktop application Data Portal. The Data Portal allows study personnel to monitor the daily flow of data downloaded by the Fitbit API and includes several datasets and subdatasets. Enrolled = count of participants consented into the REACH-Fitbit study; Dropped = count of participants who have dropped or been dropped from the REACH-Fitbit study; Complete = count of participants who have completed REACH-Fitbit study data collection (i.e., delivered their baby). Activity Daily Summary = a summary and list of a user’s activities and activity log entries for a given day with fields including: activityDate = date of summary, steps_goal = user defined goal for daily step count (defaults to 10,000 unless changed by user), steps_summary = total steps taken for the day, sedentaryMins = total minutes the user was sedentary (MET value < 1.5), lightlyMins = total minutes the user was lightly active (MET value = 1.5–3), fairlyMins = total minutes the user was fairly/moderately active (MET value = 3–6), veryMins = total minutes the user was very active (MET value > 6). Sleep Daily Summary = a summary a list of a user’s sleep log entries for a given date. Activity Instances = a list of a user’s activity log entries before or after a given day. Sleep Instances = a list of a user’s sleep entries before or after a given day. Daily Activities = includes information on recorded Fitbit generated exercise description, the metabolic equivalent (METs) of the activity performed, and the date of the recorded exercise. Activities-No Data = same fields as the Activity Daily Summary; however, all the records are empty to aid with monitoring participation. Sleep-No Data = same fields as the Sleep Daily Summary; however, all the records are empty to aid with monitoring participation. Sedentary >= 90 Minutes = if a device runs out of power during an activity, all the time until the device is recharged is counted as sedentary time. If an activity shows sedentary time greater than 90 min, it ends up in this list. This dataset exists to get a count of these anomalous records. Non-Compliance(Activities) = this record set shows the days in study and the percent of those days where we collected no data for activities for each active study participant. Non-Compliance(Sleep) = this record set shows the days in study and the percent of those days where we collected no data for sleep for each active study participant. Heart Rate = this record set displays the intraday heart rate data for active participants. HR Compliance % = this record set displays a daily compliance percentage for each active participant based on the heart rate data. A participant who wears the device 100% of the time will have 96 heart rate entries. Each entry is recorded at 15-min intervals. We consider a participant compliant if they wear the device at least 10 h a day. Participant Status = this record set includes a participant’s start date, end date (i.e., baby’s date of birth), drop date (if applicable), and estimated date of delivery.
Contributor Notes
Conflicts of Interest and Source of Funding: The authors declare no conflict of interest. This research was funded by NIAID (5P01AI089473), Pilot funds from the Center for Research in Reproduction and Lifelong Health, and the Fund for Henry Ford Hospital, Henry Ford Health Mentored Scientist Award.
