knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  fig.width=8,
  fig.height=4,
  cache=TRUE
)

wearable

CRAN Version

The wearable package allows users to interact with activity tracker data in R using device API.

Currently this package allows for read/write functionality for interacting with personal Fitbit data.

Installation

wearable isn't available from CRAN yet, but you can get it from github with:

# install.packages("devtools")
devtools::install_github("tracker-neRds/wearable")

Preparation

API key

To get your own token (API key), you have to register your own application in here. For your reference, we share our setting:

![](man/figures/register_app.png)

After registration, you can get your own FITBIT_KEY and FITBIT_SECRET (referred to as OAuth 2.0 Client ID and Client Secret in the next figure).

![](man/figures/manage_my_apps.png)

If you set the following variables as a global variable, this package will use these values for API key.

# As a global variable
FITBIT_KEY    <- "<your-fitbit-key>"
FITBIT_SECRET <- "<your-firbit-secret>"
# If you want, Default: "http://localhost:1410/"
# FITBIT_CALLBACK <- "<your-fitbit-callback>" 

Or, you can set these values as a environment variable

Sys.setenv(FITBIT_KEY = "<your-fitbit-key>", FITBIT_SECRET = "<your-firbit-secret>")

-->



tracker-neRds/wearable documentation built on Dec. 16, 2019, 12:49 a.m.