Learn R Programming

⚠️There's a newer version (0.1.8) of this package.Take me there.

fitbitScraper 0.1.5

This package scrapes data from fitbit.com
It only works if you use email / password to login. Not sure about facebook or google login.

Usage:

install.packages("fitbitScraper")
library("fitbitScraper")

cookie <- login(email="corynissen@gmail.com", password="mypassword")  
# 15_min_data "what" options: "steps", "distance", "floors", "active-minutes", "calories-burned"   
df <- get_15_min_data(cookie, what="steps", date="2015-01-21")  
library("ggplot2")  
ggplot(df) + geom_bar(aes(x=time, y=data, fill=data), stat="identity") + 
             xlab("") +ylab("steps") + 
             theme(axis.ticks.x=element_blank(), 
                   panel.grid.major.x = element_blank(), 
                   panel.grid.minor.x = element_blank(), 
                   panel.grid.minor.y = element_blank(), 
                   panel.background=element_blank(), 
                   panel.grid.major.y=element_line(colour="gray", size=.1), 
                   legend.position="none") 

# daily_data "what" options: "steps", "distance", "floors", "minutesVery", "caloriesBurnedVsIntake"   
df <- get_daily_data(cookie, what="steps", start_date="2015-01-13", end_date="2015-01-20")  
ggplot(df) + geom_point(aes(x=time, y=data))  

Changed function

  • get_activity_data() - end_date now works. Start_date removed.

Copy Link

Version

Monthly Downloads

212

Version

0.1.5

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Cory Nissen

Last Published

April 21st, 2017

Functions in fitbitScraper (0.1.5)

get_intraday_data

Get intraday data from fitbit.com
get_15_min_data

Get 15 minute interval data from fitbit.com
get_activity_data

Get activity data from fitbit.com
login

Login to fitbit.com and get cookie
get_premium_export

Get official data export from fitbit.com premium
get_daily_data

Get daily data from fitbit.com
get_weight_data

Get weight data from fitbit.com
get_sleep_data

Get sleep data from fitbit.com