A Shiny app for plotting road race results
because you usually know only who won and how well you did
Gabi Huiber
consultant
The data
- Four years (2011-2014) of results from The Running of the Bulls 8K road race.
- This is a yearly race organized by The Bull City Running Company. It has a great course through beautiful downtown Durham, NC, and it attracts runners of all shapes and ages.
- Years 2011-2013 are available as pdf here. The Free PDF to Text Converter will turn them to text, but it's not perfect. I had to do some extra munging by hand in Vim before my text files were ready for
read.table().
- The results for 2014 are available here, and
XML::readHTMLTable() makes quick work of them.
- My Shiny app comes with a
bulls.rda file that holds the final product of doing all the work described above: a bulls data frame that combines years 2011-2014.
Some questions you might ask
- Is there a peak age group at which paces are faster on average?
- Is the variance in the paces smaller at this peak age group?
- What's the distribution of age groups? The gender split? Age groups by gender?
- Do men run faster than women on average? And if this is so on average, to what extent do the distributions of paces overlap between men and women?
The app (wait for it)
Why write a web app when a static plot will do?
- When one plot will do, don't write a web app. It's not worth it.
- But static plots have a way of multiplying: there's always another way to subset the data, or variable to look at, with the appropriate plot style changing accordingly.
- A web app eliminates the clutter by rendering only the pictures that people care about, on demand.
- Interactive plots are better than static ones at engaging the audience, I expect.
- The fixed cost of writing a web app makes you think about your options carefully (you don't want too many checkboxes) without necessarily limiting them (static plots that you might leave out of a slide deck that's getting a bit too leafy can be a radio button away).