Skip to content

Instantly share code, notes, and snippets.

@corynissen
Last active August 29, 2015 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save corynissen/3e7296bc92a8aa1bdf41 to your computer and use it in GitHub Desktop.
Save corynissen/3e7296bc92a8aa1bdf41 to your computer and use it in GitHub Desktop.
install.packages("devtools")
library("devtools")
install.packages("httr")
install.packages("RJSONIO")
install.packages("stringr")
install_github("corynissen/fitbitScraper")
library("fitbitScraper")
start_date <- "2015-06-01"
end_date <- "2015-07-21"
date_seq <- as.character(seq(as.Date(start_date), as.Date(end_date), by="1 day"))
cookie <- login(email="youremail@gmail.com", password="yourpassword")
df <- data.frame()
for(date in date_seq){
df <- rbind(df, get_intraday_data(cookie, what="steps", date=date))
}
write.csv(df, "my_steps.csv", row.names=F)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment