silver <- "#868686"
gold <- "#DAA520"
p1 <- unc %>%
mutate(sport = fct_relevel(
sport,
c(
"Men's Tennis",
"Women's Tennis",
"Women's Basketball",
"Baseball",
"Men's Soccer",
"Women's Lacrosse",
"Men's Lacrosse",
"Men's Basketball",
"Field Hockey",
"Women's Soccer"
)
)) %>%
arrange(sport) %>%
ggplot(aes(y = sport)) +
geom_dumbbell(
aes(x = champ, xend = second),
size = 1.5,
color = "#b2b2b2",
size_x = 3,
size_xend = 3,
colour_x = gold,
colour_xend = silver
)
p2 <- p1 + geom_text(
aes(x = champ, y = sport, label = champ),
color = gold,
size = 3,
vjust = 2.5,
fontface = "bold"
) +
geom_text(
aes(
x = second,
y = sport,
label = str_replace(second, "-", "")
),
color = silver,
size = 3 ,
vjust = 2.5,
fontface = "bold"
)
p3 <- p2 + geom_text(
data = filter(unc, sport == "Women's Soccer"),
aes(x = champ, y = sport, label = "Titles"),
color = gold,
size = 4,
vjust = -1.5,
fontface = "bold"
) +
geom_text(
data = filter(unc, sport == "Women's Soccer"),
aes(x = second, y = sport, label = "Runner-up"),
color = silver,
size = 4,
vjust = -1.5,
fontface = "bold"
)
p4 <- p3 + theme_me() +
theme(plot.title = element_markdown(), axis.text.x = element_blank()) +
labs(
x = "",
y = "",
title = "Carolina NCAA Team \n<span style='color:#DAA520;'>Titles</span> and \n<span style='color:#868686;'>Runner-up</span> finishes",
caption = "@dadgumboxscores | December 19, 2022"
)
ggsave(
"titles.png",
p4,
w = 9,
h = 6,
dpi = 300,
type = 'cairo'
)
p4