What 5,728.986 miles look like…

November 10, 2011

(This article was first published on ProcRun; » R, and kindly contributed to R-bloggers)

Time Series as calendar heat maps + All of my running data since April 1, 2009 =

Generated by the following code:

#Sample Code based on example program at:
source(file = "calendarHeat.R")

run<- read.csv("log.csv", header = TRUE, sep=",")

date <- c()

for (i in 1: dim(run)[1]){

    if(run$DistanceUnit[i]== 'Kilometer'){
      miles <- c(miles,run$Distance[i] * 0.62)
      miles <- c(miles,run$Distance[i])

calendarHeat(run$Date, miles, varname="Andy's Running Mileage")

You can see the definite shift in the length of my daily runs over the past 12 months.  Race times have dropped a chunk over that same period.

The heat map still needs some cleaning up,  using 26.2 as the max intensity is preventing the differences in my shorter runs from coming through.  Capping it at max of 15 (shortest of my ‘long’ runs) is probably a good idea to further show the shift in my daily mileage.

One of these days I need to transfer the 4,534.62 miles I have logged into notebooks to the computer.   Buying a Garmin Forerunner and having the data automatically updated to Runningahead.com  made it super easy to get the dataset.

Full code and source files are available on bitbucket:  RunningHeatMap

To leave a comment for the author, please follow the link and comment on their blog: ProcRun; » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Tags: , ,

Comments are closed.

Search R-bloggers


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)