tetlabo / healthplanet

Wrapper package for healthplanet api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

healthplanet CRAN Version

※本パッケージはteramonagi/healthplanet をほんの少し改変したものです。

healthplanetパッケージはTanitaにより運営・提供されているHealth Planet APIのラッパーパッケージです。 Health Planet APIで取得できるデータをRのdata.frame形式で返却します。 (※現在、innerscan系のデータのみ) (※当然ながら、データはご自身でhealthplanetにため込んでおく必要があります)

使用する前に下記の登録が必要です

  • HealthPlanetへの会員登録
  • (そこで登録したユーザIDとパスワードを覚えておく)

パッケージのインストール

healthplanetパッケージはCRANにはありませんが、Githubより以下のコマンドでインストール可能です。

install.packages("devtools")
devtools::install_github("ltl-manabi/healthplanet")

使用例

> library("healthplanet")
> #ブラウザ経由での認証が実行される 
> access_token <- getToken()
> #getInnerScan関数により体重・体脂肪など、タニタの体重計で測定されたデータが取得できる
> #一度取得したaccess_tokenは以降も使いまわしてOK
> df <- getInnerScan(access_token)
> df
   sex birth_date height                date    model basal_metabolic_rate body_age body_fat bone_mass muscle_mass muscle_score visceral_fat_level weight
1 male 1963-03-10   180 2016-03-16 06:49:00 01000099                 1685       43     20.9       3.1       56.70            0                9.5  75.60
2 male 1963-03-10   180 2016-03-17 08:04:00 01000099                 1705       44     21.4       3.1       57.30            0               10.0  76.85
3 male 1963-03-10   180 2016-03-18 05:48:00 01000099                 1677       44     21.2       3.1       56.45            0                9.5  75.55
4 male 1963-03-10   180 2016-03-19 07:11:00 01000099                 1667       44     21.2       3.1       56.15            0                9.5  75.15
5 male 1963-03-10   180 2016-03-20 06:39:00 01000099                 1687       43     20.5       3.1       56.80            0                9.5  75.35
6 male 1963-03-10   180 2016-03-21 05:28:00 01000099                 1675       43     20.7       3.1       56.40            0                9.5  75.00

About

Wrapper package for healthplanet api


Languages

Language:R 100.0%