4 tutorials

Hockey

The NHL's public API needs no key. Pull standings and play-by-play, then plot shots on a rink you draw yourself.

Start with the NHL public-API pull — it needs no key — then the shot-location tutorial, which teaches you to draw the rink every shot plot needs. The rolling goal-differential build shows you how to read team form as a time series, and the scoring-leaders chart closes the loop from raw pull to publishable figure. Together the four cover the whole working rhythm — pull, plot, trend, rank — and each runs offline on its bundled sample data if the live API is down. It's the site's shortest track by design: master these four and the basketball track's shot-chart and rating methods transfer to hockey almost line for line.

Level:
One team's shot attempts plotted on a drawn rink from real play-by-play.
Hockey Intermediate

Build a Shot-Location Plot for an NHL Team

Pull a game's play-by-play from the NHL API, draw a rink in matplotlib, and plot one team's shot attempts in rink coordinates to see where they attack from.

~8 min
A clean leaderboard of the season's top goal scorers.
Hockey Intermediate

Build an NHL Goal-Scoring Leaders Chart

Use the NHL's stats-leaders endpoint to pull the top goal scorers, shape the nested JSON into a tidy table, and build a leaderboard chart with each player's team.

~8 min