Can NHL players be miscast in their roles? Are some defenders really attackers in disguise?
This project explores NHL Role Crossovers using data-driven visualizations and machine learning techniques.
While watching the Florida Panthers vs. Toronto Maple Leafs series, something caught my attention during Game 5. Panthers’ defensemen Aaron Ekblad and Dmitry Kulikov scored back-to-back opening goals — a moment commentators noted as a first in NHL history.
That (sad) moment made me wonder:
“Defensemen scored the opening goals of this game, so are there any defenders better suited as forwards? Are teams underutilizing players by locking them into rigid roles?”
Those questions kicked off this project.
To understand potential role crossovers, we examined how offensive and defensive players differ statistically:
- Offensive players score more goals and take more shots on target.
- Assist rates are relatively similar, though forwards have a larger distribution.
- Defenders tend to have more time on ice and more positive goal differentials, possibly due to their presence in critical moments.
- Point totals skew heavily toward offensive players, though a few standout defenders blur the line.
To identify players who may be miscast in their roles, we used K-Means clustering on core player stats. This unsupervised learning method grouped players by statistical similarity, regardless of their listed 'position.'
- 4 defenders were grouped with offensive players.
- 5 forwards were grouped with defenders.
These clusters may suggest untapped flexibility in team strategies or underutilized talent.
Here are a few players who defy traditional roles:
- Cale Makar (D): One of the league’s top goal scorers, despite being a defender.
- Jake Sanderson (D): Statistically mirrors elite forwards; could thrive in a more offensive role.
- Dylan Cozens (C): Clustered with defenders, not due to defensive skill, but a weaker offensive season.
- Fabian Zetterlund (C): May have been grouped with defenders due to his high positive goal differential, and, as a center, could be filling in defensive gaps.
We also built a k-Nearest Neighbours (k-NN) similarity graph to explore player playstyle resemblance.
- Most defenders are similar to other defenders — and likewise for forwards.
- Players from the same team don’t necessarily play alike.
- Cale Makar again shows strong ties to offensive players.
- Jake Sanderson displays hybrid similarity, supporting his flexible profile.
One key limitation was the limited stat coverage available from the NHL website’s player tracking data. This restricts how robust our clustering and similarity analysis can be.
Observing this specifically:
- Dylan Cozens may have been grouped with defenders due to weak offensive stats, not strong defensive stats.
- He shares similar "statistical weaknesses" with defenders but lacks true defensive indicators.
- His most similar players (via k-NN) were all forwards, highlighting the flaw in clustering logic.
By analyzing performance beyond mere positional labels, this report uncovers players whose roles may be optimized or reimagined. Some defenders play like offenders, and some forwards could could thrive in defence.
As NHL teams continue to embrace analytics, we may see lineups evolve based on performance profiles — not just tradition.
And hey, maybe Ottawa can win the next Battle of Ontario with a few bold role swaps.
(though probably not 😅)
- Python
- pandas, scikit-learn, matplotlib, seaborn
- NHL Public API
🚀 This project is open-source! Contributions, suggestions, and innovative ideas are all welcome — feel free to fork, clone, or submit a pull request if you want to build on it.