Unveiling the National Hockey League (NHL) Play-by-Play App!
The NHL PBP App is your #1 destination for interactively visualizing shot data for all games in the 2017-2018 NHL season. Using real-time scoring stats (RTSS) from Corsica Hockey, see all the shot locations on the official NHL ice rink embedded with your team logo, enjoy a gganimate animation of each shot, and even find out where your favorite player took all his shots.
gganimate rendered animation of all shots + animated line graph of all the probabilities that a shot becomes a goal throughout the game (please be patient as this takes a few seconds to load).
Using shinycssloaderspackage, I've added css animated loaders to all my plots.
Depending on game selection, I've embedded team logos on the official NHL ice rink in the animation and shot chart.
iframe generated webpage of Official Recap of each game
Using the rintrojspackage, I've included a short tour of the application.
Access to 10+ seasons of shot data & this season (2018-2019) updated daily at 11:00AM EST
Interactive Shot Chart for in-depth info(shooter, type of shot, distance from goal, and expected goal probability) using plotly
Took out adjustment for puck size feature
Throughout this update process, I learned to use crontab to schedule running R scripts, use reactives inside the server Shiny code to reactively load datasets, and embedding images in plotly graphs
The NHL animation is really fascinating. Did you actually crawl the NBA API or does it allow enough requests such that you can do it live inside the app? This was one of the main problems in my app, as the STRAVA API I used is really restricted.
I actually didn't use the NHL API since I have the raw csv file on hand. So, I simply hosted all the data on Github and used a reactive function to call each season depending on the user's selection. For current season, I use crontab to automatically upload the dataset to the app.