Analyzing Apple Health Data

Looking at the Data iPhone Gives You

Animations with gganimate

Today I’m going to show a brief walkthrough on using Thomas Lin Pedersen’s gganimate package, a great tool for greating GIFs of data for easy sharing. Check out his GIT repo for a full overview. This example uses mock patient ART line data to reconstruct a live QRS complex. While some of this may sound unfamiliar, the image below is pretty familiar to anyone who has watched a hospital drama show:

Plotting with ggplot2

For beginners just getting their bearings in R and Rstudio, there are a few quick ways to translate your data into visualization. Let’s start with some random sample data with an exponential behavior: The Plot Command set.seed(123) x <- rnorm(100,10,1) y <- exp(x) plot(x,y, main = "A Sample Plot", xlab = "X-label", ylab = "Y-label") Behold…ggplot2! The plot command is a quick way to snapshot your data in a bare-bones manner.