ShiftChart101: Visualizing matchups

This is the third post in a series on using to gain insight into hockey games.  It is not necessary to read the previous posts to make sense of this one, though it may be helpful.

One of most fascinating aspects of the NHL playoffs is the repeated matchups showcased between elite players in a Best-of-7 format.  A “matchup” is a strategy by which a coach designates certain players from his team to be used against opposing star forwards with the intent of keeping them off the score sheet.  Because each team has four sets of forward lines and three pairs of defensemen in constant rotation, executing specific matchups mid-game requires vigilance from the coaching staff and players.

ShiftChart provides a visual way to identify a coach’s matchup strategy.  I’ll illustrate its use by focusing on the most conspicuous shutdown player in the league, Zdeno Chara of the Boston Bruins.  At 6’9″, Chara receives special dispensation from the NHL to use a longer stick than allowed in the rulebook.  Had the Slovak been born in a different era, I picture him a warlord wielding a mace topped with the Hart Memorial Trophy, easily besting Wilt Chamberlain’s Bombaata in 1-on-1 combat.

In addition to Chara, Boston is further blessed with perennial Selke Trophy (for best defensive forward) finalist, Patrice Bergeron.  Armed with these elite shut down pieces, Bruins coach Claude Julien liberally employs matchups to stymie opposing teams’ stars.

Detroit Red Wings vs. Boston Bruins Game 1 – 4/18/14

The Detroit-Boston first round series is an ideal setting for visualizing matchups.  With Red Wings’ star Henrik Zetterberg out of the lineup due to injury (until Game 4), Detroit would have to lean heavily on player-magician Pavel Datsyuk.

Below is a ShiftChart screenshot from Game 1.  The shift rectangles form near-perfect Jenga columns; even without highlighting the aforementioned players, it’s clear a matchup is being employed.

Red Wings vs. Bruins, Game 1.

Red Wings vs. Bruins, Game 1.

For a more thorough evaluation, it’ll be easier if we arrange the players of interest side-by-side.  Click on Datsyuk, Chara, Bergeron (in that order.  I’ll explain).  Then from the Compare menu, select Shifts:

Compare -> Shifts

This will slide the selected players next to one another in the order they were clicked.  If you did not select the players in that order, you’ll need to de-select and re-select them (an improved drag-and-drop approach is in the works!).

Comparison of Datsyuk, Chara, and Bergeron's shifts in Game 1.

Comparison of Datsyuk, Chara, and Bergeron’s shifts in Game 1.

Arranged this way, although it’s clear that Chara and Bergeron are on the ice against Datsyuk frequently, you can also see the occasional missed matchup.  In the 2nd period around the 24 minute mark of the game, Datsyuk gets a shift away from Chara but not Bergeron.  Also, there are instances where even though the matchup is executed, there is “slop”: Datsyuk is free of Chara and/or Bergeron at the beginning or end of a shift.

[Aside: I can’t imagine how tiring this must get—Datsyuk basically sees the same 5 guys against him all game, all series… Half the Bruins roster is irrelevant to him!]

Two lesser-known aspects of the NHL game that affect matchup execution:

  • The home team coach has an embedded advantage in this chess match via the “last change” rule: after a whistle (other than for icing), the away team players must be sent on to the ice first.  The home team coach is then allowed to deploy the players he wants.
  • The second period is the period of the “long change” where, due to goalies switching ends, teams’ benches are further away, making on-the-fly substitutions more difficult to execute.

ShiftChart captures face offs as well.  Clicking on this option from the Layers gearbox menu will overlay every face off, colored by which zone it took place in: solid black for Boston, dotted red for Detroit, fuchsia for neutral zone (hey, we needed a color that was clearly different than every team color!).

faceoffs layer

Hovering over a face off line brings up the zone in which the face off took place and which player won:

Detroit Boston gm 1 faceoffs

With this additional information and keeping in mind the “last change” rule, coach Julien’s intentions are unambiguously revealed.  We can also see that the instance in which Datsyuk escaped the Chara matchup was not during a stoppage of play in the second period.

So if you’re Boston coach Julien, all good, right?  Until this happens with 3 minutes left in the game:

Unreal.  Phenomenal.  If you have a young child learning to play hockey, show this video to him/her to watch and study.  TV time is over, but you may watch this.  This is hockey greatness.

How about some numbers?

So you’re convinced there is a matchup and you want to see some numbers, because saying “from the chart, it looked like…” is not compelling enough.  Instead, you want to say, “Chara was on the ice for 90% of Datsyuk’s even strength shifts.”  The video below shows the behavior when you click Compare —> Total TOI.

The resulting visuals are divided into two sections: a top section, which uses the area of the shift chart, and a bottom section, which brings up completely new graphics.

Top section: total time on ice (TOI) comparison

Note the animation.  The shifts are first stacked, as if to calculate and display total time on ice (TOI).  But upon completing a total TOI bar for each player, the bars for Chara and Bergeron are sliced and slid out to produce the following formation:

Red Wings vs. Bruins, Game 1. Comparison of Chara and Bergeron to Datsyuk.

Red Wings vs. Bruins, Game 1. Comparison of Chara and Bergeron to Datsyuk.

The information is best understood by eyeing the chart vertically, noting “columns” of where the bars overlap and where they do not.

    • Datsyuk’s bar is the usual total TOI.  Nothing new.
    • Chara’s 22:05 total TOI is split into two segments:
      1. a 13:24 piece which overlaps with Datsyuk.
      2. a 8:41 piece that does not (no Datysuk).
    • Bergeron’s is more complicated, because his 17:45 ice time is compared to both Datsyuk and Chara. There are four pieces:
      1. a 10:03 piece for which all three players are on the ice.
      2. a 2:33 piece where Bergeron is on with Datsyuk only (no Chara).
      3. a 2:05 piece with Chara only (no Datsyuk).
      4. a 3:04 piece for which neither of the other two players are on the ice.

Selecting players in a different order would preserve the total time on ice for each player but change where the bars are sliced and shifted.  This is why selection order matters.  Two final comments on this top section:

      1. The animation to create the sliced bars attempts to adhere to our principle of “Make the data believable”, discussed in our second post.  By first creating the total TOI bar, we believe it’s easier for the user to accept the final segmented formation because he can see that they were all assembled from the original shift rectangles.
      2. Despite lacking the ooh-aah form factor of the charts in the bottom section, this visualization actually captures every possible two-way and three-way comparison of selected players (and more-way, if more players selected).  From the result, one can do calculations like: Datsyuk was away from both Chara and Bergeron for: 19:32 – (13:24 + 2:33) = 3:35, something not easily calculated otherwise.

Bottom section: detailed breakout by period and strength

The bottom section is itself split into two parts, the top for comparing overlapping shifts, the bottom for comparing time on ice.

Comparison of shifts and ice time, Datsyuk vs. Chara and Bergeron.

Comparison of even strength shifts and ice time, Datsyuk vs. Chara and Bergeron.

In fact, these two sections are calculated independently, for reasons I will get into shortly. Both are structurally the same: a bar chart shows how much of Datsyuk’s shifts/TOI the other skaters are on the ice for, and two filter doughnuts to allow the user to specify period and strength.  Clicking on any of the slices will filter the bar charts accordingly.  Note that the doughnuts reflect Datsyuk’s shift/TOI allocation and not the other players’.

Typically, an analyst is interested in even strength shifts, since special teams have dynamics entirely their own.  In the screenshot above, I’ve filtered by “EV” for both sets of charts.  From this, I can finally declare, “Chara was on the ice for 90% of Datsyuk’s 20 even strength shifts and 78% of his 16:51 even strength TOI.”  (I get the 20 shifts/16:51 by hovering over Datsyuk’s shift/TOI bars).  It’s always interesting to see how this changes in the period of the “long change”: these numbers fall to 83% and 67%, respectively.  While it’s not unusual to see 90% in overlapping EV shift counts, it’s difficult to get 80% in overlapping EV time on ice.

The “Mixed” category in the strength doughnut warrants further explanation: hovering over this slice of the doughnut shows three such shifts for Datsyuk.  These are in fact power play shifts, but the shifts had portions of even strength as well, resulting in this “Mixed” label.  If a shift was fully contained in the power play, it would have been designated “PP”.  By contrast, the TOI charts do not need a “Mixed” category since every second of Datsyuk’s ice time can be categorized as “EV” or “PP”.

So which is more useful, overlapping shifts or time on ice?

It depends on the question.  The reason the overlapping TOI charts show lower percentages is because of the “slop” alluded to earlier: if Datsyuk gets on the ice and  Julien wants to respond by sending out Chara but isn’t able to do so (perhaps the puck is in the Boston zone), how should this be treated from a matchup-scoring perspective?  Eventually the matchup is made, so that should be noted.  At the same time, if Chara is not able to get on the ice for 20 seconds, that isn’t a well-executed matchup.

At the risk of oversimplifying, I will say the charts for overlapping shifts better measures the “intended matchup” and the overlapping time on ice charts measure the “realized matchup”.  When trying to identify a coach’s shutdown strategy, the overlapping shifts is likely more relevant.  But if trying to assess a home team coach’s ability to get his star forward away from the opponent’s shutdown players, the overlapping ice time might be more relevant.  Neil Greenberg of the Washington Post wrote about an instance of the latter case involving Ryan Getzlaf in the Anaheim-LA series.

Here are are some recent uses of ShiftChart for matchup analysis from these playoffs:

      • Kings’ Anze Kopitar has matched up well with just about everyone in Stanley Cup playoffs —Greenberg, Washington Post (link)
      • Examining Toews-Kopitar playoff matchup —Craig Custance, ESPN Insider (link)
      • Blackhawks-Kings could turn on battle of top lines —Brian Hedger, (link)

Welcome to the fascinating world of in-game hockey strategy!




1 thought on “ShiftChart101: Visualizing matchups

  1. Pingback: ShiftChart 101 (Part 1): Abstraction of a hockey game | lolo data

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s