NHL Plots
06 Apr 2019
Reading time ~2 minutes
TL; DR
Here a few visualizations inspired by those found on https://www.icydata.hockey/. Generated using data pulled from the undocumented NHL API extracted using Python and plotted with Plotly. Specoial thanks to Drew Hynes (gitlab: dword4) for doing a significant amount of leg work in documenting the API.
Motivation
As a Zamboni driver at a small, local arena I have had the unique opportunity to view many, many ice hockey games of all levels and it has definitely rejunvenated my interest in the sport. In any case, in the process of trying to get caught up with the latest developments in the industry as far as the application of sports analytics is concerned I found a site which has several interesting visualizations (link). What I was particularly was the heatmap of all goals and shots that is published on the site, mainly because, growing up, I was always told to defend/attack “the house” and these visualizations seem to, in part, challenge this convention. For those unfamiliar with hockey, the house is a specific area in front of the net where the majority of goal scoring opportunities occur. However, this area is large and it seems to mean that any potential refinement in the size of the area, would be beneficial to everyone on a team, as it gives offensemen a small target to look for and defensemen as small area to protect. Lastly, the visualizations I found on the site above all use Tableau which is a good peice of software but it is also protected and copyright protected. Even the open projects are restrictive in terms of core data access and customization features. So, as an ancillary benefit, the code used in this analysis could also serve as an open source replacement for the ones constructed in Tableau.