<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Sports on Stats and R</title>
    <link>https://statsandr.com/tags/sports/</link>
    <description>Recent content in Sports on Stats and R</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Mon, 15 Mar 2021 00:00:00 +0000</lastBuildDate>
    
	<atom:link href="https://statsandr.com/tags/sports/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>Running pace calculator in R Shiny</title>
      <link>https://statsandr.com/blog/running-pace-calculator/</link>
      <pubDate>Mon, 15 Mar 2021 00:00:00 +0000</pubDate>
      
      <guid>https://statsandr.com/blog/running-pace-calculator/</guid>
      <description>

&lt;div id=&#34;TOC&#34;&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#introduction&#34; id=&#34;toc-introduction&#34;&gt;Introduction&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#running-pace-calculator&#34; id=&#34;toc-running-pace-calculator&#34;&gt;Running pace calculator&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#how-to-use-it&#34; id=&#34;toc-how-to-use-it&#34;&gt;How to use it?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#code&#34; id=&#34;toc-code&#34;&gt;Code&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#conclusion&#34; id=&#34;toc-conclusion&#34;&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;p&gt;&lt;img src=&#34;images/running-pace-calculator.jpeg&#34; style=&#34;width:100.0%&#34; /&gt;&lt;/p&gt;
&lt;div id=&#34;introduction&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;Introduction&lt;/h1&gt;
&lt;p&gt;If you are a runner yourself, you are certainly aware of how important preparation is before a race. For the preparation of my first &lt;a href=&#34;https://www.strava.com/activities/1928117850/overview&#34; target=&#34;_blank&#34;&gt;marathon&lt;/a&gt;, I used to rely on a training plan.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;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).&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;running-pace-calculator&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;Running pace calculator&lt;/h1&gt;
&lt;p&gt;I thus decided to create one myself so I could really choose what information would be displayed, and how it would be displayed.&lt;/p&gt;
&lt;p&gt;For the runners among you, here is a link to the application:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://antoinesoetewey.shinyapps.io/running-pace-calculator/&#34; target=&#34;_blank&#34;&gt;&lt;strong&gt;Running pace calculator&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;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).&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;how-to-use-it&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;How to use it?&lt;/h1&gt;
&lt;p&gt;I try to keep all my &lt;a href=&#34;https://statsandr.com/tags/shiny/&#34;&gt;Shiny apps&lt;/a&gt; easy to use for everyone. However, here is how to use it in case it is not intuitive enough:&lt;/p&gt;
&lt;ol style=&#34;list-style-type: decimal&#34;&gt;
&lt;li&gt;Access the app via this &lt;a href=&#34;https://antoinesoetewey.shinyapps.io/running-pace-calculator/&#34; target=&#34;_blank&#34;&gt;link&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Choose the units (kilometers or miles)&lt;/li&gt;
&lt;li&gt;Enter the distance you plan to run&lt;/li&gt;
&lt;li&gt;Enter the time for which you would like to run that distance&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;On the right panel (or bottom if you use the app on mobile) you will see:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The pace you will need to respect in order to run the distance within the time you specified&lt;/li&gt;
&lt;li&gt;Depending on the units you selected, your pace will be displayed in minutes/km or minutes/miles, and kilometers/hour or miles/hour&lt;/li&gt;
&lt;li&gt;The table below displays the splits—the time at each kilometer or mile&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Update of January 11, 2023:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Until now, only the conversion from distance and time to pace was possible. For completeness, I have added to following conversions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Pace and time to distance: enter the pace and the time you plan to run to find the expected running distance.&lt;/li&gt;
&lt;li&gt;Pace and distance to time: enter the pace and the distance you plan to run to find the expected running time.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div id=&#34;code&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;Code&lt;/h1&gt;
&lt;p&gt;As for all my &lt;a href=&#34;https://statsandr.com/tags/shiny/&#34;&gt;Shiny apps&lt;/a&gt;, the code is available on &lt;a href=&#34;https://github.com/AntoineSoetewey/running-pace-calculator&#34; target=&#34;_blank&#34;&gt;GitHub&lt;/a&gt;. 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.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;conclusion&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;Thanks for reading.&lt;/p&gt;
&lt;p&gt;I hope this &lt;a href=&#34;https://antoinesoetewey.shinyapps.io/running-pace-calculator/&#34; target=&#34;_blank&#34;&gt;running pace calculator&lt;/a&gt; will be useful if you are a runner, or if you plan to start running.&lt;/p&gt;
&lt;p&gt;As always, if you have a question about the app, please add it as a comment so other readers can benefit from the discussion.&lt;/p&gt;
&lt;/div&gt;
</description>
    </item>
    
  </channel>
</rss>