- Connor Raney
- April 28, 2024
This project examines NHL shot data to analyze the influence of defensive ice time on offensive shot outcomes, specifically expected goals (xGoals). Utilizing data from Moneypuck, this analysis includes over 238,304 shots from the 2022-2023 and 2023-2024 NHL seasons. The primary question explores whether the amount of time a defensive team has been on the ice affects the offensive team's ability to generate scoring opportunities.
All data utilized in this project is available for download at Moneypuck, covering detailed shot data from 2007 through the current season, updated nightly. The specific datasets used here encompass only the latest two seasons due to computational constraints.
- Data Link: Moneypuck Data
- Data Dictionary: Description of each of the 124 attributes recorded for every shot, such as player and goalie details, shot angles, distances, and outcomes.
- Analysis Scripts: Quarto/ R Markdown files detailing the import, cleaning, visualization, and statistical analysis of the dataset.
- HTML Output: An HTML output view of the project, with all graphs, charts, and analysis done, and can be viewed without any work needing to be done to reproduce the results.
- Data Cleaning and Preparation: Importing, merging, and preparing shot data from the 2022-2023 and 2023-2024 seasons.
- Visualizations: Graphical representations of relationships between variables like defending team ice time and expected goals.
- Statistical Analysis:
- Linear and Logistic Regressions to explore the effect of ice time on shot outcomes.
- Propensity Score Matching to balance the dataset and mitigate confounding variables.
- Clone the repository:
git clone https://github.com/cbrane/qtmfinalproject/
- Download the 2022-2023 and 2023-2024 data files from Moneypuck: https://moneypuck.com/data.htm
- Open and run the QMD/ R Markdown files in an R environment to reproduce the analysis.
- R
- Libraries:
dplyr,ggplot2,modelsummary,MatchIt
Feedback and contributions are welcome via pull requests. Please adhere to this project's code of conduct.
Distributed under the MIT License. See LICENSE for more information.
- Connor Raney
- Email: connor@connorraney.com
- LinkedIn: Connor Raney
- Moneypuck.com for providing extensive and detailed NHL shot data.
- Contributors to the NHL API and ESPN for data collection methods.