Last active
August 29, 2015 14:25
-
-
Save corynissen/3e7296bc92a8aa1bdf41 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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="[email protected]", 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