Primary Visualizations
ggplot(matches, aes(x=Result, y= Poss)) +
geom_boxplot() +
labs(title = "Possession Percentage by Match Result",
x = "Result", y = "Possession Percentage")
Interpretation
The boxplot shows the distribution of possession percentage for each match result. The median possession percentage is highest for the home win, followed by the draw, and then the away win. This suggests that higher possession percentage is associated with better match results.
ggplot(matches, aes(x=xG, y= GF)) +
geom_point() +
geom_smooth(method = "lm", se = FALSE) +
labs(title = "Expected Goals vs Actual Goals", x = "Expected Goals", y = "Goals Scored")
`geom_smooth()` using formula = 'y ~ x'
Interpretation
The scatter plot shows the relationship between expected goals (xG) and actual goals scored (GF). The line of best fit suggests that there is a positive correlation between xG and GF. This means that teams that have higher xG tend to score more goals.
$Team <- as.factor(matches$Team)
matches
<- matches |>
avg_g_to_xG_ratio group_by(Team, Date) |>
mutate(goals_to_xG_ratio = GF/xG) |>
filter(!is.na(goals_to_xG_ratio)) |>
ungroup() |>
group_by(Team) |>
summarise(avg_goals_to_xG_ratio = mean(goals_to_xG_ratio, na.rm = TRUE))
# This will reorder the 'Team' factor based on 'avg_goals_to_xG_ratio'.
$Team <-
avg_g_to_xG_ratiofct_reorder(avg_g_to_xG_ratio$Team, avg_g_to_xG_ratio$avg_goals_to_xG_ratio)
ggplot(avg_g_to_xG_ratio, aes(x= Team, y= avg_goals_to_xG_ratio, color = Team)) +
geom_point() +
geom_segment(aes(xend=Team, y=0, yend=avg_goals_to_xG_ratio)) +
labs(title = "Goals Scored vs Expected Goals",
x = "Team", y = "Goals Scored / Expected Goals") +
coord_flip() +
theme(legend.position = "none")
Interpretation
The lollipop plot shows the ratio of goals scored to expected goals (xG) for each team. The teams are ordered by the average goals to xG ratio. A ratio greater than 1 indicates that a team is overperforming their xG, while a ratio less than 1 indicates that a team is underperforming their xG. The plot shows that some teams are overperforming their xG, while others are underperforming. Most surprising is that the team with the highest ratio is not the team currently leading the league. This suggests that the team leading the league may not be the most efficient in front of goal. Luton Town only promoted to the Premier League this season and are currently leading the league. They have the highest goals to xG ratio, which suggests that they are overperforming their xG.