rHelper Presentation

as Course Project of Developing Data Products on Coursera

Yuri Isakov

What is rHelper

rHelper is simple and easy to use app for runners. It contains both a pace calculator and race predictor.

First, sometimes runner wants to know average pace for next race to complete in desirable time. rHelper allows to calculate pace using distance and time. It also possible to compute any parameter using another two.

Second, runner may predict race time for another distance. For example, using marathon time it's possible to predict half marathon time, when runner may run faster.

Also rHelper provides VO2max estimate, an important measure of aerobic physical fitness. Find more on https://en.wikipedia.org/wiki/VO2_max

How rHelper works

rHelper was built on shinyapps.io platform. Its simple interface coded in ui.R and user information processor is in server.R. There are some other files. Full code available on: https://github.com/yurkai/DDP-CP

Pace calculator inside

This is example on how to calculate pace for known distance and time. Let's get average pace to run half marathon (21.1 km) in 1 hour and 20 minutes.

library(lubridate)
distKM <- 21.1
time <- origin; minute(time) <- 60 + 20
timeS <- time_length(time - origin, unit = "second")
paceS <- round(timeS / distKM)
pace <- origin; second(pace) <- paceS
paste0("Pace, min:sec - ", as.character(pace, "%M:%S") )
## [1] "Pace, min:sec - 03:47"

Using rHelper

Pace Calculator

  1. Using sliders set distance to desirable distance and time. Use arrow keys to set precise values
  2. Select parameter you want to calculate: distance, time or pace
  3. Get more info about your distance, time, pace, speed and VO2max below

Race Predictor

  1. Set your best race using sliders. While you move slider you'll see orange line moves up or down according to your parameters
  2. Plot has logarithmic scale and if you want to get exact time just enter distance in data field below and automaticly you'll get predicted time. Custom distance varies from 1 km to 50 km.

Used models

rHelper uses prediction models based on Bayesian regularized neural networks. If you interested how they were obtained read my report on http://rpubs.com/yurkai/DDPCP

Practical example

Let's imaging your friend ran 10 kilometers in 40 minutes last weekend. She shares her thoughts with you about to run a marathon next month. Assume that she's experienced long distance runner and she'll keep her physical conditions. What's finish time you'll expect from your friend?

  1. Sadly, she can't finish at all. Marathon is very hard challenge

  2. She'll probably beat world record and run marathon in 2 hours!

  3. 3 hours and 10 minutes looks pretty real

  4. In her physical conditions marathon take 4 hours or so

Use sliders to set up 10 km for distance and 40 minutes for time on https://yurkai.shinyapps.io/rHelper/ then look at the plot or enter marathon distance in kilometers in data field

10 km for 40 minutes gives us VO2max about 52 mL/(kg*min). It corresponds to about 3:05:00. So, we reserve extra 5 minutes to be confident with 3:10:00 finish time.