pp <- tibble(
year = c(2006, 2006, 2013, 2013),
service = c("Abortion", "Cancer", "Abortion", "Cancer"),
n = c(289750, 2007371, 327000, 935573)
)
ggplot(pp, aes(x = year, y = n, color = service)) +
geom_point(size = 2) +
geom_line(linewidth = 1) +
geom_text(aes(label = n), nudge_y = 100000) +
geom_text(
aes(label = year),
nudge_y = 200000,
color = "darkgray"
) +
labs(
title = "Services provided by Planned Parenthood",
caption = "Source: Planned Parenthood",
x = NULL,
y = NULL
) +
scale_x_continuous(breaks = c(2006, 2013)) +
scale_y_continuous(labels = label_number(big.mark = ",")) +
scale_color_manual(values = c("red", "purple")) +
annotate(
geom = "text",
label = "Abortions",
x = 2009.5,
y = 400000,
color = "red"
) +
annotate(
geom = "text",
label = "Cancer screening\nand prevention services",
x = 2010.5,
y = 1600000,
color = "purple"
) +
theme_minimal() +
theme(legend.position = "none")