openhumans / oh-fitbit-integration Goto Github PK
View Code? Open in Web Editor NEWIntegration for connecting & importing Fitbit data into the Open Humans platform
Home Page: https://fitbit.openhumans.org
Integration for connecting & importing Fitbit data into the Open Humans platform
Home Page: https://fitbit.openhumans.org
There were discussions of getting walking speed data into OH and after looking at the Fitbit API it looks like there are 2 different API endpoints that aren't being utilized that contain activity speed information:
speed
datapoint for an entire activityWe should add in the latter to our fetching to see how much data accumulates for someone who has years worth of activity data.
Looking at this:
https://github.com/OpenHumans/oh-fitbit-integration/blob/master/datauploader/tasks.py
... it seems that the endpoint is going to https://api.fitbit.com/1/user
That prefix is still used for the following:
https://api.fitbit.com/1/user/[user-id]/activities/tracker/...
https://api.fitbit.com/1/user/[user-id]/activities/heart/...
https://api.fitbit.com/1/user/[user-id]/activities/body/...
However from the sleep documentation: https://dev.fitbit.com/build/reference/web-api/sleep/
... I see the endpoint seems to be updated to be like https://api.fitbit.com/1.2/user/-/sleep/
. (Note the "1.2".)
I was looking into this because I'd like to be collecting the sleep stages data (minute-by-minute information about which "stage" of sleep is occurring), which appears to be available in this new endpoint. (I think the old one is working but deprecated: https://dev.fitbit.com/build/reference/web-api/sleep-v1/ )
Currently our data import task (https://github.com/OpenHumans/oh-fitbit-integration/blob/master/datauploader/tasks.py) uses only the presence of a given key to determine whether we already have the corresponding data or not.
This is problematic as a given year
is the top-level key in our JSON. So e.g. once we have fetched any data for 2018
we will ignore all new data and not import further data. This needs to be fixed by checking whether the data for a given key is complete and re-running the import for that key if its not.
See my public fitbit data at https://www.openhumans.org/member/gedankenstuecke for an example of this behaviour.
Right now you can push the update data
button as many times as you want and I think it'll also trigger that update as often as you push the button?
Would be good if we could fully implement the cool down (through last_submitted
as for moves
)
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.