Giter VIP home page Giter VIP logo

fitbit-etl's Introduction

Fitbit Data (sleep) ETL

Purpose:

  • Allows curious individuals to easily access their sleep data and store them in a database for further statistical analysis.
  • Simplifies and automate the ETL processes for sleep researchers to collect their subjects' sleep data into a database for further statistical analysis.

Feature:

  • Fully automated once the appropriate credentials are given.
  • Can be used over multiple user accounts.

Instruction:

If you don't already have anaconda environment manager installed on your machine, install environment manager anaconda3 from https://www.anaconda.com/distribution/#download-section .

Or, if you already have Anaconda Environment Manager follow the steps below.

  1. Create an environment that will be configured for running the ETL application.
conda create -n fitbitETL python=3.6
  1. Activate the new environment.
conda activate fitbitETL
  1. Download the application package.
git clone https://github.com/sehokim88/fitbit-etl.git 
  1. Change directory into the package's root.
cd fitbit-etl 
  1. Install the required python pacakges from anaconda distribution.
conda install --file requirements.txt
  1. Fill in the credentials for your registered Fitbit Application and target database into var/config.yaml. If you don't already have one registered, register one from https://dev.fitbit.com/apps/new. If you don't already have AWS RDS instance established for your database, do so from https://console.aws.amazon.com/rds/home.
app:
   client_id: <your client id>
   client_secret: <your client secrete>
   
db:
   host: <your DB host DNS>
   port: <your DB host Port>
   database: <your DB name>
   user_id: <your DB user_id>
   password: <your DB password>
   
  1. Fill in one or more Fitbit user information into var/users.yaml.
user1:
   name: <user's name>
   bod: <user's bod in "%Y-%m-%d">
   gender: <user's gender in string>
   country: <user's coutry of residence in string> 
   accountID: <user's Fitbit account ID>
   password: <user's Fitbit accound password>
   
user2:
   name: <user's name>
   bod: <user's bod in "%Y-%m-%d">
   gender: <user's gender in string>
   country: <user's coutry of residence in string> 
   accountID: <user's Fitbit account ID>
   password: <user's Fitbit accound password>
   
user3:
   ...
  1. Automate login process over all the user accoutns by running login.py. Once authenticated, there is no need to run this every time you want to extract data.
python login.py 
  1. Extract, transform, and load your sleep data into your AWS RDS database by executing sleep_ETL.py.
python FETL.py

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.