• Harman Jolly
  • Projects
  • Writings
  • Certificates


  • NHL Highlights


    January 10, 2025

    [MileStone1, MileStone2, MileStone3]

    🎥 Demo Video

    The client app is demonstrated into the browser. The user adds a game ID. The game ID selected was actually live during the recording of the video (April 5th, 2025, Montreal Canadiens vs. Philadephia Flyers).
    We can see that the first select model predicts “2.7” goals for the Flyers, and “3.1” goals for the Canadians, while the score was 2-3 when recording the video (there were 10 minutes left in the last period).

    1. Data Acquisition and Visualisation

    NOTE : A more detailed version of this section is documented in the this link.

    1.1 Data Acquisition

    In this section, we first download the play-by-play events for each game using the publicly available NHL API:

    https://api-web.nhle.com/v1/gamecenter/{GAME_ID}/play-by-play

    To fetch the play-by-play events of a game of your choice, it is recommended to follow the following format:

    Figuring out Game IDs for each season:

    Since we download play-by-play events from each game (Regular and Playoffs) from seasons 2016-2017 to 2023-2024, we break-down the logic behind the naming of GAME_ID as mentioned in the following link :

    NHL API Game IDs Documentation

    In brief, suppose we take GAME_ID 2019020901 and GAME_ID 2021030217 , the breakdown from left to right would be as follows:

    2019020901

    • ‘2019’ for the season 2019-2020.
    • ‘02’ for regular season.
    • ‘0901’ for game number 901 in the regular season.

    2021030217

    • ‘2021’ for the season 2021-2022.
    • ‘03’ for the playoff season.
    • ‘0217’ -> For playoff games, the 2nd digit of the specific number gives the round of the playoffs, the 3rd digit specifies the matchup, and the 4th digit specifies the game (out of 7). (In this example: 7th game of match #1 in playoff round 2.)

    In our project, we ping each game and cache the play-by-play events for ALL NHL games from seasons 2016-2017 to 2023-2024 (including regular and playoffs games!). For more explanations, we have a detailed webpage dedicated to this section.

    1.2 Simple Visualizations

    All the following plots were obtained using the cumulative play-by-play data from all seasons and games mentioned in the previous section.

    Shot types

    NOTE for detailed explanations for this section follow this link.

    Important note: for this analysis, we have decided to drop shot types that have been used less than 0.1%, because they don’t represent meaningful information, especially when compared to other shot types. The shot types dropped were “between-legs” and “cradle”, with 0.06% and 0.005% usage, respectively.

    2023-2044 Season Shot Types Bar plot

    Goal rate vs distance

    Goal Conversion Rate for Seasons 2018, 2019 and 2020

    Shot vs distance and shot-type

    Goal Conversion Rate for Season 2023, per shot type Goal Conversion Rate for Season 2023, per shot type

    1.3 Advanced Visualisations

    For the advanced visualisations, we have decided to include missed shots in our calculations to get a more complete picture of offensive performance.

    Select the season to display