ubcmist / ML

Repository for machine learning team
MIT License
2 stars 0 forks source link

Fitbit Data Collection Interface _ Python #3

Closed hooman007 closed 5 years ago

hooman007 commented 5 years ago

make a python script that extracts data from Fitbit.

Update ML repository with the code.

Sample code: https://towardsdatascience.com/collect-your-own-fitbit-data-with-python-ff145fa10873

Requirements:

Note: regarding the 2nd requirement, maybe the interface allows us to ask for a certain time of the data or certain data labels (like a database query). So that way we can make the interface easier to use and label the data more automatically.

hooman007 commented 5 years ago

We have filled out the APP Registration form to get authentication info. (client ID and secret id)

However, it turns out that Intraday data ( the detailed data from tracker ) requires sending a request to get access as they process this kind of access case by case.

The Intraday Access request has been sent out and currently we are waiting for response.

hooman007 commented 5 years ago

Note: if you have error bellow on pycharm and are using anaconda 3.7 like @hooman007 and @nimakondori

ImportError: 
Importing the multiarray numpy extension module failed.  Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control).  Otherwise reinstall numpy.

Here is how to fix it

hooman007 commented 5 years ago

Fitbit required some information on how we use the app and data. We replied them with the information needed and are waiting for their response.

hooman007 commented 5 years ago

Access is given for both Fitbit accounts. Could collect data from my Fitbit. BUT still didn't have access for the fitbit with ubcmist account. Maybe because the requester wasn't in the same location as the fitbit. so @DanielZhou4970 will try some stuff to test this hypothesis.

Update: @DanielZhou4970 could pull the data from his Fitbit. So there is a requirement that the requesting computer needs to be next to the fitbit or they both ahve to be in the same network and have the same IP Origin or whatever!

hooman007 commented 5 years ago

Master updated with the most recent script, DataExtraction.py which can take the data of heart rate for the "yesterday" and summary of heart rate of "today".

Sleep data is still not working.

DataExtraction.py is useful for future developments. so use it as a guide.

hooman007 commented 5 years ago

the second checkmark of the TODO list of this ticket won't be done in this scope. Another specialized ticket will be made.