Running pace calculator in R Shiny

Use the running pace calculator to find your necessary pace and splits based on your expected running time and distance

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.

Related articles

Originally published at https://statsandr.com on March 15, 2021.

PhD student and teaching assistant in statistics at UCLouvain (Belgium). Interested in statistics and R, author of statsandr.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store