corynissen / fitbitscraper Goto Github PK
View Code? Open in Web Editor NEWR package to scrape fitbit data
License: Other
R package to scrape fitbit data
License: Other
Hi guys,
please forgive me if I'm completly at the wrong place...
I am new to R and these kind of scripts. Is it possible to give me some hints how to use the fitbitScraper? Maybe a link to a step-by-step instruction?
Do I have to copy-paste all the login and get-* scripts into one, adapt it to my personal data and just run it in RGui and where will the data received from fitbit be stored?
Again, I apologize for maybe being seriously off-topic here!
I was able to seamlessly get data from Fitbit using fitbitScraper on 5th Sept. But the same codes now resulting in a "login fail" message. Not sure what changed. Everything the same, worked one day but not anymore...
When I run the scrapper inside a docker container, the cookie is null, it seems the issue is related to httr not using https.
Hi Cory,
I wanted to thank you for fitbitScraper package. It has made pulling fitbit data very efficient and far more effective than Excel certainly would have.
Just noticed a small typo which generates an error, but does not impede the output. Changing the 3 to a 4 gives you the desired result without the warning.
if(what=="getTimeInHeartRateZonesPerDay"){
df <- cbind(dat_list$dateTime, dat_list$value, stringsAsFactors=FALSE)
names(df)[1:3] <- c("time", "zone1", "zone2", "zone3")
Thanks again for the library!
Esturban
Hello,
When I try to download sleep data the following error message appears.
Error in .External2(C_writetable, x, file, nrow(x), p, rnames, sep, eol, :
unimplemented type 'list' in 'EncodeElement'
Do you know how to fix this? It doesn't happen with any of the other data.
Get package!! ๐
In the daily data, you are reporting "minutesActive". Nowadays fitbit is reporting "totalminutes". How do I get that?
Do you know what minutesVery in the get_daily_data() function refers to? Thanks!
Hi Cory,
When I run fitbitScraper::get_daily_data(cookie = cookie, what = "getTimeInHeartRateZonesPerDay", start_date = "2017-03-12", end_date = "2017-03-12") multiple times, sometimes the last column is IN_DEFAULT_ZONE_2 and sometimes the last column is IN_DEFAULT_ZONE_3. Furthermore, zone1, zone2, and IN_DEFAULT_ZONE[2|3] does not seem to consistently match to "peak", "fat_burn", "cardio". Is this something you can shed light on? I know fitbit's API is not friendly. Thanks!
Fitbit now supports different sleep categories ("AWAKE", "REM", "LIGHT", "DEEP") for certain devices; is there any way to get that data?
Thanks so much for this great package! Infinitely better than suffering their export process.
I have a premium subscription to fitbit and am having an issue with get_premium_export. When I run:
get_premium_export(cookie, what = "ACTIVITIES", start_date = "2015-01-13", end_date = "2015-01-20")
I get the error:
Error in get_premium_export(cookie, what = "ACTIVITIES", start_date = "2015-01-13", :
problem with request, this may be available only for premium subscribers
I've logged into the site and confirmed that my premium subscription is active. I re-created the cookie variable and am still getting the error.
Is there anything else I can check? Is this still working for you/someone else?
Thanks in advance,
Leigh
Thank you for this package. I was looking for something just like this.
This code:
df = get_intraday_data(cookie, what="heart-rate", date="2018-06-23")
gives me the error below:
Error in curl::handle_setopt(handle, .list = req$options) :
Value for option cookie (10022) must be length-1 string
Could it be because I only have 4 days of data, not a week yet? I can't think of anything else. I am not an advanced R user, so appreciate any help.
Thank you
When calling
cookie <- login(email="[email protected]", password=Sys.getenv("FBPW"), rememberMe = TRUE)
with the wrong password nothing happened. Can the user get some information that the login went wrong?
Current options for data export: "steps", "distance", "floors", "minutesVery", "caloriesBurnedVsIntake"
Would like to be able to import "minutes lightly active" and "minutes fairly active" as well as "sedentary minutes" (or whatever it's called within the system). I'll play around with the code too and see if I can come up with something that I can contribute to the package, but since you already know how to do it I figured I'd ask!
I'm having trouble pulling specific dates when using get_activity_data. It seems that no matter what dates I use it pulls the most recent two weeks.
I'm using R 3.2.3, Rstudio Version 0.99.473, on Mac OSX 10.10.3 Yosemite.
day_activites3 <- get_activity_data(cookie, start_date="2015-12-25", end_date = "2015-12-31")
returns the last two weeks of data instead of the specified days. I noticed this first when I was trying to just pull data from December. I started playing with the start and end date and noticed that no matter which dates I use it always pulls the most recent two weeks. I haven't had this problem with any of the other commands. Any ideas?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.