# separate the data manipulation from the plots so we can reuse it
data <- data %>%
gather(subject, value, -x) %>%
mutate(x = as.Date(paste(x,"-01",sep="")))
# your original plot call
p <- data %>%
ggplot(aes(x=x, y=value,
group=subject, color = subject, shape = subject)) +
geom_line() +
geom_point() +
labs(title="Media Attention",x="", y = "Media Articles")+
geom_vline(xintercept=19, linetype = "longdash") +
geom_vline(xintercept=6, linetype = "longdash") +
scale_linetype_manual(values = c(1,2,3)) +
theme(plot.title = element_text(hjust = 0.5, face="bold"),
legend.position = "bottom", legend.title = element_blank())
# the new stuff:
p +
geom_vline(xintercept = as.Date(c("2013-07-01", "2014-08-01")), linetype = "dashed") +
geom_text(data = data[data$subject == 'Articles' & data$value > 60,], mapping = aes(label = x), hjust = 1, nudge_x = -10)