Skip to content

Complete NHL heatmap case study - #17

Draft
alexanderthclark wants to merge 9 commits into
mainfrom
finish-nhl-heatmap-case-study
Draft

Complete NHL heatmap case study#17
alexanderthclark wants to merge 9 commits into
mainfrom
finish-nhl-heatmap-case-study

Conversation

@alexanderthclark

@alexanderthclark alexanderthclark commented Aug 9, 2026

Copy link
Copy Markdown
Owner

What changed

  • Replaces the unfinished NHL placeholder with a sourced, reproducible case study.
  • Adds an official season-end standings data fetcher and committed dataset.
  • Adds a conventional baseline heatmap and an artist-based narrative heatmap.
  • Selects six contrasting teams: Detroit, Tampa Bay, Nashville, Washington, Pittsburgh, and Chicago.
  • Restores the original expanding-bubble rule so radius grows with points percentage.
  • Uses Matplotlib's original C0 blue with points percentage also encoded through opacity.
  • Adds gold outlines to four Stanley Cup-winning team-seasons: Detroit in 2001-02 and 2007-08, Tampa Bay in 2003-04, and Pittsburgh in 2008-09.
  • Uses image labels for all six teams, extending the original Predators prototype.
  • Sources all six team marks from the same official NHL light-background asset family.
  • Explains how transparent-padding crops, a common maximum box, and a shared zoom make the marks roughly uniform—and why wide wordmarks such as Washington's may still need individual adjustment.
  • Stacks the lockout letters downward while keeping every glyph upright.
  • Restores the matter-of-fact figure title, “Hockey Regular Season Records,” while retaining the explanatory subtitle.
  • Removes the Penguins and Blackhawks callouts so the patterns emerge from the grid itself.
  • Rewrites the section with design rationale, interpretation, and focused code listings.
  • Authors both hockey figures in Poetry-Figure-Dev.ipynb and exports their concise modules with the notebook's existing savepy(...) pattern.
  • Uses the existing \pyfile command for the book listings; mycommands.sty is unchanged.

Why

The Poetry section promised a custom artist-based heatmap but ended as a work in progress with embedded, unsourced data. The first completion pass also replaced three intentional parts of the original design—variable bubble sizes, image labels, and upright vertical lettering—with fixed circles, text labels, and a rotated phrase. This follow-up restores that visual grammar while keeping the new reproducible data and narrative framing.

The selected teams create a balanced story around the lockout: Detroit is the sustained benchmark; Tampa Bay rises and falls; Nashville follows a steadier path; and Washington, Pittsburgh, and Chicago show three different rebuilds. The gold edges connect regular-season performance to the playoff outcome without changing the underlying size and opacity encodings.

The figure code now follows the book's established structure: the notebook contains the complete runnable workflow, while the exported Python modules omit shared imports, layout plumbing, and save commands after the standard #truncate marker.

Impact

Readers now get a complete before-and-after example using real NHL data. Bubble radius and opacity reinforce performance, gold edges identify championships, team marks make the rows visually distinctive, and the lockout annotation reads vertically without turning its letters sideways. The restored descriptive title identifies the subject directly, leaving the interpretive claim to emerge from the figure and surrounding prose. The prose also distinguishes mechanical image normalization from the perceptual adjustments a storyteller may still want to make.

Validation

  • Regenerated the NHL data from the official season-end API and confirmed it reproduces the committed CSV.
  • Verified the championship seasons against the NHL's official Stanley Cup winners records.
  • Ran both plotting cells successfully from the Poetry notebook.
  • Verified 54 proportional bubbles, exactly four champion outlines, six official NHL team marks, no lockout-season bubbles, upright lockout text, compact year labels, and no remaining callouts.
  • Verified both notebook cells match their concise savepy exports before #truncate.
  • Confirmed the three Python files compile, contain no pathlib/__file__ root discovery, and use direct paths consistent with the repository.
  • Confirmed tex/mycommands.sty is identical to main.
  • Built the full 195-page LaTeX book through final three-pass validation.
  • Rendered and visually inspected both figure PDFs and all affected book pages at print size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant