#Access and Save Your Fitbit Data
##Requirements
- Python 2.7+
- Fitbit Charge HR
##Installation
Register your API:
Follow this tutorial to obtain credentials
-This will give you your access and refresh tokens to access your data
-This will have you download the “python-fitbit” library
Install the Python requirements:
- Clone this repository
- Start Terminal and go into the directory using
cd Fitbit
- Install the requirements using
pip install -r requirements.txt
##Usage
A. View/download data for one date (“1DayFitbit.ipynb”):
- Drag the file “1DayFitbit.ipynb” into your “python-fitbit” folder
- In Terminal, go into the “python-fitbit” directory using
cd python-fitbit
and start a Jupyter Notebook by typingjupyter notebook
- Open “1DayFitbit.ipynb” and follow the instructions to collect and visualize your data
B. View/download data for a range of dates (“FitbitRange.ipynb”):
- Drag the file “FitbitRange.ipynb” into your “python-fitbit” folder
- Start Terminal and enter the “python-fitbit” directory using
cd python-fitbit
- Create folders to store your data by running
mkdir -p Data/{Cals_Timeseries,Sleep_Summary,Sleep_Timeseries,Activities_Summary,Distances_Summary,HR_Summary,Steps_Timeseries,HR_Timeseries}
- Start a Jupyter Notebook by typing
jupyter notebook
- Open “FitbitRange.ipynb” and follow the instructions to collect your data
C. View/download 1-second interval heart rate data for a range of dates (“FitbitFullHR.ipynb”):
- Drag the file “FitbitFullHR.ipynb” into your “python-fitbit” folder
- Start Terminal and enter the “python-fitbit” directory using
cd python-fitbit
- Create folders to store your data by running
mkdir -p Data/HR_Second_Timeseries
- Start a Jupyter Notebook by typing
jupyter notebook
- Open “FitbitFullHR.ipynb” and follow the instructions to collect your heart rate data