{"id":457,"date":"2020-04-11T22:06:02","date_gmt":"2020-04-12T04:06:02","guid":{"rendered":"https:\/\/puckpossessed.com\/?p=457"},"modified":"2021-02-24T12:59:16","modified_gmt":"2021-02-24T18:59:16","slug":"puck-possessed-biathlon-5","status":"publish","type":"post","link":"https:\/\/biathlonanalytics.com\/TEST\/puck-possessed-biathlon-5\/","title":{"rendered":"Puck Possessed Biathlon #5"},"content":{"rendered":"\n<p>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.<\/p>\n\n\n\n<p>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 <a rel=\"noreferrer noopener\" href=\"https:\/\/rjweise.rstudio.cloud\/8d78a5a734a945298359d4f4c82d7df9\/file_show?path=%2Fcloud%2Fproject%2FBiathlonNotebook.nb.html\" target=\"_blank\">here<\/a>, while the code is in <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/rjweise\/BiathlonAPI\/blob\/master\/Rcode\" target=\"_blank\">my Github repository<\/a>. 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 <a href=\"https:\/\/rjweise.shinyapps.io\/WomenOfBiathlonBios\/\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>, but here is a screenshot to get the idea:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"910\" src=\"https:\/\/puckpossessed.com\/wp-content\/uploads\/2020\/04\/Screen-Shot-2020-04-11-at-9.24.07-PM-1024x910.png\" alt=\"\" class=\"wp-image-458\" srcset=\"https:\/\/biathlonanalytics.com\/TEST\/wp-content\/uploads\/2020\/04\/Screen-Shot-2020-04-11-at-9.24.07-PM-1024x910.png 1024w, https:\/\/biathlonanalytics.com\/TEST\/wp-content\/uploads\/2020\/04\/Screen-Shot-2020-04-11-at-9.24.07-PM-300x267.png 300w, https:\/\/biathlonanalytics.com\/TEST\/wp-content\/uploads\/2020\/04\/Screen-Shot-2020-04-11-at-9.24.07-PM-768x683.png 768w, https:\/\/biathlonanalytics.com\/TEST\/wp-content\/uploads\/2020\/04\/Screen-Shot-2020-04-11-at-9.24.07-PM.png 1064w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The code can again be found on <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/rjweise\/BiathlonAPI\/blob\/master\/WomenOfBiathlonShinyApp\" target=\"_blank\">my github<\/a>, but note that for the Shiny app to run you&#8217;ll need to create your own Shiny account name, token and secret and put those in the code.<\/p>\n\n\n\n<p>It was so much fun to play with R and Shiny that I think I&#8217;ll dive a bit deeper into that for the next issues of PP Biathlon. Of course they don&#8217;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&#8217;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&#8217;ll see where it goes. But in the end there&#8217;s nothing wrong with being proficient in both Tableau and R!<\/p>\n\n\n\n<p>Stay healthy, and home.<\/p>\n\n\n\n<p>RJ<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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.&hellip;&nbsp;<a href=\"https:\/\/biathlonanalytics.com\/TEST\/puck-possessed-biathlon-5\/\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">Puck Possessed Biathlon #5<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":458,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","footnotes":""},"categories":[4],"tags":[],"class_list":["post-457","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-puck-possessed-hockey"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/biathlonanalytics.com\/TEST\/wp-json\/wp\/v2\/posts\/457","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/biathlonanalytics.com\/TEST\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/biathlonanalytics.com\/TEST\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/biathlonanalytics.com\/TEST\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/biathlonanalytics.com\/TEST\/wp-json\/wp\/v2\/comments?post=457"}],"version-history":[{"count":1,"href":"https:\/\/biathlonanalytics.com\/TEST\/wp-json\/wp\/v2\/posts\/457\/revisions"}],"predecessor-version":[{"id":459,"href":"https:\/\/biathlonanalytics.com\/TEST\/wp-json\/wp\/v2\/posts\/457\/revisions\/459"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/biathlonanalytics.com\/TEST\/wp-json\/wp\/v2\/media\/458"}],"wp:attachment":[{"href":"https:\/\/biathlonanalytics.com\/TEST\/wp-json\/wp\/v2\/media?parent=457"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/biathlonanalytics.com\/TEST\/wp-json\/wp\/v2\/categories?post=457"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/biathlonanalytics.com\/TEST\/wp-json\/wp\/v2\/tags?post=457"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}