The data used for this assignment is data from the 2021 College Football season and provides an general statistics about each team. Statistics include win percentages, offensive points per game, defensive points per game, strength of schedule and a rating based on schedule and margin of victory. The data was collected from sports-reference.com and has data for each team and season. For this assignment, I used data strictly from the 2021-22 season.
head(ncaaf_standings)
## Rank School Conference Overall_Wins Overall_Loses
## 2 1 Wake Forest ACC 11 3
## 3 2 Clemson ACC 10 3
## 4 3 North Carolina State ACC 9 3
## 5 4 Louisville ACC 6 7
## 6 5 Florida State ACC 5 7
## 7 6 Boston College ACC 6 6
## Overall_WinPerc Conf_Wins Conf_Loses Conf_WinPerc Off_PPG Def_PPG SRS SOS
## 2 0.786 7 2 0.778 41.0 28.9 11.28 0.99
## 3 0.769 6 2 0.750 26.3 14.8 11.43 2.66
## 4 0.750 6 2 0.750 33.1 19.7 10.22 0.39
## 5 0.462 4 4 0.500 31.6 27.3 4.03 2.88
## 6 0.417 4 4 0.500 27.6 26.5 0.64 2.22
## 7 0.500 2 6 0.250 24.7 22.2 -1.00 -1.50
## Bowl
## 2 TRUE
## 3 TRUE
## 4 TRUE
## 5 TRUE
## 6 FALSE
## 7 TRUE
offense = ggplot(data = ncaaf_standings,
aes(x = Off_PPG, y = Overall_WinPerc, color = Conference)) +
theme_minimal() +
geom_point() +
scale_color_viridis(discrete = TRUE) +
xlab("Points Scored per Game") + ylab("Win Percentage") +
xlim(10, 50) + ylim(0, 1) +
plot_annotation(
title = "Average Number of Points Scored and Overall Win Percentage",
subtitle = "Comparing the average number of points scored for each FBS football team and
their overall win percentage for the 2021-22 season",
caption = "Data from Sports Reference"
) +
ggrepel::geom_label_repel(data = . %>% filter(School == "Colorado State"),
aes(label = "CSU"),
color = "darkgreen", show.legend = FALSE, fill = alpha(c("white"), 0),
nudge_y = 0.05, nudge_x = 3.5)
offense
defense = ggplot(data = ncaaf_standings,
aes(x = Def_PPG, y = Overall_WinPerc, color = Conference)) +
theme_minimal() +
geom_point() +
scale_color_viridis(discrete = TRUE) +
xlab("Points Allowed per Game") + ylab("Win Percentage") +
xlim(10, 50) + ylim(0, 1) +
plot_annotation(
title = "Average Number of Points Allowed and Overall Win Percentage",
subtitle = "Comparing the average number of points allowed for each FBS football team and
their overall win percentage for the 2021 season",
caption = "Data from Sports Reference"
) +
ggrepel::geom_label_repel(data = . %>% filter(School == "Colorado State"),
aes(label = "CSU"),
color = "darkgreen", show.legend = FALSE, fill = alpha(c("white"), 0),
nudge_y = -0.1)
defense
ncaaf = ggplot(data = ncaaf_standings,
aes(x = Off_PPG, y = Def_PPG, color = Conference)) +
theme_minimal() +
geom_point() +
xlab("Points Scored per Game") + ylab("Points Allowed Per Game") +
scale_color_viridis(discrete = TRUE) +
xlim(10, 50) + ylim(5, 50) +
theme(legend.position = "right") +
ggrepel::geom_label_repel(data = . %>% filter(School == "Alabama"),
aes(label = "Alabama"),
color = "red", show.legend = FALSE, fill = alpha(c("white"), 0),
nudge_x = 5,) +
ggrepel::geom_label_repel(data = . %>% filter(School == "Cincinnati"),
aes(label = "Cincinnati"),
color = "grey10", show.legend = FALSE, fill = alpha(c("white"), 0),
nudge_x = 0, nudge_y = -4) +
ggrepel::geom_label_repel(data = . %>% filter(School == "Georgia"),
aes(label = "Georgia"),
color = "black", show.legend = FALSE, fill = alpha(c("white"), 0),
nudge_y = -1, nudge_x = 5) +
ggrepel::geom_label_repel(data = . %>% filter(School == "Michigan"),
aes(label = "Michigan"),
color = "blue", show.legend = FALSE, fill = alpha(c("white"), 0),
nudge_y = -2, nudge_x = -5) +
plot_annotation(
title = "Average Points Scored vs Points Allowed for 2021-22 Season",
subtitle = "The four teams labeled played in the 2022 College Football Playoff
and were considered the best four teams in college football. Georgia defeated
Alabama in the championship game.",
caption = "Data from Sports Reference"
)
ncaaf
ncaaf1 = ggplot(data = ncaaf_standings,
aes(x = Off_PPG, y = Def_PPG, color = Bowl)) +
theme_minimal() +
geom_point() +
facet_wrap(. ~ Conference) +
guides(color=guide_legend(title="Bowl Game?")) +
xlab("Points Scored per Game") + ylab("Points Allowed Per Game") +
scale_color_viridis(discrete = TRUE) +
xlim(10, 50) + ylim(5, 50) +
plot_annotation(
title = "Average Points Scored vs Points Allowed for 2021-22 Season",
subtitle = "",
caption = "Data from Sports Reference"
)
ncaaf1