Giter VIP home page Giter VIP logo

healthplanet's Introduction

healthplanet CRAN Version

healthplanetパッケージはTanitaにより運営・提供されているHealth Planet APIのラッパーパッケージです。 Health Planet APIで取得できるデータをRのdata.frame形式で返却します。 (※現在、innerscan系のデータのみ)

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

  • HealthPlanetへの会員登録
  • 会員登録後、HealthPlanetにログインし、アプリケーションの登録を行い、「Client ID」と「Client secret」を取得

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

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

install.packages("devtools")
devtools::install_github("teramonagi/healthplanet")

使用例

> client_id <- "<your own client id>"
> client_secret <- "<your own client secret>"
> user_id <- "<HealthPlanetのID>"
> user_password <- "<HealthPalentのパスワード>"
> access_token <- getToken(user_id, user_password, client_id, client_secret)
> df <- getInnerScan(access_token)
> df
   sex birth_date heght                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

healthplanet's People

Contributors

teramonagi avatar

Watchers

Daisuke ICHIKAWA avatar James Cloos 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.