An Analysis of the 2022-2023 NHL Season

at the conference & divisional levels

Author

Bella M.

Introduction

I’m going to be performing an analysis on the 2022-2023 NHL season data. This data contains information about shoot outs, games played, games won/loss, etc. Each row is an team and each column is a statistic that team. Learn more about this data at this link: https://data.scorenetwork.org/hockey/nhl_2223.html

hockey<- read_csv("https://myxavier-my.sharepoint.com/:x:/g/personal/meyerratkeni_xavier_edu/Ecko0LcMGjJCsN1RZOK4RsoBmlTCgqaaHw_Yy1ehLWqZxQ?download=1")

hist(hockey$GA,
     main = "Historgram of Goals Against",
     xlab = "Goals Against", 
     ylab= "Count")

hist(hockey$GF,
     main = "Historgram of Goals Scored",
     xlab = "Goals Scored", 
     ylab= "Count")

Analysis of Goals Scored vs. Goals Against

Questions

Do teams that score more goals tend to allow more or less goals against at the conference level?

Importance

The information presented in this visual is important because it can be used when planning game strategy, building a roster, to have better informed sports bets, predicting game outcomes, looking at overall conference trends, etc. Allows a team to see if they should focus on getting a better goalie or if they have strong enough shooters to offset their low save rate.

How will this question be answered ?

In order to answer this question, data from the 2022-2023 NHL season will be used. Specifically the variables: GA, GF, & Conference (mutated using data from ESPN). A scatter plot with a smoothing line will be used since both variables are continuous. Mutate function will be used to create a new variable called conference which will allow us to see if there are any significant differences at the conference level (will be used to color code). Lastly, facet_wrap will be used to have a side by side comparison by conference.

Data Wrangling

hockey %>% 
  mutate(Conference = ifelse(Team %in% c("BOS","CAR","NJ","TOR","NYR","TB",
                                         "NYI","FLA","PIT","BUF","OTT","DET",
                                         "WSH","PHI","MTL","CB"),
                             "Eastern", "Western")) 
# A tibble: 32 × 19
   Team     GP   SOG     W     L   OTL   PTS Reg_PTS   PPG SO_PTS Pct_SO    RW
   <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>   <dbl> <dbl>  <dbl>  <dbl> <dbl>
 1 BOS      82     7    65    12     5   135     131  1.75      4  0.571    54
 2 CAR      82     7    52    21     9   113     109  1.45      4  0.571    39
 3 NJ       82     6    52    22     8   112     110  1.45      2  0.333    39
 4 TOR      82     3    50    21    11   111     110  1.39      1  0.333    42
 5 VGK      82     9    51    22     9   111     106  1.45      5  0.556    38
 6 EDM      82     4    50    23     9   109     109  1.40      0  0        45
 7 COL      82     9    51    24     7   109     103  1.41      6  0.667    36
 8 DAL      82     7    47    21    14   108     104  1.39      4  0.571    39
 9 NYR      82     7    47    22    13   107     103  1.37      4  0.571    37
10 LA       82     9    47    25    10   104      98  1.34      6  0.667    37
# ℹ 22 more rows
# ℹ 7 more variables: ROW <dbl>, SOW <dbl>, SOL <dbl>, GF <dbl>, GA <dbl>,
#   DIFF <dbl>, Conference <chr>

Visualization

hockey %>% 
    mutate(Conference = ifelse(Team %in% c("BOS","CAR","NJ","TOR","NYR","TB",
                                           "NYI","FLA","PIT","BUF","OTT","DET",
                                           "WSH","PHI","MTL","CB"),
                        "Eastern", "Western")) %>% 
  ggplot(aes(x= GA, y=GF, color=Conference))+
  geom_point()+
  labs(title = "Goals Against vs Goals Scored by Conference",
       subtitle = "2022-2023 Season", 
       x= "Goals Against",
       y= "Goals Scored")+
  facet_wrap(~Conference)+
  geom_smooth(method=lm)

Interpretation

From this visual, we can see that the eastern and western conferences have similar trend lines with the western conf. being stepper due to have more teams with goals against above 300 and goals scored below 240. The western conference has an outlier around 340 goals scored and 260 goals against.