sarahnator / python-checkin

Data retrieval automation program that migrates data from MyFitnessPal & FitBit APIs to google spreadsheets for data analysis.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python-Checkin: Data analysis for the lazy energy-conscious athlete! (personal project)

A data retrieval automation program that migrates data from the MyFitnessPal and FitBit/Garmin APIs into google spreadsheets for data analysis.

Current/Future Features

  • Enables data retrieval from MyFitnessPal
  • Enables data retrieval from FitBit
  • Enables user to remotely edit a spreadsheet (see Notes section)
  • Editing allows a user to add notes to the Athlete Notes table, populate the Activity Tracker and Nutrition and Weight Tracker fields with the latest MFP/FitBit data, retrieve other parameterized fitness data, or clear any of all the editable regions mentioned.
  • A command-line interface that allows the user to conveniently chain multiple commands for ease of use and access help page for any commands.
  • User can see progress of requests through progress bars and outputs to the terminal.
  • Secure MFP credential storage in system keyring.
  • Export data to CSV files
  • Prompting / storage of credentials for necessary APIs (populate an empty credentials file)
  • Enable data retrieval from Garmin API

Note

This project is intended for use by members of Gifted Performance, as the program is designed to work specifically with spreadsheets of GP clients. Setup instructions below are in progress :)

Demo

Well that sucks, apparently the demo video is too big to attach in markdown. See the demo folder. description

Configuration

  • Gspread: Create credentials here, follow the setup instructions detailed in this post
  • Fitbit: Register personal application here, following these instructions
    • To configure the application to avoid webbrowser redirection for verification, on the dev.fitbit page, go to MANAGE MY APPS > OAuth2.0 tutorial page. Under Flow Type, select Authorization Code Flow and fill in the form fields below. Store the Access Token and Refresh Token.
  • MyFitnessPal: Use python's keyring service to store your account credentials:
Toggle python shell:
$ python 
>>> import keyring
>>> keyring.set_password('myfitnesspal', 'YOUR_USERNAME_HERE', 'YOUR_PASSWORD_HERE')
Verify that you've stored your password correctly:
>>> keyring.get_password('myfitnesspal', 'YOUR_USERNAME_HERE') 
>>> exit()

Usage

Install required python3 modules:

$ sudo pip install -r requirements.txt

License

Project licensed under the MIT License

Acknowledgments

About

Data retrieval automation program that migrates data from MyFitnessPal & FitBit APIs to google spreadsheets for data analysis.

License:MIT License


Languages

Language:Python 99.6%Language:Shell 0.4%