month_order <- c("AUGUST", "SEPTEMBER", "OCTOBER", "NOVEMBER",
"DECEMBER", "JANUARY")
tile_plot <- tiles |>
dplyr::mutate(label_ant = paste0(delta, "\n", wins, "-", loss),
Month = toupper(Month)) |>
ggplot2::ggplot(ggplot2::aes(x = factor(Month, levels = month_order), y = Season, fill = factor(color))) +
ggplot2::geom_tile(color = "white", size = .5) +
ggplot2::geom_text(ggplot2::aes(label=label_ant), vjust = .50,
fontface ='bold', family = 'mono',
size = 5) +
ggplot2::scale_fill_manual(values = c("#F9E5E5", "#c1f5c1"), name = NULL) +
ggplot2::scale_x_discrete(position = "top") +
ggplot2::coord_equal() +
theme_me() +
ggplot2::theme(legend.position = "none",
plot.title = ggtext::element_markdown(face ='bold', color = "#333333", family = 'mono'),
plot.subtitle = ggtext::element_markdown(face ='bold', color = "#333333", family = 'mono'),
plot.caption = ggtext::element_markdown(size = 8, family = 'mono',
color = "#333333"),
axis.text.x = ggtext::element_markdown(size = 12,
family = 'mono',
face = 'bold',
color = "#333333"),
axis.text.y = ggtext::element_markdown(size = 12, family = 'mono',
color = "#333333",
face = 'bold'),
panel.grid = ggplot2::element_blank()
) +
ggplot2::annotate(
cfbplotR::GeomCFBlogo,
x = 1,
y =2023,
team = "North Carolina",
height = .095
) +
ggplot2::annotate(
cfbplotR::GeomCFBlogo,
x = 6,
y =2023,
team = "North Carolina",
height = .095,
color = "#333333",
) +
ggplot2::labs(x = "",
y = "",
title = "North Carolina Football \npoint differential & record \nby month over the last \nfive seasons",
subtitle = "Only includes games against FBS opponents (60 total games).",
caption = "Bless your chart | data via sports-reference.com | December 30, 2023") +
ggplot2::annotate(
"label",
x = 1,
y = 2022,
label = "+185 \n16-7 \n2021-2023 \nSeptember \nOctober",
family = "mono",
size = 3.5,
color = "#333333",
fontface = "bold",
fill = "floral white"
) +
ggplot2::annotate(
"label",
x = 6,
y = 2022,
label = "-105 \n4-10 \n2021-2023 \nNovember \nDecember",
family = "mono",
size = 3.5,
color = "#333333",
fontface = "bold",
fill = "floral white"
) +
ggplot2::geom_vline(xintercept = 3.5,
linetype = 'dashed',
color = "#333333") +
ggplot2::geom_hline(yintercept = 2020.5,
linetype = 'dashed',
color = "#333333")
tile_plot