An Introduction to R With Hockey Data

I have written a couple articles over the past few months on using R with hockey data (see here and here), but both of those articles were focused on intermediate techniques and presumed beginner knowledge of R. In contrast, this article is for the complete beginner. We’ll go through the steps of downloading and setting up R and then, with the use of a sample hockey data set, learn the very basics of R for exploring and visualizing data.

One of the wonderful things about using R is that it’s a flexible, growing language, meaning that there are often many different ways to get to the same, correct result. The examples below are meant to be a gentle introduction to different parts of R, but please know that this really only scratches the surface of what’s available.

The code used for this tutorial (which also includes more detail and more examples) is available on our Github here.

Downloading R and Getting Set Up

Continue reading

A crowdfunding initiative to promote diversity at the Columbus Analytics Conference

I’ve been fortunate enough to be able to attend the last three years of the RIT Sports Analytics Conference. The first year I went, I was nervous to meet people whose work I admired. I was afraid that nobody would want to talk to this new person that few people knew and who was just starting to learn about the field. 

I could not have been more wrong. 

Continue reading

Exit Types Don’t Affect Entry Quality (Much)

Last time, we saw that a team exiting its defensive zone with possession is much more likely to enter their offensive zone. Do the advantages end there, or do possession exits also improve the quality of zone entrances? Perhaps leaving the defensive zone with possession makes it easier to keep possession as they enter the offensive zone, and that leads to more shots per entry. Maybe pass-outs create space for more passes in the offensive zone, which improves shot quality.

It turns out that there is not much of a difference in entry quality by exit type; exiting with possession makes it more likely to gain the offensive zone, but the advantages quickly dissipate. That said, there are some interesting variations in how those zone entries play out. The differences are small enough that they could be random chance, but it’s worth taking stock of what we know with the data we have.

Continue reading

Evaluating Nordic Drafting – A Potential Market Inefficiency

Over the last decade, teams have taken significant steps to improve their NHL entry draft approach. To do this, a number of teams have bolstered their analytics staff to identify the current “gaps” in prospect scouting. Whether it’s the Detroit Red Wings being the first team to dive head first into drafting Russian players, and then later Swedish players, or the Tampa Bay Lightning prioritizing small, skilled forwards, teams are looking for any available edge. More recently, the Pittsburgh Penguins have put a premium on overage players, as Namita Nandakumar found that overage players make the NHL faster. What’s the next big market inefficiency?

Continue reading

Projecting NHL Skater Contracts for the 2019 Offseason

We recently released the final version of our contract projections for the 2019 NHL free agent class (they can be found here). Our initial projections went up in mid-April, and even though it’s only been a few weeks, we’ve had numerous questions about how the model was designed, how it works, what it means, etc. I thought we might be able to answer all the questions about it on twitter, but alas it was just a dream. A quick recap: this is our third year doing contract projections for the NHL offseason. While the model/projections this year may seem quite complicated, our first version was very simple: a few catch-all stats and a linear regression model to predict salary cap percentage (cap hit / salary cap). We use cap percentage to keep salaries on the same level as the salary cap changes. Over the last few years, we’ve developed a few new methods, and this year we took quite a bit of inspiration from the method Matt Cane used for his 2018 NHL offseason salary projections.

Continue reading

Statement from Hockey-Graphs about Jason Baik

On Wednesday Night, Hockey-Graphs became aware that one of our contributors, Jason “jsonbaik” Baik, had been convicted of Sexual Assault in Allegheny County, Pennsylvania (Pittsburgh). To be utterly clear, Hockey-Graphs condemns these actions absolutely. Upon becoming aware of this horrible news, we have terminated our relationship with Mr. Baik and all contributions from Mr. Baik have been removed from this site.

We here at Hockey-Graphs wish to express our support for those who have been victims of Sexual Assault, Rape, or related crimes. As such, we encourage our readers to support organizations dedicated to help support victims of such heinous acts. If you can, please consider a donation to National Organizations like the Rape, Abuse & Incest National Network (RAINN) or local organizations such as the Pittsburgh Action Against Rape (PAAR) and the Women’s Center and Shelter of Greater Pittsburgh.

Sincerely,

Hockey-Graphs Editorial.

Continue reading

Visualizing Goaltender Statistics Through Beeswarm Plots

A picture is worth a thousand words. Yes, it’s a cliché, but when it comes to visualizing data, an individual can tell a story via the choices they make when presenting their data. One of the most common visualizations is a plot showcasing the frequency and distribution of an event. Data like this are often presented in a histogram or box-and-whisker-plot. However, a limitation of both of these types of plots is that neither shows the individual where each data point falls. On the other hand, a beeswarm plot allows the user to see where each individual point falls across a range. A random jitter effect is applied to maintain a minimum distance between each point to minimize overlap.

Inspired by the wonderful graphs from Namita Nandakumar and Emmanuel Perry, I thought I would attempt to visualize how goaltenders have fared in goals saved above average over the course of their careers.

Continue reading