<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by JJ Lee on Medium]]></title>
        <description><![CDATA[Stories by JJ Lee on Medium]]></description>
        <link>https://medium.com/@thinkingjustin?source=rss-c6cc51437ec1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*7hH5WbqBzClGt3UrE_uVyQ.png</url>
            <title>Stories by JJ Lee on Medium</title>
            <link>https://medium.com/@thinkingjustin?source=rss-c6cc51437ec1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 02:14:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@thinkingjustin/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[A New Home on Substack]]></title>
            <link>https://medium.com/@thinkingjustin/a-new-home-on-substack-cba0bd4d5253?source=rss-c6cc51437ec1------2</link>
            <guid isPermaLink="false">https://medium.com/p/cba0bd4d5253</guid>
            <dc:creator><![CDATA[JJ Lee]]></dc:creator>
            <pubDate>Sun, 08 Nov 2026 22:06:16 GMT</pubDate>
            <atom:updated>2026-11-08T22:06:16.713Z</atom:updated>
            <content:encoded><![CDATA[<p>To everyone who has followed and read my writing here on Medium and repository on Github: thank you.</p><p>Moving forward, I am transitioning my primary writing space to Substack to keep all my deep-dives and technical walkthroughs in one direct feed.</p><p><a href="https://rinklytics.substack.com/?utm_campaign=pub&amp;utm_medium=web">JJ | Substack</a></p><h3>What Stays the Same</h3><ul><li>Open Source: Everything remains free to read. The code, models, and technical explorations (including extensions to my public <a href="https://github.com/justinjjlee/nhl-analytics">GitHub repositories</a>) will stay accessible to everyone without paywalls.</li><li>The Focus: The core subject matter isn’t changing — expect continued deep dives into sports analytics, statistical methods, and applied machine learning.</li></ul><h3>Supporting the Work</h3><p>All core content will remain free. However, researching data sets, designing and creating open-source data- and codebases, and writing breakdowns takes dedicated time outside of day-to-day work (even with the extensive help from genAI). If you find value in the analyses and tools I share, please subscribe to my Substack and/or paid subscriptions on Substack and star my Github repository.</p><p><a href="https://rinklytics.substack.com/?utm_campaign=pub&amp;utm_medium=web">JJ | Substack</a></p><p>Existing pieces will stay up on Medium as a reference archive. I hope to see you over on Substack for the next round of analyses!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cba0bd4d5253" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bumping On Purpose: What Happens After The Hits]]></title>
            <link>https://medium.com/@thinkingjustin/bumping-on-purpose-what-happens-after-the-hits-4e68e929a84d?source=rss-c6cc51437ec1------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e68e929a84d</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[streamlit]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[nhl]]></category>
            <dc:creator><![CDATA[JJ Lee]]></dc:creator>
            <pubDate>Tue, 20 Oct 2026 03:48:24 GMT</pubDate>
            <atom:updated>2026-10-20T03:48:24.268Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N6sO_DzvnddU9JdJa0o5Bg.png" /><figcaption>Rinklytics Visualizations of Events After Hits</figcaption></figure><p>Understanding the complex mechanics of physical play (physically (and legally) hitting opposing player(s) through body checks) in hockey requires moving beyond high-level box scores and dissecting the nuance of play-by-play telemetry. I developed a framework to analyze sequential data following each hit to measure its impact on subsequent plays and overall game outcomes. This article outlines the underlying methodology, data pipeline, and initial empirical findings.</p><h3>Data Pipeline &amp; Exploratory Framework</h3><p>The foundational step in analyzing physical contact involves ingesting raw play-by-play data of each game (publicly made available by National Hockey League (NHL)) and transforming them into structured sequential chains. As detailed in the project’s <a href="https://github.com/justinjjlee/NHL-Analytics/blob/main/dev/decision_science/hit_eda/EXPLORATORY.md">Exploratory Analysis Documentation</a>, the processing pipeline focuses on several core objectives:</p><ul><li><strong>Sequence Chain Extraction: </strong>Mapping every body check to its immediate subsequent events (Steps +1 through +4) to measure possession transitions and action latency.</li><li><strong>Spatial Contextualization: </strong>Segmenting events by rink zones (Defensive, Neutral, Offensive) to isolate forechecking pressure from defensive containment.</li><li><strong>Downstream Impact Measurement: </strong>Tracking 30-second post-hit shot and goal dynamics to evaluate whether hits create offensive opportunities or expose defensive vulnerabilities.</li></ul><h3>Interactive Visualization &amp; Tactical App</h3><p>To make these insights presentable and insightful, the interactive dashboard with pre-set analyses are created on <a href="https://huggingface.co/spaces/jjerlee/rinklytics">Hugging Face Spaces (Rinklytics)</a>. See <em>Impact on Hits</em> (or <em>Impact des mises en échec</em>) page. Through the tab Exploratory (EDA) tab, users can dynamically filter hit sequences, explore spatial heatmaps, and evaluate team-specific physical tactics.</p><h3>Summary &amp; Key Takeaways</h3><p>This exercise analyzed almost 660,000 hits made during the last decade, 2015–2026 seasons. The main takeaway is that hits are <strong>primarily defensive containment mechanisms rather than reliable possession generators</strong>. A layer underneath, I observe an interesting asymmetric trend, the difference on where that hit was performed — on your own zone as defensive posture or while you are in the offensive zone. While offensive forechecking hits create real tactical value, defensive body checks often leave players out of position and vulnerable to immediate counter-attacks.</p><ul><li><strong>Forechecking Hits Drive Offensive Possession: </strong>Offensive zone hits recover the puck 54.2% of the time and yield positive shot differentials (+2.33 net SOG/100 hits), making physical forechecking an effective tool for forcing turnovers.</li><li><strong>Defensive Zone Hits Carry High Risk: </strong>Defensive zone hits lead to puck recovery in only 40% of instances and result in a severe shot deficit (-7.63 net SOG/100 hits), as attacking teams retain offensive zone pressure over 60% of the time.</li><li><strong>A Great Defensive Effort: </strong>80.2% of defensive hits facilitate a clean breakout of their own zone.</li></ul><h3>Looking Ahead: Beyond the Immediate Impact</h3><p>Understanding the complete tactical footprint of physical play requires extending our analysis further down the sequence chain. Physical contact creates ripple effects that extend well past the initial reaction window, shaping spatial positioning, defensive coverage shifts, and multi-step possession flow across subsequent play steps (+2 through +4).</p><p>Further understanding the sequential impact is important in measuring performance with depth of contexts required for unbiased aggregated measure. Such simplified methodological approaches already exist, like xG and GSAx (expected goals and goals saved above expectation) which embeds more context to the one-dimensional shot attempts and saves made. Analyzing and implementing the impact of hits will be an interesting and helpful approach.</p><p>Future phases of this analytical framework will model these multi-event chains to evaluate cumulative possession outcomes, zone transition efficiency, and long-horizon goal-probability shifts. By tracking how a single body check cascades through extended play sequences, we can move from immediate event telemetry toward a comprehensive model of physical impact across full offensive and defensive possessions.</p><p>💻 GitHub Repository &amp; Pipeline Code: <a href="https://github.com/justinjjlee/NHL-Analytics">https://github.com/justinjjlee/NHL-Analytics</a></p><p>🤗 Interactive Rinklytics App (Hugging Face): <a href="https://huggingface.co/spaces/jjerlee/rinklytics">https://huggingface.co/spaces/jjerlee/rinklytics</a></p><p>🤗 Hugging Face Dataset: <a href="https://huggingface.co/datasets/jjerlee/nhl-analytics">https://huggingface.co/datasets/jjerlee/nhl-analytics</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e68e929a84d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[New to Hugging Face: Migrating to Space and Dataset for Scalable Analytics]]></title>
            <link>https://medium.com/@thinkingjustin/new-to-hugging-face-migrating-to-space-and-dataset-for-scalable-analytics-b3c4fadaaff2?source=rss-c6cc51437ec1------2</link>
            <guid isPermaLink="false">https://medium.com/p/b3c4fadaaff2</guid>
            <category><![CDATA[sports]]></category>
            <category><![CDATA[hugging-face]]></category>
            <category><![CDATA[sports-analytics]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[nhl]]></category>
            <dc:creator><![CDATA[JJ Lee]]></dc:creator>
            <pubDate>Sun, 18 Oct 2026 04:53:01 GMT</pubDate>
            <atom:updated>2026-10-18T04:53:01.711Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VpZJXdJK3i1SfT5bbtq4XA.png" /><figcaption>Hugging Face — New home to Rinklytics &amp; Database</figcaption></figure><p>As my Rinklytics application grows in scope, traditional hosting environments in open-source repositories have hit their limits. Further expanding data visualization capabilities and incorporating real-time advanced analytics or Large Language Model (LLM) features is no longer feasible on Streamlit Community Cloud nor Github Pages.</p><p>Consequently, I have migrated all application assets and data hosting to Hugging Face. Below, I outline how these assets are organized and consolidated to enable the scalability, robust database capabilities, and infrastructure needed to future-proof LLM-integrated applications.</p><ul><li><strong>Scalability &amp; Performance:</strong> Streamlit Community Cloud works well for lightweight prototypes, but growing app complexity and heavy AI workloads demand a more robust backend. <em>Hugging Face Spaces</em> provides the computational overhead required for modern applications.<br>Hosting Streamlit: Standard Streamlit hosting on Hugging Face requires a Pro subscription; currently, I am hosting via ZeroGPU Gradio. See the repository for further details.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r3ZQg2221rWxNMMH2RqbOA.png" /><figcaption>Rinklytics on Hugging Face Spaces</figcaption></figure><ul><li><strong>Unified Data Hosting:</strong> Rather than relying on static tabular files in GitHub, migrating to a Lakehouse architecture using <em>Hugging Face Datasets</em> keeps data centralized, reliably updated, and synchronized with automated data pipelines. On the backend, I leverage <em>Hugging Face Datasets</em> along with <em>Databricks Unity Catalog</em> for private compute capabilities.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4CjX0P06LTpq_sBPlyxSsg.png" /><figcaption>Rinklytics Database on Hugging Face Datasets</figcaption></figure><ul><li><strong>Loads of Help from Gemini — AI-Driven Engineering:</strong> As a first-time Hugging Face user, I used Gemini 3.8 and 4.0 to navigate the Hugging Face Command Line Interface (CLI).<br>The application is setup on <em>Hugging Face Spaces</em> (running Streamlit within ZeroGPU) and the repository migration were designed by me, executed with Gemini’s assistance, and validated through QC processes.<br>For <em>Hugging Face Datasets</em>, I configured (1) a one-time setup to pull aggregated historical data into .parquet format and initialize the dataset, and (2) a GitHub Action workflow to fetch data from the Lakehouse and apply incremental updates. While functional, this workflow can be further streamlined into a single pipeline to reduce compute usage and maintain consistency across data sources.</li></ul><p>Explore the live projects and documentation:</p><ul><li>View the interactive application on the<a href="https://huggingface.co/spaces/jjerlee/rinklytics"> Rinklytics Space</a>.</li><li>Access the underlying data via the<a href="https://huggingface.co/datasets/jjerlee/nhl-analytics"> NHL Analytics Dataset</a>.</li><li>Review the technical implementation in the<a href="https://github.com/justinjjlee/NHL-Analytics/tree/main/deploy/huggingface"> GitHub Deployment Documentation</a>.</li></ul><h3>Future Takeaways</h3><p>This migration allows me to easily scale and, in future, build AI-enabled measurements and insights capabilities. Combining robust data pipelines with AI-assisted engineering hopefully enables one-of-a-kind open-source hockey analytics capabilities.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b3c4fadaaff2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Betting Market for Hockey: The Math Behind the Luck]]></title>
            <link>https://medium.com/@thinkingjustin/the-betting-market-for-hockey-the-math-behind-the-luck-dcc8e33e47b4?source=rss-c6cc51437ec1------2</link>
            <guid isPermaLink="false">https://medium.com/p/dcc8e33e47b4</guid>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[nhl]]></category>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[sports-betting]]></category>
            <dc:creator><![CDATA[JJ Lee]]></dc:creator>
            <pubDate>Tue, 01 Sep 2026 01:46:39 GMT</pubDate>
            <atom:updated>2026-09-01T01:46:39.919Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>Strip Out the Home-Ice Bump, and What’s Left Is a Coin Flip</em></h4><blockquote>We strip away house margins used by the sports gambling for NHL to prove that consistent, profitable wagering is driven more by luck than any predictive skill.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7jbi_hkvtK-shY73dlcykQ.png" /><figcaption>SOURCE: Jared Wickerham <a href="https://www.nytimes.com/2013/06/25/sports/hockey/blackhawks-defeat-bruins-for-stanley-cup.html">https://www.nytimes.com/2013/06/25/sports/hockey/blackhawks-defeat-bruins-for-stanley-cup.html</a></figcaption></figure><h3>Stripping the House Cut</h3><p>Bookmakers don’t post true win probabilities. They embed a margin — the vig — that guarantees profit regardless of outcome. A line showing Team A at 60% and Team B at 45% sums to 105%; that 5% gap is the house’s cut. Every number a bettor sees is inflated.</p><p>To find what the market actually believes, we apply two corrections borrowed from financial economics. The first — the Shin correction — mathematically strips the margin and recovers each team’s genuine implied win probability. The second — BORS (Balanced Overround Removal System) — distributes the removal proportionally so neither team is over-adjusted. Together, they answer a simple question: before the house takes its cut, what does the collective bet actually say about who should win?</p><p>From that corrected baseline, we build a market-adjusted ELO rating — a team quality score graded not by wins and losses, but by how much each team beats or misses the corrected consensus. A win the market fully expected earns nothing. A win against the odds does. As I showed in<a href="https://medium.com/@thinkingjustin/when-hot-streaks-are-just-expected-wins-in-hockey-fc5f856a268f"> When Hot Streaks Are Just Expected Wins</a>, raw win-loss records don’t separate good teams from lucky ones — this approach does.</p><h3>Strip Out The Home-Ice Blanket As Well</h3><p>The market doesn’t price what it doesn’t know. It pads based on a well known likelihood instead.</p><p>To find the padding, we optimize two independent ELO systems against historical NHL results and look for the home-team bonus each settles on. Both land on the same number: <strong>+7.15 percentage points</strong>. Two independent methods, one answer — the market applies a fixed structural bump to every home team, regardless of matchup, opponent quality, or where we are in the season.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fgOhlO4lfIZRQc53aOoAdA.png" /><figcaption>Image for Illustration (Image generated using Gemini)</figcaption></figure><p>That number raises an immediate question: is the bump justified? In<a href="https://medium.com/@thinkingjustin/home-away-from-home-measuring-the-impact-of-away-games-099ab458d4f1"> Home Away from Home</a>, I showed that consecutive road trips and cumulative travel distance produce no measurable drop in away-team win probability — variance of roughly 4 percentage points across all travel distance quantiles, with away teams hovering just below 50% at every stage of a road trip. The market’s home-ice bonus isn’t tracking fatigue or logistics. It is a flat, defensive risk-management adjustment applied uniformly across the board.</p><h3>Without The Pads, Does the Market Actually Predict Well?</h3><p>Once we isolate the corrected market belief, we can ask whether it accurately represents what actually happens. Think of calibration like this: if the market says Team A wins 70% of the time at a given probability level, it should be correct 70% of the time. The calibration chart plots each model against that perfect benchmark — the dashed diagonal.</p><p>The market’s clearest flaw is compression. The Shin-corrected market line never predicts below roughly 40% or above 75% win probability — it refuses to express strong conviction in either direction. When a game features a genuine heavy favorite, the market still hedges toward the middle. Standard ELO doesn’t have that problem: it spans the full range and, when it predicts 65%, teams actually won about 83% of the time in the data — it calls lopsided matchups more honestly. The Process Forecast sits at the other extreme: all predictions cluster between 50–60%, making it nearly impossible to differentiate a good team from an average one. The market is more informative than process metrics, but both systematically avoid saying anything decisive. That same hesitation is what I documented in<a href="https://medium.com/@thinkingjustin/better-than-puck-flips-money-line-and-market-expectation-in-nhl-91786fcf6f01"> Better Than Puck Flips</a> — the money line’s accuracy ceiling sits around 60% and doesn’t improve as a season accumulates games.</p><h3>What Process Metrics Add</h3><p>We test a process forecast built entirely from publicly available data: Pythagorean expectation (a team’s expected win rate based on goals scored and allowed), shot volume, Corsi (total shot attempts at 5-on-5 — a measure of territorial control), and xG (expected goals — a shot-quality-weighted scoring probability). Across 17,444 observations, the market edges process by a detectable but thin margin — roughly 0.002 mean loss difference per game.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*STbDmVVvbVwiR5oEh4Tufw.png" /><figcaption>Model Predictability</figcaption></figure><p>To rank the models directly, we run a competition asking which approach holds <em>independent</em> predictive power once the others are accounted for. Standard ELO, calibrated against actual outcomes, dominates. The Shin-corrected market line adds a small independent signal. Process metrics add none — but they reveal the market’s gaps. When the market over-pads on home ice or under-adjusts for team quality, process numbers expose it.</p><h3>Why You Still Can’t Win</h3><p>The final test tracks market efficiency across rolling 50-game windows through the 2024–25 season. Think of the efficiency score as a dial: a reading of 1 means the market is fully pricing in all available public information. A reading of 0 means it’s ignoring that information entirely. A negative reading means it’s pricing things <em>backwards</em> — favoring the team the data says should lose.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_boAXkEGJjZnXBVMvfRLlQ.png" /><figcaption>Market Efficiency Metric — Across Season</figcaption></figure><p>The dial never holds still. The market starts October around +2.5, crashes negative by mid-November, recovers through December, then hits nearly −6 in February — a stretch where the market’s direction actively contradicted what the numbers showed. March swings to +6–7 before collapsing back. The gray confidence bands around every estimate span roughly ±5, meaning even the 50-game snapshots are too noisy to act on. The market crosses the efficiency line — the threshold where it’s at least pricing things correctly — more than a dozen times in a single season. It never stays there.</p><p>Futures markets price assets with known fundamentals — earnings, interest rates, supply constraints. Sports betting has none of that. The gap between what the market prices and what the data shows is real and measurable. Exploiting it consistently requires being right in a specific 50-game window. That is not skill. That is luck.</p><p>The source codes for the series of analyses are available <a href="https://github.com/justinjoliver/NHL-Analytics"><strong>in my GitHub repository</strong></a>. My work is also presented in my <a href="https://rinklytics.streamlit.app/"><strong>Streamlit application</strong></a>. You are welcome to use these resources, provided you cite JJ Lee, my repository, and this article.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dcc8e33e47b4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Betting on the Future: Balancing Draft Risks with Proven Trade Acquisitions]]></title>
            <link>https://medium.com/@thinkingjustin/betting-on-the-future-balancing-draft-risks-with-proven-trade-acquisitions-bb83e4c56281?source=rss-c6cc51437ec1------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb83e4c56281</guid>
            <category><![CDATA[hockey]]></category>
            <category><![CDATA[economics]]></category>
            <category><![CDATA[nhl]]></category>
            <category><![CDATA[sports]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[JJ Lee]]></dc:creator>
            <pubDate>Mon, 29 Jun 2026 05:36:21 GMT</pubDate>
            <atom:updated>2026-10-26T21:06:31.367Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NQqs070VEenajjcz2CEzIQ.png" /><figcaption><strong>May 16, 2026; Montreal, Quebec, CAN; Buffalo Sabres defenseman Bowen Byram (4) defends the puck against Montreal Canadiens center Alex Newhook (15) during the third period in game six of the second round of the 2026 Stanley Cup Playoffs at Bell Centre. Mandatory Credit: David Kirouac-Imagn Images | David Kirouac-Imagn Images</strong></figcaption></figure><p>The 2026 NHL Draft was highlighted by Gavin McKenna selected as the <a href="https://www.nhl.com/news/gavin-mckenna-arrives-in-toronto-as-no-1-pick-in-2026-nhl-draft">number one overall pick</a>. However, another buzz began days prior with the Chicago Blackhawks’ polarizing move: trading away the 4th overall and 2nd-round picks along with Louis Crevier, to acquire Bowen Byram (notably) and Jordan Greenway. <a href="https://www.chicagotribune.com/2026/06/23/chicago-blackhawks-trade-bowen-byram-louis-crevier/">Read more about the trade here</a>.</p><h3>Would Trading Away the 4th Overall Pick Worth It?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E3kcMfSljzPhRL5aG2rxnw.png" /><figcaption>Bowen Byram career statistics (Source: NHL API data processed by the author)</figcaption></figure><p>Byram has shown significant potential during the last two seasons, but the trade prompts a difficult question: Was the 4th overall pick a fair price? Rebuilding teams face a constant dilemma — wait for a draft pick to mature, or take the risk on an established player who fits the current competitive timeline. For example, rarely we see drafted players heading to college <a href="https://medium.com/p/212e71eaa881">does not show significant upsides</a> regardless of the timing of their departure for NHL.</p><p>As discussed in recent <a href="https://www.nhl.com/blackhawks/video/jeff-blashill-end-of-season-media-4-16-26-6393244659112">team media sessions</a>, balancing the development of young prospects against the immediate needs of a rebuilding squad is a high-stakes optimization exercise.</p><p>The core questions for the management is:</p><ol><li><strong>Opportunity Cost</strong>: What if the current free agent market or trade opportunities desirable enough to fulfill immediate roster needs?</li><li><strong>Discount Present Value</strong>: Is it worth waiting for a draft pick (usually under 20 years old) to mature? For how long?</li><li><strong>Future Risk</strong>: What if the drafted player fails to meet the expectations after years of waiting and training?</li></ol><h3>Draft Survival Analysis</h3><p>To move beyond speculative analysis, I built a custom data pipeline via my GitHub project <a href="https://github.com/justinjjlee/NHL-Analytics/tree/main/dev/player/player_draft">NHL-Analytics</a> and visualized the results in my project, <a href="https://rinklytics.streamlit.app/magnifiques_patineuses">Rinklytics</a>. By ingesting NHL player data dating back to 2000, I established a rigorous framework for tracking player maturation.</p><p>The core of this analysis is the <strong>Cohort Survival Curve</strong>, which measures the “Activity Rate” of draft classes. I define “successful” survival as a player participating in at least one season with 40 NHL regular-season games— a threshold indicating the transition from prospect to regular lineup member. Note that the threshold can be adjusted to repeat the exercise.</p><p>This approach should guide us how long teams generally wait for prospects to materialize. For this analysis, I evaluated cohorts drafted from 2015 to 2021 and tracked their career progression over at least five years.</p><h3>First-Round Success Is Not Guaranteed</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KZ36Uwk8safD0r0naVV6ow.png" /><figcaption>Survival Curve for First Round Picks</figcaption></figure><p>The data reveals that the draft is far from a sure thing. It takes roughly four years for the majority of first-round picks to mature within an organization. While approximately 80% of these cohorts eventually see meaningful ice time (at least 40 regular-season games), a significant 20% do not manage to sustain a long-term NHL career. Even among elite first-rounders, survival is not guaranteed.</p><h3>The Reality of Later Rounds</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AztkNPzM72xITIaxPo16nA.png" /><figcaption>Survival Curve for Later Rounds Picks</figcaption></figure><p>For second-round picks and beyond, the outlook becomes much grimmer. Survival rates drop precipitously to just 40% for second-rounders, and less than 20% for those drafted in the third round or later. For these picks, teams are often banking on outliers rather than a reliable foundation for rebuilding.</p><h3>Conclusion</h3><p>Building a contender team requires rigorous risk assessment. Teams must constantly weigh the long-term potential of prospects against the immediate value of active players.</p><p>Chicago’s decision to move the 4th overall pick reflects an organizational belief that Bowen Byram’s impact in near future outweighs the projected future returns of that selection.</p><p><a href="https://huggingface.co/spaces/jjerlee/rinklytics">Rinklytics - NHL Analytics Dashboard - a Hugging Face Space by jjerlee</a></p><p>The source codes for the series of analyses are available <a href="https://github.com/justinjoliver/NHL-Analytics"><strong>in my GitHub repository</strong></a>. My work is also presented in my <a href="https://huggingface.co/spaces/jjerlee/rinklytics"><strong>Streamlit application</strong></a><strong> hosted in Hugging Face</strong>. You are welcome to use these resources, provided you cite JJ Lee, my repository, and this article.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb83e4c56281" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Behind-the-Bench Automation: Hockey Analytics with Databricks]]></title>
            <link>https://medium.com/@thinkingjustin/behind-the-bench-automation-hockey-analytics-with-databricks-33fafd415f2a?source=rss-c6cc51437ec1------2</link>
            <guid isPermaLink="false">https://medium.com/p/33fafd415f2a</guid>
            <category><![CDATA[nhl]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[sports-analytics]]></category>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[JJ Lee]]></dc:creator>
            <pubDate>Sun, 03 May 2026 05:26:57 GMT</pubDate>
            <atom:updated>2026-05-03T05:26:57.385Z</atom:updated>
            <content:encoded><![CDATA[<h4>Automate Real-Time Data Processing with Databricks</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ye7N1WTGeODZUNnKRxuW6g.png" /><figcaption>AI-generated Image (Author generated using Google Gemini)</figcaption></figure><p>In this post, I document how to implement the <a href="https://github.com/justinjjlee/NHL-Analytics">NHL API data pull and processing</a> I have set up in Databricks, covering:</p><ul><li>Structuring the existing automation code for a Databricks environment.</li><li>Setting up workflows from API pull to processing using Databricks Jobs.</li><li>Updating database by managing data within Databricks <a href="https://www.databricks.com/product/unity-catalog">Unity Catalog</a>, from broken out data files (volumes) to queryable tables.</li></ul><p><a href="https://github.com/justinjjlee/NHL-Analytics/tree/main/databricks">NHL-Analytics/databricks at main · justinjjlee/NHL-Analytics</a></p><p><a href="https://medium.com/p/33fafd415f2a/edit"><em>Read my article</em></a><em> on setting up the automation using Github Actions.</em></p><p><strong>Required Assets</strong></p><ul><li>You need a Databricks environment — paid or <a href="https://www.databricks.com/learn/free-edition">Databricks Free Edition</a> (which is the environment I am using for this project).</li><li>Access the Github repository in your Databricks workspace by creating a git folder.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OKFteSTal1Ziehw8nVEC3w.png" /><figcaption>Databricks Workspace with Git Folder Setup</figcaption></figure><p><strong>Adaptation and Deployment</strong></p><p>I restructured my existing Python code (which pings the NHL API v2) by simply packaging the logic for direct execution within <strong>Databricks Notebooks</strong> and changing data destination into Unity Catalog volume. This setup allows for immediate processing of the raw data while tracking data vintages. You can review in the <em>databricks/jobs</em> directory of my repository.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3oHwF2XxGgf0jn6xBqWyDQ.png" /><figcaption>Setting Up Job in Databricks</figcaption></figure><p><strong>Data Governance with Unity Catalog</strong></p><p>The second notebook in the workflow processes data from volume storage to documented table forms in Databricks <strong>Unity Catalog (UC)</strong>. This converts raw data <strong>volumes</strong> into managed, queryable Delta tables. UC centralizes data access and governance, enabling analysis, model build, and context for native Genie and future agent builds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GChiTN1HHEVAIjPkA3c2Xg.png" /><figcaption>Unity Catalog Volumes and Tables</figcaption></figure><p><strong>Production Scheduling with Databricks Jobs</strong></p><p>Finally, the entire end-to-end pipeline — from API call to Unity Catalog ingestion — is now reliably managed and scheduled by a <strong>Databricks Job</strong>. Make sure that the jobs are scheduled before the day’s games start if you want the betting odds data to be timed on specific hours of day (or hours before the games). You can also enable email notification for run success/failed notice.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*hKJ10Civii__E_jqL7B7bg.png" /><figcaption>Configuring Scheduled Job</figcaption></figure><p><strong>Future Steps</strong></p><p>This foundation enables that all current and future processes and analyses can leverage centralized (<em>lake-ed</em>) data under <strong>Unity Catalog</strong>, providing easy and reliable access for real-time data updates.</p><p>This migration has laid the groundwork to leverage Databricks native modules for advanced analytics and, most excitingly, to continue the in-progress development of agentic hockey analytics capabilities. I look forward to share more updates as I learn and create one of my goal of building agentic AI for code-lesser (not codeless) hockey analytics.</p><p>The source codes for the series of analyses are available <a href="https://github.com/justinjoliver/NHL-Analytics"><strong>in my GitHub repository</strong></a>. My work is also presented in my <a href="https://rinklytics.streamlit.app/"><strong>Streamlit application</strong></a>. You are welcome to use these resources, provided you cite JJ Lee, my repository, and this article.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33fafd415f2a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bedard Begins … with who?]]></title>
            <link>https://medium.com/@thinkingjustin/bedard-begins-with-who-f42191578f98?source=rss-c6cc51437ec1------2</link>
            <guid isPermaLink="false">https://medium.com/p/f42191578f98</guid>
            <category><![CDATA[nhl]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[ice-hockey]]></category>
            <category><![CDATA[sports-analytics]]></category>
            <category><![CDATA[chicago-blackhawks]]></category>
            <dc:creator><![CDATA[JJ Lee]]></dc:creator>
            <pubDate>Mon, 14 Jul 2025 02:30:36 GMT</pubDate>
            <atom:updated>2025-07-14T02:30:36.989Z</atom:updated>
            <content:encoded><![CDATA[<h3>Bedard Begins … With Who?</h3><p>Learnings from 2010s Chicago Blackhawks Dynasty</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/0*N6OGo1fSLhLcR4h_.jpg" /><figcaption>Imagn Images/Steve Roberts (25211333)</figcaption></figure><p>Since the glory days of their 2010s Stanley Cup dynasty, the Blackhawks has hit the reset button and been on a thorny rebuilding era(?). With the championship core players departed, the team now believes it has found their next Toews or Kane in Connor Bedard. Unfortunately, his first two seasons have not translated into meaningful team success.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F3nm7q4T333Q%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D3nm7q4T333Q&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F3nm7q4T333Q%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/1159dc573f41c3b67decde2a052e298b/href">https://medium.com/media/1159dc573f41c3b67decde2a052e298b/href</a></iframe><p>In this article, I look to the Blackhawks’ unforgettable <a href="https://www.theguardian.com/sport/2015/jun/16/the-secret-behind-the-chicago-blackhawks-peculiar-dynasty-depth">salary cap era dynasty</a> to highlight the importance of building a strong team around a star player. I also conclude with my point of view in applying analytics in hockey, emphasizing the importance of focus, holism, and context to understand the complexities of the game.</p><h4>Bedard Is on the Right Track, Offensively</h4><p>I use my Streamlit application <a href="https://medium.com/@thinkingjustin/drafted-for-greatness-looking-back-on-the-futures-of-nhl-first-rounders-58ba035cd328">I developed for my last post</a> to visualize how Bedard, the first overall pick of 2023 entry NHL draft, compares with Blackhawks’ Stanley Cup decade’s first-round picks: Patrick Kane (<em>Showtime</em>) and Jonathan Toews (<em>Captain Serious</em>).</p><p>(If Streamlit Application <em>has gon to sleep</em>, you can visit the page and wake it up! <a href="https://rinklytics.streamlit.app/magnifiques_patineuses">https://rinklytics.streamlit.app/magnifiques_patineuses</a>)</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Frinklytics.streamlit.app%2F%7E%2F%2B%2Fmagnifiques_patineuses%3Fembed%3Dtrue&amp;display_name=Streamlit&amp;url=https%3A%2F%2Frinklytics.streamlit.app%2F%7E%2F%2B%2Fmagnifiques_patineuses&amp;image=https%3A%2F%2Fstorage.googleapis.com%2Fs4a-prod-share-preview%2Fdefault%2Fst_app_fallback_image.png&amp;type=text%2Fhtml&amp;schema=streamlit" width="560" height="630" frameborder="0" scrolling="no"><a href="https://medium.com/media/73c165158b4cdefea6996fd87320722e/href">https://medium.com/media/73c165158b4cdefea6996fd87320722e/href</a></iframe><p>While the third year of Toews and Kane ended with the Stanley Cup, it is hard to project the Blackhawks’ upcoming centennial season (2025-2026; the third season for Bedard) would end at the peak with <a href="https://www.chicagotribune.com/2025/05/25/chicago-blackhawks-jeff-blashill-eddie-olczyk/">their newly minted coach</a> and <a href="https://chicago.suntimes.com/blackhawks/2025/03/07/blackhawks-nhl-trade-deadline-shea-weber-contract-utah">barely filling salary floor</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G4kALOqrQu0c12ueM7GlaA.png" /><figcaption>Franchise first-round draftees point production by season</figcaption></figure><p>The first two years of Bedard’s point production tracks productions from Kane and Toews in their first two seasons. With Bedard generating enough offense to match with past player’s performance, where else should the Blackhawks turn to fix in order to build a Stanley Cup contending team?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b-_vO8MslogttOmCCLI4Iw.png" /><figcaption>AP Photo/Charles Rex Arbogast</figcaption></figure><h3>Everywhere &amp; Everyone</h3><p>Similar to football (soccer), actions and reactions of game play happens concurrently. Forwards need to play defense, defense needs to actively work for transitions and scoring chances, and goalies are rarely solely responsible for defending the shots.</p><p>For forwards and as is a star player in a team, goals and assists (point production) cannot be from just a player. I evaluate the top five point producers of the Blackhawks’ last three Stanley Cup winning seasons.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G1nMkh6_MoaAE4Gx0VBVcw.png" /><figcaption>Top Point Producers of Chicago’s 2010’s Stanely Cup Teams</figcaption></figure><p>Excluding the 2012–2013 campaign, multiple players put up comparable performances. The point production for each team was not depended on just one player.</p><p>Observing points per game for each season, I compare the three Stanley Cup winning seasons with the first two years with Bedard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nawfel9DlzeEwtDV-3fOwA.png" /><figcaption>Points per game</figcaption></figure><p>The point production for 3rd to other skaters drop significantly during 2023–2025 seasons. Especially for 2023–2024 season, where the rest has not put similar point production as Bederad and Kurashev. While the following season was an improvement, still the gap indicates weakness in depth.</p><h4>Plus/Minus Signals the “Everything Else is the Problem”</h4><p>Plus/minus provides a simplified signal when aggregated each season. The goal of this <strong>high-level view</strong> is to evaluate individual’s relative performance within and across the team. The metric should not be used to evaluate skaters individually.</p><p>Analytically, I am going to compare distribution of plus/minus across seasons. My goal is to evaluate two trends — <strong>Consistency/similarity between players</strong> and <strong>variation/difference across players</strong>.</p><p>If most skaters in a team are consistently high or low in plus/minus in a season, it indicates that the team’s scoring and defensive production were generally better or worse compared to other seasons. On the other hand, if there is a greater variation in plus/minus among the skaters, it suggests uneven contributions by the skaters, potentially pointing to issues with depth across the line-up.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s_65xAqrD14B7N_e0u7-pw.png" /><figcaption>Season Aggregate Plus/Minus</figcaption></figure><p>Across all lines, there has been a lack of defensive success. Even with Bedard’s point production, his line has been outscored, and defensive performance has been consistently poor across lines/shift. This indicates a general issue with team defense and potential with goaltending.</p><h4>Part of the Problem or a Cause? You Will Never Know</h4><p>Because the defense by skaters is tightly linked to the performance of the goalie, developing insights on goaltending at the team level isn’t very fruitful. There are only a few great teams in history that lost their footing because of the absence of great goaltending — ask the Montréal Canadiens about Patrick Roy.</p><p>In this article, I want to evaluate if goaltending was exceptional (enough) to potentially overcome the limited point generation and potentially giving the team chance to win a low-scoring game.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xBaAj6wRxUdEm0127-Frhg.png" /><figcaption>Goaltending Performance</figcaption></figure><p>While goaltending was a consistent strength during the Blackhawks’ 2010s dynasty, recent performances have fallen short. With inconsistent forwards and weak team defense, the Blackhawks can’t rely on simply outscoring opponents. Strong goaltending, backed by better defensive play, remains essential for their success — and they are all dependent on each other.</p><h4>Coaching &amp; Continued Team-building</h4><p>For 2010’s Chicago, there were depths around Kane and Toews for offense, defense, and goaltending (with the salary cap). Without debating who contributed more than others, the team as a whole found their success for years. Fast forwarding a decade, the Blackhawks’ <a href="https://chicago.suntimes.com/blackhawks/2025/01/31/blackhawks-nhl-salary-cap-skyrocketing-free-agency-contracts">luxurious salary cap room &amp; draft picks</a> will be a great bases to build the team around Bedard. Or, they will go through a long period of <em>hope torture</em> with star players with no happy finale like <a href="https://medium.com/@thinkingjustin/drafted-for-greatness-looking-back-on-the-futures-of-nhl-first-rounders-58ba035cd328">the Oilers and the Leafs</a>.</p><h3>It’s more team sports than other sports</h3><p>I want to conclude with a reflection on analytics practice — an irking thought shaped by my experiences and observations of how data-driven insights are often consumed. Too often, audiences overlook the nuance behind the data-driven insights.</p><blockquote>No numbers are panacée and none are without context.</blockquote><p>Hockey, as a team sport with highly coordinated plays, makes it especially difficult to measure and isolate individual contributions. Unlike baseball, where metrics like Wins Above Replacement (WAR) work well due to its discrete and sequential plays, hockey is a continuous game where skaters contribute simultaneously to both offense and defense. This also contrasts with American football, where players are split into distinct offensive and defensive units, making performance attribution clearer by position.</p><p>In hockey, no single metric — whether plus/minus or any other — can capture the full complexity of the game. Yet that does not render the metrics meaningless. They simply cannot stand alone. Effective analysis requires (a) recognizing the focused/narrow purpose of each metric, (b) applying multiple measures to build a holistic understanding of player and team performance, and (c) always grounding those numbers in context, considering factors like coaching, team chemistry, and other unmeasurables.</p><p>This reality makes applying data analytics in hockey far more challenging than in other sports. For that reason, I generally avoid projecting the findings to specific player or team. Instead, I focus on evaluating strategic approaches — such as the <a href="https://medium.com/@thinkingjustin/human-shields-on-ice-the-valor-of-blocking-shots-2d55e2f0482c">benefits and risks of faceoffs</a> or <a href="https://medium.com/@thinkingjustin/double-edged-face-off-matters-more-for-the-offense-74ac3daa0dfb">value of blocking shots</a> — rooted in precise strategic questions.</p><p>I hope my analyses are as thought-exploring for you to read as they are for me to develop and share.</p><p>The source codes for the series of analyses are available <a href="https://github.com/justinjoliver/NHL-Analytics"><strong>in my GitHub repository</strong></a>. My work is also presented in my <a href="https://rinklytics.streamlit.app/"><strong>Streamlit application</strong></a>. You are welcome to use these resources, provided you cite JJ Lee, my repository, and this article.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f42191578f98" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Drafted for Greatness? Looking Back on the Futures of NHL First-Rounders]]></title>
            <link>https://medium.com/@thinkingjustin/drafted-for-greatness-looking-back-on-the-futures-of-nhl-first-rounders-58ba035cd328?source=rss-c6cc51437ec1------2</link>
            <guid isPermaLink="false">https://medium.com/p/58ba035cd328</guid>
            <category><![CDATA[nhl]]></category>
            <category><![CDATA[sports]]></category>
            <category><![CDATA[ice-hockey]]></category>
            <category><![CDATA[sports-analytics]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[JJ Lee]]></dc:creator>
            <pubDate>Thu, 19 Jun 2025 18:12:52 GMT</pubDate>
            <atom:updated>2026-10-26T21:08:34.138Z</atom:updated>
            <content:encoded><![CDATA[<h4>Tracking the careers of NHL first-round picks over time to understand when — or if — they meet expectations</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QXmsatCbZzAW73Wqi87ykA.png" /><figcaption>Getty Image/Brett Carlsen (1245591612)</figcaption></figure><p>After the NHL draft lottery, teams and fans dream about landing the next franchise player — someone who can turn things around and lead a team to success. First-round picks carry especially high expectations, but not all of them pan out as hoped. Some become stars, others end up being trade pieces, and a few just never quite hit their stride. To evaluate how the general managers’ draft decisions play out over time, I ask: <strong>How do NHL draft picks, especially first-round skaters, perform as their careers unfold?</strong></p><p>To answer that, I built a panel dataset that tracks season-by-season performance after the draft. The goal is to better understand how players develop and grow, when they typically peak, and how expectations should be shaped based on real outcomes. It can also serve as a learning from the past to set more realistic (lower) hopes on the drafted players (even though the word fan is an abbreviation of <em>fanatic</em>).</p><h4><strong>Building the Dataset — Linking Draft Picks to Career Performance</strong></h4><p>To track how draft prospects perform throughout their NHL careers, I built a panel dataset by combining information from several NHL API endpoints. Specifically, I joined three key data sources:</p><ul><li><strong>Draft picks list</strong> — includes the year, round, overall pick, and player names.</li><li><strong>Player career stats</strong> — joined using first and last name to get cumulative NHL statistics.</li><li><strong>Player season-by-season stats</strong> — pulled using player ID, which also includes their amateur and NHL season stats.</li></ul><p>While there’s some redundancy between the second and third sources, each serves its own purpose:</p><ul><li>The full-career stats help limit API calls by filtering to NHL players (e.g., drafted players may not play a single game in NHL).</li><li>The season-level stats are necessary because the API only returns one stat type at a time per player-season (e.g., goals, assists, or points) at the time of this article.</li></ul><p>The result is a season-level panel dataset for drafted players, trending how their NHL careers unfold over time — from debut to peak to decline.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TpgKPz4uYLP9mtC0" /><figcaption>First-round drafted skaters</figcaption></figure><p>For more details and the source code of the process, please <a href="https://github.com/justinjjlee/NHL-Analytics">consult my repository</a>.</p><h4><strong>Exploring Career Performance — When Do First-Round Picks Peak?</strong></h4><p>As an exploratory analysis, I evaluate the point productions (goals and assists) of skaters, which are mostly dictated by forwards. For this analysis, I do not evaluate performance metrics for defense and goaltending.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yNuGGKhg8Fgo37WV" /></figure><p>The charts above show two key metrics across regular seasons the skaters participated since their draft year:</p><ul><li><strong>Total points (left)</strong> — overall offensive production by season</li><li><strong>Points per game (PPG, right)</strong> — which accounts for missed games due to injuries or other factors. Because of the long-run nature of this analysis, this will have less impact on the trends and insights</li></ul><p>I observe a clear gap between the top five overall picks and the rest of the first-round skaters. These top selections are typically the most highly touted and, as fans would expect, tend to outperform their peers for much of their careers. Over time, however, their performance begins to converge with others — likely a result of <strong>survivorship bias</strong>, where only consistently productive players remain in the league.</p><p>The data also suggests that <strong>most first-round skaters reach their peak performance between years 4 and 7</strong> of their NHL careers. This indicates that even for high picks, it often takes several seasons to hit their stride or for teams to build productive lines/teams around the players.</p><p>Lastly, note the <strong>wide range of performance outcomes</strong> among the first-round picks. This variability highlights just how uncertain the outcome of the draft (of teenagers) can be — with both short- and long-term success heavily dependent on player development, opportunity, and luck.</p><p>Also worth noting: <strong>these visualizations are just one way to evaluate individual performance</strong>, which is often shaped by team context. A player’s production depends on team quality, strategy, and roster dynamics. Highly anticipated prospects may underperform with struggling teams — whereas the same players could thrive in more structured, competitive environments.</p><h4><strong>Who are the exceptional scoring contributors amongst them?</strong></h4><p>For simplicity, the following analysis focuses only on <strong>first-round draft picks</strong>. That’s not to suggest there’s a guaranteed drop-off in production between late first-round and early second-round players — many talented skaters have come from beyond the top 30 picks. Instead, the focus reflects how <strong>teams often build around their first-round selections</strong>, especially those taken early in the round.</p><p>In my <a href="https://rinklytics.streamlit.app/"><strong>Streamlit application</strong></a>, I provide several interactive views of this data:</p><ul><li>A <strong>historical cumulative leaderboard</strong> showing total point production since 2000, isolating out top skaters by point generation (top 5 percent each season). As of writing of this analysis, <strong>Sidney Crosby</strong> tops as the most productive skater among first-round picks over the past two decades.</li><li>A <strong>career progression tracker</strong>, where you can follow how every first round drafted skaters point production evolves season by season.</li></ul><p>These tools offer both a big-picture look and player-specific insights — helping fans and analysts alike understand how draft expectations compare with long-term results.</p><p>(Edit — Oct 2026: the App is now publicly hosted in Hugging Face: <a href="https://jjerlee-rinklytics.hf.space/magnifiques-patineuses">https://jjerlee-rinklytics.hf.space/magnifiques-patineuses</a>)</p><p><a href="https://huggingface.co/spaces/jjerlee/rinklytics">Rinklytics - NHL Analytics Dashboard - a Hugging Face Space by jjerlee</a></p><p>Looking back on how teams managed to consistently compete for the Cup, I can identify a few pairs of first-round drafted players:</p><ul><li><em>Toews &amp; Kane (early 2010’s Chicago Blackhawks)</em></li><li><em>Crosby &amp; Malkin (late 2010’s Pittsburgh Penguins)</em></li><li><em>Ovechkin &amp; Bäckström (late 2010’s Washington Capitals)</em></li></ul><p>As of writing of this post, there are two teams with such skaters without the Cup</p><ul><li><em>McDavid &amp; Draisaitl (mid 2020’s Edmonton Oilers)</em></li><li><em>Marner, Matthews, Nylander &amp; Tavares (mid 2020’s Toronto Maple Leafs)</em></li></ul><p><em>McDraisaitl</em>-lead Oilers just lost to the Panthers in The 2025 Stanley Cup Final — for the second year in the exact same match.</p><p>More notable of the two: after another early disappointing playoff exit in 2025, the Leafs are in self-reflection mode, cleaning house front and <a href="https://torontosun.com/sports/hockey/nhl/toronto-maple-leafs/shanahan-will-not-return-team-president">back</a>, and <a href="https://torontosun.com/sports/hockey/nhl/toronto-maple-leafs/leafs-to-study-ways-of-enhancing-home-ice-advantage-with-fan-support">once again hoping to return to fans’ good graces</a>.</p><h4>What’s Next?</h4><p>This tracking of drafted players opens the door to evaluate long-term outcomes of drafted players. The next post will explore a case study on <strong>evaluating potential success and setting an expectation based on a single first-round pick</strong>.</p><p>The source codes for the series of analyses are available <a href="https://github.com/justinjoliver/NHL-Analytics"><strong>in my GitHub repository</strong></a>. My work is also presented in my <a href="https://jjerlee-rinklytics.hf.space/"><strong>Streamlit application</strong></a>. You are welcome to use these resources, provided you cite JJ Lee, my repository, and this article.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58ba035cd328" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Home Away from Home: Measuring the Impact of Away Games]]></title>
            <link>https://medium.com/@thinkingjustin/home-away-from-home-measuring-the-impact-of-away-games-099ab458d4f1?source=rss-c6cc51437ec1------2</link>
            <guid isPermaLink="false">https://medium.com/p/099ab458d4f1</guid>
            <category><![CDATA[sports-betting]]></category>
            <category><![CDATA[ice-hockey]]></category>
            <category><![CDATA[nhl]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[sports-analytics]]></category>
            <dc:creator><![CDATA[JJ Lee]]></dc:creator>
            <pubDate>Sun, 09 Feb 2025 06:10:51 GMT</pubDate>
            <atom:updated>2026-10-26T21:10:14.346Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dxVA5amZ4WibYq3u70V1ZA.png" /><figcaption>AP Photo/Jae C. Hong Erie Times-News (May 30, 2015)</figcaption></figure><p>Ice hockey teams in the NHL are spread across North America, resulting in some challenging travel schedules. The impact of travel on team performance may introduce several dynamics:</p><ol><li><strong>Traveling Team Exhaustion</strong>: The cumulative effect of long travel distances and consecutive games can potentially lead to fatigue for the traveling teams. Physical wear and tear, disruptions to routines, and limited recovery time may influence how effectively players perform on the ice. While the extent of this impact varies, teams on extended road trips could face challenges maintaining peak performance.</li><li><strong>Home-Field Advantage</strong>: Regardless of how far the visiting team has traveled or how long their road trip is, the home team often benefits from a familiar environment, fan support, and reduced logistical stress. These factors can create a tangible edge, even in matchups where both teams are otherwise evenly matched.</li></ol><h3>Where are you heading? Creating Data</h3><p>I developed a dataset and calculation <a href="https://github.com/justinjjlee/NHL-Analytics/blob/main/src/data/geospatial/stadium_locations.py">processes to generate travel distances</a> between teams. Leveraging the publicly available <a href="https://overturemaps.org/"><strong>Overture</strong></a> database, I collected the geographic locations of NHL arenas and created geospatial point objects representing each arena’s coordinates (some ad hoc changes and validations were required).</p><p>To compute the distances between arenas, I used <strong>DuckDB</strong>, which offers excellent geospatial computing capabilities akin to <strong>PostgreSQL</strong>. By applying the <em>Haversine</em> formula, I estimated the great-circle distances between each pair of arenas, providing a reliable measure of the travel required for matchups.</p><p>The data is static (unless there are new teams or relocations) and can be <a href="https://github.com/justinjjlee/NHL-Analytics/blob/main/latest/team/teamlist_locations_distance_meters.csv">found in my repository</a>.</p><p>With the data, I created a fun visual application on team locations and interactive tools to present distance between the teams. If the embedded link does not work, please visit <a href="https://huggingface.co/spaces/jjerlee/rinklytics">my Hugging Face Space page</a> to try out my interactive visualizations (more works to come!).</p><p><a href="https://huggingface.co/spaces/jjerlee/rinklytics">Rinklytics - NHL Analytics Dashboard - a Hugging Face Space by jjerlee</a></p><h3>Are Teams Less Likely to Win Consecutive Away Games?</h3><p>In my previous analysis, I showed that the home teams have a negligibly higher likelihood of wining games in Stanley Cup Playoffs.</p><p><a href="https://medium.com/@thinkingjustin/a-tale-of-the-favorites-the-underdogs-and-the-stanley-cup-winners-72cc4ad37b6f">A Tale of The Favorites, The Underdogs, and The Stanley Cup Winners</a></p><p>However, regular season games differ in that teams must travel to various cities. Sometimes, they cross the continent and play three to four games on consecutive days. For example, the following schedule outlines the Detroit Red Wings’ four-game away series on the West Coast (and won them all — away four-game sweep for the first time since March 1996).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rirc1-qkzcQASvPQIRePBQ.png" /><figcaption>Example of long consecutive away games (source: <a href="https://www.nhl.com/redwings/schedule/2024/fullseason">https://www.nhl.com/redwings/schedule/2024/fullseason</a>)</figcaption></figure><p>To quantify the impact of consecutive away games, I first need to create a data series that tracks schedules and sequences of away games. The goal is to identify consecutive away games, serialize them, and append relevant information (e.g., distance traveled or consecutive wins).</p><h4>The Algorithm</h4><p>I follow the algorithm defined below. The full implementation is coded and <a href="https://github.com/justinjjlee/NHL-Analytics/blob/main/dev/homeice_advantage/eda_intro_homeice_wins.py">saved in my repository</a>.</p><pre># Pseudocode: Counting Consecutive Away Games<br><br>## Step 1: Initialize Storage<br>- Create an empty list to store processed data for each team.<br><br>## Step 2: Process Each Team<br>For each unique team in the dataset:<br>  1. Select all games where the team is either the home or away team.<br>  2. Reset the order of the selected games.<br>  3. Sort the games by date (ascending order).<br>  4. Determine whether the team is playing away in each game:<br>     - If the team is listed as the away team, mark as `away = True`.<br>     - Otherwise, mark as `away = False`.<br>  5. Assign an initial count to consecutive away games:<br>     - Group by away-team, cumulative count the number of away games.<br>  6. Adjust for home games:<br>     - If the team plays at home, set the consecutive away count to zero.<br>  7. Correct the consecutive counts: For each rows,<br>     - If current game is away game and prior game was home:<br>       - Subtract current and following counts by the current count value<br>  8. Keep only games where the team played away.<br>  9. Convert the away game count from an index to a count by adding 1.<br>  10. Store the processed data for this team.<br><br>## Step 3: Merge Data<br>- Combine all processed team data into a single dataset.<br>- Set the game identifier as the reference index.</pre><h4>Still Home Away from Home</h4><p>The chart below plots the aggregated win percentage of away teams based on the <em>n-th</em> consecutive away game played. Most games have a win probability hovering just below 50%, with a longer tail. We do not observe any distributional differences between the game sequences. Overall, there is no significant difference in win probability between the first away game and the fourth or later away games. This suggests that consecutive away games do not meaningfully impact a traveling team’s likelihood of winning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NgcM1-RdhJ8KgR1SQMGa_g.png" /></figure><p>Another perspective to consider is the distance and duration of travel, which can be accounted for by cumulatively summing the distance a team has traveled. This approach captures the potential impact of time zone differences. For example, the Detroit Red Wings traveling to the West Coast to play Edmonton, Calgary, Vancouver, and Seattle would accumulate a greater travel distance and experience a larger time zone difference than a trip to Raleigh or Nashville.</p><p>Our analysis shows similar results, indicating no clear trend that longer travel distances lead to lower win probabilities. The average win probabilities across all travel distance quantiles consistently hover below 50%. Furthermore, there is no distinct difference in win probability across different travel distances for away games (with a variance of about 4 percentage points). These results imply that the general home-field advantage has a more significant impact than the distance traveled.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IHo0CE0q7fsTNHN0hxGgDw.png" /></figure><h3>Other Potential Applications</h3><p>The high-level exploration above indicates that travel-related factors do not have an obvious or consistent impact on game outcomes. However, a more detailed analysis of team and player performance could offer different insights. The data generated will serve as a valuable resource for future studies, helping to account for variables that influence performance in away games.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=099ab458d4f1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Behind-the-Bench Automation: Hockey Analytics with GitHub Actions]]></title>
            <link>https://medium.com/@thinkingjustin/behind-the-bench-automation-hockey-analytics-with-github-actions-35ca4af19042?source=rss-c6cc51437ec1------2</link>
            <guid isPermaLink="false">https://medium.com/p/35ca4af19042</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[sports-analytics]]></category>
            <category><![CDATA[nhl]]></category>
            <category><![CDATA[github-actions]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[JJ Lee]]></dc:creator>
            <pubDate>Sun, 01 Sep 2024 06:00:38 GMT</pubDate>
            <atom:updated>2024-09-01T06:00:38.533Z</atom:updated>
            <content:encoded><![CDATA[<h4>Automate Real-Time Data Processing with Containers</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a8k0c1IQztTVlqvpVLnOqQ.png" /><figcaption>Image created with Microsoft Bing Image Creator</figcaption></figure><p><a href="https://github.com/justinjjlee/NHL-Analytics"><em>My GitHub repository</em></a><em> for ice hockey analytics now automatically pulls and updates the data and analysis in real-time, scheduled to run daily!</em></p><p>This is a brief diary of my experience setting up an automated (scheduled) <strong>API</strong> call to pull and process <strong>NHL</strong> game and play-level data through <strong>GitHub Actions</strong> within my repository. This process allows the repository to host the latest real-time data in <a href="https://github.com/justinjjlee/NHL-Analytics">my <strong>GitHub</strong> repository</a> without manual actions. Users can link the latest data (in .csv format) through the web link.</p><p>Through <a href="https://medium.com/@thinkingjustin">my series of blogs</a> and <a href="https://github.com/justinjjlee/NHL-Analytics">my <strong>GitHub</strong> repository</a>, I’ve been developing an open-source project to collect, analyze, and provide insights into National Hockey League games and players.</p><p>After significant changes to the <a href="https://github.com/justinjjlee/NHL-Analytics/tree/main/src/data/apinhle">API and data structure in early 2024, I rewrote the code for data retrieval, processing, metric calculations</a>, and model fitting. Then, I turned my attention to address two key challenges that I wanted to address,</p><ul><li>How to schedule my workflows to run with minimal supervision, ensuring the latest data are publicly available in the repository</li><li>How to capture real-time data that disappears after a certain period (such as betting odds, which are only available until the game ends)</li></ul><p><a href="https://github.com/justinjjlee/NHL-Analytics">GitHub - justinjjlee/NHL-Analytics: Data science analyses delving into National Hockey League (NHL) ice hockey statistics</a></p><h3>Setting Up Github Actions (for the First Time)</h3><p>This is where <strong>Github Actions</strong> comes in, where I can document a set of orders to be executed by open-sourced container that can run (a) on a daily/weekly schedules, and (b) save data in my Github repository — all in one place — without me actively running the process every day.</p><p>I have learned that the setting is similar to <strong>Docker</strong>. Without any prior experience creating a <em>container</em>, I began by using <a href="https://github.com/actions/starter-workflows">GitHub’s kindly provided pre-written starter template</a>. I outlined the steps to detail the actions and their sequences. I then used ChatGPT and consulted GitHub issues to address my specific needs and complete the setup.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/491/1*3rCNZ1z3tfqmyKUJOJ1rdA.png" /><figcaption>Github Action: Highest-level Process</figcaption></figure><p>Here are some notes on areas where I spent more time figuring out and finalizing the .yml files that <strong>GitHub Actions</strong> uses to execute tasks.</p><h4>Installing Packages: System vs. Python package managers</h4><p>The python packages used for the analyses are hosted in two different package management sources: conda and pypl. Thus, the virtual environment needs to install packages referencing requirements from two different *_requirements.txt‘s. I saved my .sh command in case I need to update and repeat the process. The .yml files order to install packages through conda and pypl.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fac6d801d3a67c4881e6ec6db64ade0f/href">https://medium.com/media/fac6d801d3a67c4881e6ec6db64ade0f/href</a></iframe><h4>Actions Can Randomly Fail</h4><p>I noticed that some scheduled runs failed, including one that timed out during a package build. After receiving a notification, I restarted the workflow through <strong>CI</strong>, and it succeeded without any changes. I plan to explore fail-safe strategies for the future.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J79ilU5agCsyy31_o8mIMg.png" /><figcaption>A Random Fail Due to Time-out’s</figcaption></figure><h3>Outcome: Made My Work Easier &amp; Enabled!</h3><p>The ability for automated data updates and pre-defined analyses to run while I’m asleep or away — and to capture real-time data — is incredibly valuable. This capability not only unlocks significant potential for our data operations but also allows the project to thrive as a powerful, readily available open-source repository.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*BNsWIznGAfnzEtMjLX4-FA.png" /><figcaption>Current environment setup for <a href="https://github.com/justinjjlee/NHL-Analytics">https://github.com/justinjjlee/NHL-Analytics</a></figcaption></figure><p>I look forward to improve and grow from what I currently set up.</p><p>The source codes for the series of analyses are available <a href="https://github.com/justinjoliver/NHL-Analytics">in my repository</a>. You are welcome to use these resources, provided you cite JJ Lee, my repository, and this article.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=35ca4af19042" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>