I am having an issue with ggplot. My geom_smooth() curve is the same for three data sets. I have been playing with the data for hours now and I am still stumped.
Any ideas?
code:
COVID <- StatCovid <- read_excel("StatCovid.xlsx", sheet = "Organized")
United_States <- COVID %>% group_by(United_States) %>% select(dateRep, United_States)
France <- COVID %>% group_by(France) %>% select(dateRep, France)
India <- COVID %>% group_by(India)%>% select(dateRep, India)
ggplot(data = COVID, mapping = aes(x= ymd(dateRep), y= COVID$United_States)) +
geom_point(color = "red") +
geom_point(data = COVID, aes(x= ymd(dateRep), y= COVID$France), color= "blue") +
geom_point(data = COVID, aes(x= ymd(dateRep), y= COVID$India), color = "green") +
geom_smooth(data = United_States, aes(color = "United_States"),se = F)+
geom_smooth(data = France, aes(color = "France"),se = F)+
geom_smooth(data = India, aes(color = "India"),se = F)+
scale_color_manual(name = "Country", values = c(United_States = "red", France = "blue", India ="green"))+
theme_classic() + xlab(NULL) +ylab("Number of New Cases Found")+ labs(title = "Spread of COVID-19 as a result of Holiday Travel")
The end goal of my chart is to have a shaded region with a given width around the same time as holidays to see if covid spread more during the holidays.