Giter Site home page Giter Site logo

healthplotr's Introduction

Healthplotr

This package is primarily an R Shiny app to visualize Apple Health data that has been exported via the iOS Health app to a file called export.zip. See the section "Share your health and fitness data in XML format" in this Apple support page for instructions on how to create this file. The exported zip file can then be uploaded to the Healthplotr Shiny app (and downloaded as an RDS file).

Getting Started

  • Install the devtools package:
    install.packages(devtools)
  • Install the healthplotr package like so:
    devtools::install_github("mamoll/healthplotr")
  • Start the healthplotr Shiny app:
    healthplotr::healthplotr()
  • Optionally, healthplotr::healthplotr can be started with some initial data:
    # Load data from exported Apple Health zip file
    healthplotr::healthplotr("export.zip")
    # Load data from an RDS file downloaded from a previous healthplotr session
    healthplotr::healthplotr("healthdata.rds")
    # The previous two commands can be separated into two steps each:
    # 1. Load the data into a list of tibbles
    # 1a. Directly from a zip file
    healthdata <- healthplotr::load_exported_health_data("export.zip")
    # 1b. By loading data from an RDS file downloaded from a previous healthplotr session
    healthdata <- readRDS("healthdata.rds") 
    # 2. start the Shiny app with data that has already been loaded
    healthplotr::healthplotr(healthdata)

Besides the core Shiny app functionality, you may also be interested in using the core helper functions on their own:

  • load_exported_health_data(zip_file): load Apple Health data stored in export.zip and return a list with 3 tidy tibbles of records, activity, and workout data.
  • plot_records(records, type, aggregate): return a plotly object with a plot of records of a certain type (e.g., "BodyMass"), aggregated by a time period (e.g., "month").
  • plot_activity(activity, type, aggregate): return a plotly object with a plot of activity of a certain type (e.g., "activeEnergyBurned"), aggregated by a time period (e.g., "month").
  • plot_workout(workout, aggregate): return a ggplot object with a plot of all workout durations, aggregated by a time period (e.g., "month").

healthplotr's People

Contributors

mamoll avatar

Watchers

 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.