Code Monkey home page Code Monkey logo

fitbit_downloaddata's Introduction

DOI

FitBit_DownloadData

Overview

The functions here were written to download data from FitBit servers using the FitBit API. I used fitbitr from Nagi Teramo, and I have a "registered" FitBit App, which is necessary to get the key and secret for using Oauth2.0

Usage

FitBit_AuthCode

This is the part that is based on fitbitr.

Right now, you will need to enter your own FitBit OAuth Key and Secret into the FitBit_AuthCode.R file. I hope to somehow make it more elegant so maybe it prompts you for your codes, but that seems like it might be more annoying, since every time you use this you would need to enter that information.

Additionally, this requires you be logged into the proper FitBit user account with your browser when you run the code. I couldn't figure out how to manage that kind of a login from R.

getFitBitData

This uses the OAuth info generated from FitBit_AuthCode.R to grab a number of types of physical activity data from FitBit over a designated period of time. It then shoves all of that data into a .csv to export it.

Currently this function asks for an ID and a device name, which is because the code is written for a research project which has multiple subjects and multiple devices. It is only used for constructing the .csv file name at the end of the function. Feel free to delete these for your use.

Note

This is my first time attempting load a semi-complex thing to GitHub. Helpful feedback is appreciated.

fitbit_downloaddata's People

Contributors

resourcefulsquirrel avatar

Watchers

James Cloos avatar  avatar

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.