This is the code that I have so far. The idea with this was to investigate if there was a correlation between celebrity appearances in THY's commercials and if that had any impact on stock price. I have the dates of the Superbowl in question. What I would like to do is to highlight and then label when the Superbowl happened in relation to the plot, making it easier to illustrate if there was any correlation between the two. The dataframe: THY_2_2016
is the final stock price by day for February 2016 for THY from Yahoo Finance. I downloaded this data and named the THY_2_2016
object the object that contains that data. I also have similar code and plots for each following year up until February 2020.
library(ggplot2)
library(dplyr)
library(ggdark)
THY_2_2016 %>% ggplot(aes(Date, Close)) +
geom_line(color = "orange") +
labs(title = "Turkish Airlines' Final Daily Stock Price for February 2016",
subtitle = "Source: Yahoo Finance",
y = "Final Stock Price (in Dollars)") +
dark_theme_gray() +
theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank())
I know that the 2016 Superbowl happened on February 7, 2016, I would just like to label this even on the same plot and perhaps have a vertical line showing it. Otherwise, the plot just looks like a basic line graph that has no meaning. Could it be as simple as creating a new data frame with only one entry being February 7 and then adding that to the ggplot
code? Doing so seems simple enough, but will that still allow me to label or point to that very easily? Any input would be greatly appreciated!