| Title: | Scrapes Data from Fitbit |
|---|---|
| Description: | Scrapes data from Fitbit <http://www.fitbit.com>. This does not use the official API, but instead uses the API that the web dashboard uses to generate the graphs displayed on the dashboard after login at <http://www.fitbit.com>. |
| Authors: | Cory Nissen <[email protected]> [aut, cre] |
| Maintainer: | Cory Nissen <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.8 |
| Built: | 2026-05-31 10:37:24 UTC |
| Source: | https://github.com/corynissen/fitbitscraper |
Get activity data from fitbit using cookie returned from login function
get_activity_data(cookie, end_date)get_activity_data(cookie, end_date)
cookie |
Cookie returned after login, specifically the "u" cookie |
end_date |
Date in YYYY-MM-DD format |
A dataframe with raw output from Fitbit
## Not run: get_activity_data(cookie, end_date="2015-01-20") ## End(Not run) get_activity_data## Not run: get_activity_data(cookie, end_date="2015-01-20") ## End(Not run) get_activity_data
Get daily data from fitbit using cookie returned from login function
get_daily_data(cookie, what = "steps", start_date, end_date)get_daily_data(cookie, what = "steps", start_date, end_date)
cookie |
Cookie returned after login, specifically the "u" cookie |
what |
What data you wish to be returned. Options include "steps", "distance", "floors", "minutesVery", "caloriesBurnedVsIntake", "minutesSedentary", "getTimeInHeartRateZonesPerDay", "getRestingHeartRateData" |
start_date |
Date in YYYY-MM-DD format |
end_date |
Date in YYYY-MM-DD format |
A dataframe with two columns:
time |
A POSIXct time value |
data |
The data column corresponding to the choice of "what" |
## Not run: get_daily_data(cookie, what="steps", start_date="2015-01-13", end_date="2015-01-20") ## End(Not run) get_daily_data## Not run: get_daily_data(cookie, what="steps", start_date="2015-01-13", end_date="2015-01-20") ## End(Not run) get_daily_data
Get intraday data from fitbit using cookie returned from login function
get_intraday_data(cookie, what = "steps", date)get_intraday_data(cookie, what = "steps", date)
cookie |
Cookie returned after login, specifically the "u" cookie |
what |
What data you wish to be returned. Options include "steps", "distance", "floors", "active-minutes", "calories-burned", "heart-rate" |
date |
Date in YYYY-MM-DD format |
A dataframe with two columns:
time |
A POSIXct time value |
data |
The data column corresponding to the choice of "what" |
## Not run: get_intraday_data(cookie, what="steps", date="2015-01-20") ## End(Not run) get_intraday_data## Not run: get_intraday_data(cookie, what="steps", date="2015-01-20") ## End(Not run) get_intraday_data
Get sleep data from fitbit using cookie returned from login function
get_sleep_data(cookie, start_date = "2015-01-13", end_date = "2015-01-20")get_sleep_data(cookie, start_date = "2015-01-13", end_date = "2015-01-20")
cookie |
Cookie returned after login, specifically the "u" cookie |
start_date |
Date in YYYY-MM-DD format |
end_date |
Date in YYYY-MM-DD format |
A list with two things
summary |
A list of sleep summary values |
df |
A data frame containing various sleep values over time |
## Not run: get_sleep_data(cookie, start_date="2015-01-13", end_date="2015-01-20") ## End(Not run) get_sleep_data## Not run: get_sleep_data(cookie, start_date="2015-01-13", end_date="2015-01-20") ## End(Not run) get_sleep_data
Get weight data from fitbit using cookie returned from login function
get_weight_data(cookie, start_date, end_date)get_weight_data(cookie, start_date, end_date)
cookie |
Cookie returned after login, specifically the "u" cookie |
start_date |
Date in YYYY-MM-DD format |
end_date |
Date in YYYY-MM-DD format |
A dataframe with two columns:
time |
A POSIXct time value |
weight |
The data column corresponding to weight |
## Not run: get_weight_data(cookie, start_date="2015-01-13", end_date="2015-01-20") ## End(Not run) get_weight_data## Not run: get_weight_data(cookie, start_date="2015-01-13", end_date="2015-01-20") ## End(Not run) get_weight_data
Get the login cookie after login at www.fitbit.com
login(email, password, rememberMe = FALSE)login(email, password, rememberMe = FALSE)
email |
Email address used to login to fitbit.com |
password |
Password used to login to fitbit.com |
rememberMe |
Value for rememberMe during login, default is FALSE, but changing to TRUE may help with login issues |
A string containing the cookie that is returned after login at www.fitbit.com
## Not run: cookie <- login(email="corynissen<at>gmail.com", password="mypasswordhere") ## End(Not run) login## Not run: cookie <- login(email="corynissen<at>gmail.com", password="mypasswordhere") ## End(Not run) login