{"id":1958,"date":"2021-01-31T21:15:41","date_gmt":"2021-01-31T21:15:41","guid":{"rendered":"http:\/\/optimumsportsperformance.com\/blog\/?p=1958"},"modified":"2021-02-01T14:48:44","modified_gmt":"2021-02-01T14:48:44","slug":"tidyx-47-nhl-win-probability-r-optimizer-gt-tables","status":"publish","type":"post","link":"https:\/\/optimumsportsperformance.com\/blog\/tidyx-47-nhl-win-probability-r-optimizer-gt-tables\/","title":{"rendered":"TidyX 47: NHL Win Probability, R optimizer, &#038; gt tables"},"content":{"rendered":"<p>This week, <strong><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/twitter.com\/ellis_hughes\">Ellis Hughes<\/a><\/span><\/strong> and I discuss using an optimization algorithm in R to find team strength ratings for the NHL 2019-2020 season. We show how to then use the results from these ratings to forecast the probability that one team wins over another while accounting for the home ice edge. Finally, we output the team strength ratings into a {gt} table.<\/p>\n<p><a href=\"https:\/\/optimumsportsperformance.com\/blog\/wp-content\/uploads\/2021\/01\/Screen-Shot-2021-01-31-at-1.08.52-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-1959\" src=\"https:\/\/optimumsportsperformance.com\/blog\/wp-content\/uploads\/2021\/01\/Screen-Shot-2021-01-31-at-1.08.52-PM-942x1024.png\" alt=\"\" width=\"625\" height=\"679\" srcset=\"https:\/\/optimumsportsperformance.com\/blog\/wp-content\/uploads\/2021\/01\/Screen-Shot-2021-01-31-at-1.08.52-PM-942x1024.png 942w, https:\/\/optimumsportsperformance.com\/blog\/wp-content\/uploads\/2021\/01\/Screen-Shot-2021-01-31-at-1.08.52-PM-276x300.png 276w, https:\/\/optimumsportsperformance.com\/blog\/wp-content\/uploads\/2021\/01\/Screen-Shot-2021-01-31-at-1.08.52-PM-768x835.png 768w, https:\/\/optimumsportsperformance.com\/blog\/wp-content\/uploads\/2021\/01\/Screen-Shot-2021-01-31-at-1.08.52-PM-624x678.png 624w, https:\/\/optimumsportsperformance.com\/blog\/wp-content\/uploads\/2021\/01\/Screen-Shot-2021-01-31-at-1.08.52-PM.png 1286w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><\/p>\n<p>To watch the screen cast, <strong><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/www.youtube.com\/watch?v=0M7pR8moxPA&amp;feature=youtu.be\">CLICK HERE<\/a><\/span><\/strong>.<\/p>\n<p>To access our code, <strong><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/github.com\/thebioengineer\/TidyX\/blob\/master\/TidyTuesday_Explained\/047-NHL_Win_Probabilities\/2020_NHL_Win_Prob_Optimizer.R\">CLICK HERE<\/a><\/span><\/strong>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This week, Ellis Hughes and I discuss using an optimization algorithm in R to find team strength ratings for the NHL 2019-2020 season. We show how to then use the results from these ratings to forecast the probability that one team wins over another while accounting for the home ice edge. Finally, we output the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[44],"tags":[],"class_list":["post-1958","post","type-post","status-publish","format-standard","hentry","category-tidyx-screen-cast"],"_links":{"self":[{"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/posts\/1958","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/comments?post=1958"}],"version-history":[{"count":2,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/posts\/1958\/revisions"}],"predecessor-version":[{"id":1961,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/posts\/1958\/revisions\/1961"}],"wp:attachment":[{"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/media?parent=1958"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/categories?post=1958"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/tags?post=1958"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}