Running pace calculator in R Shiny

[This article was first published on R on Stats and R, 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.

Introduction

If you are a runner yourself, you are certainly aware of how important preparation is before a race. For the preparation of my first marathon, I used to rely on a training plan.

This running plan was great, but an important information was missing: the running pace. Most of the time, the distance and the time was given, but I needed to figure out the pace myself.

Although the computation is fairly easy, I felt like I was missing a quick way to compute my running pace based on the distance and expected time given by the training plan. So I started to look for a solution online, but I was never completely satisfied. Some running pace calculators were too detailed (showing way too much information) others were too basic (showing not enough information).

Running pace calculator

I thus decided to create one myself so I could really choose what information would be displayed, and how it would be displayed.

For the runners among you, here is a link to the application:

If you follow the blog, you know how much I like R Shiny, so you probably guessed that the calculator is built with this technology.

Note that this running pace calculator is inspired by several calculators I found online. I kept it quite basic so that it goes straight to the point, but most importantly so that it would fit to my needs (which may be different than yours).

How to use it?

I try to keep all my Shiny apps easy to use for everyone. However, here is how to use it in case it is not intuitive enough:

  1. Access the app via this link
  2. Choose the units (kilometers or miles)
  3. Enter the distance you plan to run
  4. Enter the time for which you would like to run that distance

On the right panel (or bottom if you use the app on mobile) you will see:

  • The pace you will need to respect in order to run the distance within the time you specified
  • Depending on the units you selected, your pace will be displayed in minutes/km or minutes/miles, and kilometers/hour or miles/hour
  • The table below displays the splits—the time at each kilometer or mile

Code

As for all my Shiny apps, the code is available on GitHub. Feel free to open an issue if you find a bug or if you have a suggestion. And if you are proficient in R Shiny, do not hesitate to propose a pull request with your suggestions implemented.

Thanks for reading. I hope this running pace calculator will be useful if you are a runner, or if you plan to start running.

As always, if you have a question about the app, please add it as a comment so other readers can benefit from the discussion.

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

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.

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)