Site icon R-bloggers

A Shiny Comrades Marathon Pacing App

[This article was first published on R on datawookie, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

The Comrades Marathon is an epic ultramarathon run each year between Durban and Pietermaritzburg (South Africa).

A few years ago I put together a simple spreadsheet for generating a Comrades Marathon pacing strategy. But the spreadsheet was clunky to use and laborious to maintain. Plus I was frustrated by the crude plots (largely due to my limited spreadsheet proficiency). It seemed like an excellent opportunity to create a Shiny app.

Inputs

You need to specify the following:

Outputs

The output is displayed in two tabs: Plot and Table.

On the Plot tab is a figure which presents the following as a function of distance:

The average pace curve is rather interesting because it will generally have a “bucket” shape. At the beginning of the race average pace will be slow due to the delay in crossing the line. However, over time the effect of this delay decays and average pace improves. Then, as you begin to slow down towards the end of the race (assuming that you’ve set fade to a value other than zero) average pace begins to climb once again. I find average pace much more useful than instantaneous pace because it smoothes out effects of perturbations like water tables and wee breaks.

On the Table tab are the time and average pace projected at a number of landmarks along the route.

Check out the app and work on your strategy for conquerting the Ultimate Human Race. Feedback and suggestions for improvement are very welcome!

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

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.