library(tidyverse)
library(dplyr)
library(gghighlight)
library(gtsummary)
library(ggrepel)
library(here)
library(png)
library(grid)
library(gt)
library(kableExtra)
aisfc <- read_csv("Dublin_vs_Kerry_AISFC.csv")SPA Assignment
2023 All-Ireland Senior Football Championship Final (Dublin vs Kerry) Match Report
This report will review the key performance indicators of the 2023 All-Ireland senior football final where Dublin beat Kerry by a scoreline of 1-15 to 1-13.
cup <- here("images", "Cup.png")
cup <- readPNG(cup)
cup_grob <- rasterGrob(cup, width = unit(1, "npc"), height = unit(1, "npc"))
grid.newpage()
grid.draw(cup_grob)Kick outs
This section looks at how both teams performed on their kick outs.
Kick out Breakdown
- The chart below identifies the outcome of the Kerry’s kick outs during the match.
kerry_kickouts <- filter(aisfc, Team == "Kerry" & PO_Result != "NA")
kerry_colors <- c("#377eb8", "#4daf4a", "#4daf4a")
ggplot(data = kerry_kickouts) +
geom_bar(mapping = aes(y = PO_Result, fill = PO_Result), show.legend = FALSE) +
scale_fill_manual(values = kerry_colors) +
labs(title = "Breakdown of Kerry Kick Out",
x = "Count",
y = "KO_Result") +
theme_minimal() +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) Kerry Kick out Targets
The table below lists the most targeted player for Kerry kick outs.
result_table <- aisfc %>% select(c(Team, Player, Event)) %>% filter(Team == "Kerry", Event == "Kickout") %>% group_by(Team, Player) %>% summarise(KO_Target = sum(Event == "Kickout", na.rm = TRUE)) %>% arrange(desc(KO_Target))`summarise()` has grouped output by 'Team'. You can override using the `.groups` argument.kable(result_table, caption = "Kickout Targets for Kerry") %>% kable_styling(full_width = F)Kickout Targets for Kerry Team Player KO_Target Kerry Jack Barry 7 Kerry Tadhg Morley 3 Kerry Dara Moynihan 2 Kerry Graham O Sullivan 2 Kerry Paudie Clifford 2 Kerry Paul Murphy 2 Kerry Sean O Shea 2 Kerry Brian O Beaglaoich 1 Kerry Paul Geaney 1 Kerry Stephen O Brien 1 Kerry Tom O Sullivan 1
Kick out Breakdown
- The chart below identifies the outcome of Dublin’s kick outs during the match.
dublin_kickouts <- filter(aisfc, Team == "Dublin" & PO_Result != "NA")
dublin_colors <- c("#377eb8","#377eb8")
ggplot(data = dublin_kickouts) +
geom_bar(mapping = aes(y = PO_Result, fill = PO_Result), show.legend = FALSE) +
scale_fill_manual(values = dublin_colors) +
labs(title = "Breakdown of Dublin Kick Out",
x = "Count",
y = "KO_Result") +
theme_minimal() +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) - Dublin did not lose any of their kick outs for the entirety of the game which is one key factor to why they won the match as it allowed them to have more possession of the ball.
Dublin Kick out Targets
- The table below lists the most targeted player for Dublin kick outs.
result_table <- aisfc %>%
select(c(Team, Player, Event)) %>%
filter(Team == "Dublin", Event == "Kickout") %>%
group_by(Team, Player) %>%
summarise(KO_Target = sum(Event == "Kickout", na.rm = TRUE)) %>%
arrange(desc(KO_Target))`summarise()` has grouped output by 'Team'. You can override using the
`.groups` argument.
kable(result_table, caption = "Kickout Targets for Dublin") %>%
kable_styling(full_width = F)| Team | Player | KO_Target |
|---|---|---|
| Dublin | Brian Howard | 10 |
| Dublin | Cian Murphy | 2 |
| Dublin | David Byrne | 2 |
| Dublin | Brian Fenton | 1 |
| Dublin | Ciaran Kilkenny | 1 |
| Dublin | Con O Callaghan | 1 |
| Dublin | Eoin Murchan | 1 |
| Dublin | Jack McCaffrey | 1 |
| Dublin | Lee Gannon | 1 |
| Dublin | Michael Fitzsimons | 1 |
| Dublin | Sean McMahon | 1 |
| Dublin | NA | 1 |
- Brian Howard was crucial to Dublin’s kick out success as he was a free option for the goalkeeper on almost every occasion allowing easy restarts for the team.
b_h <- here("images", "b_h.png")
b_h <- readPNG(b_h)
b_h_grob <- rasterGrob(b_h, width = unit(1, "npc"), height = unit(1, "npc"))
grid.newpage()
grid.draw(b_h_grob)Shooting
This section looks at how both teams performed in relation to their shooting.
Kerry Shooting Breakdown
- This table provides a breakdown of Kerry’s shooting performance.
ker_shots <- filter(aisfc, Team == "Kerry" & Outcome != "NA") %>%
select(Event, Half, Team, Outcome, Player, X, Y, Description)
outcome_counts <- ker_shots %>%
group_by(Outcome) %>%
summarise(Count = n()) %>%
arrange(desc(Count))
ker_shots <- inner_join(ker_shots, outcome_counts, by = "Outcome")
ggplot(data = ker_shots) +
geom_col(aes(x = Count, y = Outcome, fill = Outcome), width = 0.7, show.legend = FALSE) +
scale_fill_manual(values = c("Gold", "Red", "#4daf4a", "Red", "Red", "Red", "Red")) +
geom_text(aes(x = Count, y = Outcome, label = Count), hjust = -0.2, size = 3) + # Add data labels
labs(
title = "Breakdown of Kerry Shooting Outcomes",
x = "Count",
y = "Outcome"
)Shot Map
- The chart below identifies where Kerry shot from play.
image <- here("images", "Puckout_Pitch.png")
puckout_pitch <- readPNG(here("Images","Puckout_Pitch.png"))
puckout_pitchpng <- rasterGrob(puckout_pitch, width=unit(1,"npc"), height=unit(1,"npc"))
ker_shots %>%
ggplot() +
annotation_custom(puckout_pitchpng, xmin = 0, xmax = 140, ymin = 0, ymax = 80) +
geom_point(aes(X, 80 - Y, fill = Outcome, shape = Description), size = 2.5, stroke = 0.7) +
xlim(0, 140) + ylim(0, 80) +
coord_flip() +
scale_fill_manual(values = c("Goal" = "yellow", "Point" = "blue")) +
scale_shape_manual(values = c("Play" = 21, "Placed" = 23)) +
theme_bw() +
theme(panel.grid = element_blank(), panel.border = element_blank()) +
theme(legend.position = "top") +
guides(fill = guide_legend(override.aes = list(shape = 21))) +
theme(
axis.title.x = element_blank(),
axis.text.x = element_blank(),
axis.ticks.x = element_blank(),
axis.title.y = element_blank(),
axis.text.y = element_blank(),
axis.ticks.y = element_blank(),
panel.grid.major = element_blank(),
panel.grid.minor = element_blank()
)Warning: Removed 6 rows containing missing values (`geom_point()`).
Dublin Shooting Breakdown
- This table provides a breakdown of Dublin’s shooting performance.
dub_shots <- filter(aisfc, Team == "Dublin" & Outcome != "NA") %>%
select(Event, Half, Team, Outcome, Player, X, Y, Description)
outcome_counts <- dub_shots %>%
group_by(Outcome) %>%
summarise(Count = n()) %>%
arrange(desc(Count))
dub_shots <- inner_join(dub_shots, outcome_counts, by = "Outcome")
ggplot(data = dub_shots) +
geom_col(aes(x = Count, y = Outcome, fill = Outcome), width = 0.7, show.legend = FALSE) +
scale_fill_manual(values = c("Gold", "Red", "#377eb8", "Red", "Red", "Red", "Red")) +
geom_text(aes(x = Count, y = Outcome, label = Count), hjust = -0.2, size = 3) + # Add data labels
labs(
title = "Breakdown of Dublin Shooting Outcomes",
x = "Count",
y = "Outcome"
)Shot Map
- The chart below identifies where Dublin shot from play.
image <- here("images", "Puckout_Pitch.png")
puckout_pitch <- readPNG(here("Images","Puckout_Pitch.png"))
puckout_pitchpng <- rasterGrob(puckout_pitch, width=unit(1,"npc"), height=unit(1,"npc"))
dub_shots %>%
ggplot() +
annotation_custom(puckout_pitchpng, xmin = 0, xmax = 140, ymin = 0, ymax = 80) +
geom_point(aes(X, 80 - Y, fill = Outcome, shape = Description), size = 2.5, stroke = 0.7) +
xlim(0, 140) + ylim(0, 80) +
coord_flip() +
scale_fill_manual(values = c("Goal" = "yellow", "Point" = "blue")) +
scale_shape_manual(values = c("Play" = 21, "Placed" = 23)) +
theme_bw() +
theme(panel.grid = element_blank(), panel.border = element_blank()) +
theme(legend.position = "top") +
guides(fill = guide_legend(override.aes = list(shape = 21))) +
theme(
axis.title.x = element_blank(),
axis.text.x = element_blank(),
axis.ticks.x = element_blank(),
axis.title.y = element_blank(),
axis.text.y = element_blank(),
axis.ticks.y = element_blank(),
panel.grid.major = element_blank(),
panel.grid.minor = element_blank()
)Warning: Removed 5 rows containing missing values (`geom_point()`).
- There were no major separations when comparing the amount of different outcomes of both teams shots. However, when comparing the two shot maps, Dublin were better capable of getting more shots from play and directly in front of goal.
Turnovers
This section looks at how both teamed performed in winning turnovers.
Turnovers Won
- The Table below shows the distribution of turnovers won by both teams.
turnover_table <- aisfc %>%
select(Team, Event) %>%
filter(Team %in% c("Dublin", "Kerry"), Event == "Turnover") %>%
group_by(Team) %>%
summarise(turnovers = sum(Event == "Turnover", na.rm = TRUE)) %>%
arrange(desc(turnovers))
gt(turnover_table) %>%
tab_spanner(
label = "Turnover Share Between Teams",
columns = vars(turnovers)
) Warning: Since gt v0.3.0, `columns = vars(...)` has been deprecated.
• Please use `columns = c(...)` instead.
| Team | Turnover Share Between Teams |
|---|---|
| turnovers | |
| Dublin | 19 |
| Kerry | 19 |
Turnovers across the Match
- The graph below maps the turnovers Kerry won across both halves.
kerry_turnovers <- filter(aisfc, Team == "Kerry", Event == "Turnover")
kerry_color <- "#4daf4a"
library(ggplot2)
ggplot(data = kerry_turnovers) +
geom_point(mapping = aes(x = Match_Time, y = Count), size = 3, color = "#4daf4a") + facet_wrap(~Half, labeller = labeller(Half = c("1st Half", "2nd Half"))) +
labs(title = "Turnovers Won by Kerry Across Both Halves",
x = "1st Half 2nd Half",
y = "Count of Turnovers") +
theme_minimal()- The graph below maps the turnovers Dublin won across both halves
dublin_turnovers <- filter(aisfc, Team == "Dublin", Event == "Turnover")
dublin_colour <- "#377eb8"
library(ggplot2)
ggplot(data = dublin_turnovers) +
geom_point(mapping = aes(x = Match_Time, y = Count), size = 3, color = "#377eb8") + facet_wrap(~Half, labeller = labeller(Half = c("1st Half", "2nd Half"))) +
labs(title = "Turnovers Won by Dublin Across Both Halves",
x = "1st Half 2nd Half",
y = "Count of Turnovers") +
theme_minimal()- The amount of turnovers won by Dublin in the final 10 minutes of the second half was a key factor in success as it allowed them to create more scoring chances and pull away from Kerry.
Player Comparison
- This graph compares the shots taken by man of the match, Dublin’s Paul Mannion with the player of the year, Kerry’s David Clifford.
pm_dc <- here("images", "pm_dc.png")
pm_dc <- readPNG(pm_dc)
pm_dc_grob <- rasterGrob(pm_dc, width = unit(1, "npc"), height = unit(1, "npc"))
grid.newpage()
grid.draw(pm_dc_grob)player_comp <- filter(aisfc, Player %in% c("Paul Mannion", "David Clifford"))
ggplot(data = player_comp, aes(x = Player, fill = as.factor(Outcome))) +
geom_bar(position = "dodge", stat = "count", color = "black") +
labs(
title = "Comparison of David Clifford and Paul Mannion Shots",
x = "Player",
y = "Count"
) +
scale_fill_manual(values = c("green", "red", "blue", "black"), name = "Outcome") +
theme_minimal() +
theme(
plot.title = element_text(hjust = 0.5, size = 16, face = "bold"),
axis.title.x = element_text(size = 14, face = "bold"),
axis.title.y = element_text(size = 14, face = "bold"),
axis.text = element_text(size = 12),
legend.title = element_text(size = 12, face = "bold"),
legend.text = element_text(size = 10)
)- It can be said that both players played particularly well t. However, Clifford’s shooting was less accurate than Mannion which was a key factor in the battle between forwards.
Summary
When reviewing these aspects of performance, Dublin’s ability to win all of their kick outs, taking better positioned shots, and winning turnovers in the right moments of the match is what led them to win the All-Ireland final.
dub_win <- here("images", "dub_win.png")
dub_win <- readPNG(dub_win)
dub_win_grob <- rasterGrob(dub_win, width = unit(1, "npc"), height = unit(1, "npc"))
grid.newpage()
grid.draw(dub_win_grob)```