Free course · Intermediate · 4 parts · ~36 min

Hockey & Cross-League Projects

Three NHL builds — shots, leaders, form — then the capstone: measuring home advantage across five leagues at once.

A short project course. Three NHL builds cover the working rhythm of hockey data — plot shot locations on a rink you draw yourself, chart the scoring leaders, track team form as a rolling time series — using the NHL's keyless public API with bundled offline samples.

Then the capstone widens the lens: one analysis, five leagues, asking whether home advantage is a constant of team sports or a local custom. It's the site's best example of a question you can only answer because you learned to pull all the data sources.

What you'll be able to do

  • Pull and plot NHL shot and scoring data on a rink you render
  • Read team form with rolling goal differential
  • Run one method across five leagues and compare like with like
Download the course bundle - every script + dataset, one ZIP

The bundle contains each part's finished script, the shared helpers, and the sample data they read, with a README listing the run order - the whole course works offline.

The syllabus

Pace: Four sittings, in order - the capstone assumes the pull skills from the other courses.

  1. Build a Shot-Location Plot for an NHL TeamIntermediate · ~8 minDraw the rink, place real shots - hockey's canvas chart.
  2. Build an NHL Goal-Scoring Leaders ChartIntermediate · ~8 minFrom raw pull to a publishable leaders chart.
  3. Track a Team's Form: Rolling Goal DifferentialIntermediate · ~9 minForm as a time series - the trend behind the streak.
  4. Same Question, Five Sports: Quantifying Home Advantage Across LeaguesAdvanced · ~11 minThe capstone: one method, five leagues, a real comparative answer.

Check yourself

Five questions, graded on the page, nothing recorded anywhere - pick an answer and the explanation appears.

1. Rolling goal differential smooths…

2. Why compare home advantage across leagues as a rate rather than raw home wins?

3. Drawing the rink to scale matters because…

4. The NHL's public stats API requires…

5. A team on a long win streak whose rolling goal differential is flat is…

Where next: Working with Real Sports APIs · Statistics for Sports Data.