NHL Play-by-Play R Shiny App

[This article was first published on Data Twirling » R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

I wanted to write a quick post to introduce two repos that I created on Github that center on the NHL’s play-by-play data.

1.  My code repo that highlights how I crawl and store the raw JSON datasets can be found here

2.  I also created a very simple R Shiny App.  That repo is here.

In both cases, the codebase has a lot of room to improve.  The Shiny app is a poor-man’s version of the icetracker viz that can be found on the NHL website.   I really want to refine the Shiny App.  It is the first that I have created, so please keep that in mind when offering feedback.

With that said, I have fit a predictive model that estimates “Shot Quality”, which is simply the predicted probability of a shot going into the net.  In the future, I plan on writing longer posts to introduce each repo individually and bring forward how the play-by-play datasets can allow us to do more advanced analyses beyond the basic boxscore.

For now, feel free to clone the Shiny Repo and and fire it up in your browser while you watch Game 1.

Here is a screenshot of the super-basic app…..

 

pbp-shiny-scerenshot

To leave a comment for the author, please follow the link and comment on their blog: Data Twirling » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)