fbpx
Running Pace Calculator in R Shiny Running Pace Calculator in R Shiny
If you are a runner yourself, you are certainly aware of how important preparation is before a race. For the preparation... Running Pace Calculator in R Shiny

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

This running plan was great, but an important piece of 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).

In-Person and Virtual Conference

September 5th to 6th, 2024 – London

Featuring 200 hours of content, 90 thought leaders and experts, and 40+ workshops and training sessions, Europe 2024 will keep you up-to-date with the latest topics and tools in everything from machine learning to generative AI and more.

 

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

Update of January 11, 2023:

Until now, only the conversion from distance and time to pace was possible. For completeness, I have added to following conversions:

  • Pace and time to distance: enter the pace and the time you plan to run to find the expected running distance.
  • Pace and distance to time: enter the pace and the distance you plan to run to find the expected running time.

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.

Conclusion

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.

Article originally posted here. Reposted with permission.

Antoine Soetewey

Antoine Soetewey

Antoine Soetewey is a PhD student in statistics at UCLouvain (Belgium) within the Institute of Statistics, Biostatistics and Actuarial Sciences. His research interests focus on survival analysis and bio-statistical procedures applied to cancer patients. In parallel with his doctoral thesis, he is a teaching assistant for several courses in statistics and probability at bachelor and master’s level. He also provides trainings and workshops in statistics and R (an open source statistical software program) as part of a Belgian statistical consulting company. Given his experience, he also helps academics and professionals in performing statistical data analyses for their academic or work-related projects. See more at www.antoinesoetewey.com (personal website) or www.statsandr.com (blog).

1