Skip to content

Puck Possessed Biathlon #5

For the 5th issue of the Puck Possessed Biathlon series I decided not to use Tableau, but rather give R, R-Studio, Shiny and the ggplot2 package a go. It had been a while that I last used R, but after a few days of struggling, I think I got the basic principles back under control. Well, sort of.

First I wrote a script that pulled data from the Biathlon API, for all women that participated in the IBU sprint world cups in the 2019-2020 season. More detailed writing on that process can be found here, while the code is in my Github repository. Now that I had the data to play with, I decided I wanted to build a Shiny App which allowed a viewer to select an athlete from a drop-down and then showed the skiing and shooting statistics plus some personal information about this athlete. The result can be found here, but here is a screenshot to get the idea:

The code can again be found on my github, but note that for the Shiny app to run you’ll need to create your own Shiny account name, token and secret and put those in the code.

It was so much fun to play with R and Shiny that I think I’ll dive a bit deeper into that for the next issues of PP Biathlon. Of course they don’t look as slick as Tableau at this point, but I hope to improve my R/Studio/Shiny skills so they can look more polished than this first try. What I do like so far is the total control over all elements of the chart / visual, something that often bothers me when working with Tableau. We’ll see, I may stick with Tableau in the end, but the idea of being reliant on Tableau for keeping their Tableau Public servers up and running at a decent performance is bugging me lately, especially since I noticed some outages on a number of occasions. Tableau is still a wonderful product, and the fact they provide the free Public environment is great, but I like the control that the R environment gives me. Once I start figuring out how easy / hard it will be in the R environment to build connectivity between charts, we’ll see where it goes. But in the end there’s nothing wrong with being proficient in both Tableau and R!

Stay healthy, and home.

RJ