I have two time series data that I want to show on the same graph. Both series have three columns: Date, County and Value. Here is my code:
#Data
Series1 <- data.frame(Date = c(2000,2001,2000,2001), County = c("a", "a", "b", "b"),Total = c(100,150,190,130))
Series2 <- data.frame(Date = c(2000,2001,2000,2001), County = c("a", "a", "b", "b"),Total = c(180,120,140,120))
#Plot data
ggplot() +
geom_line(data = Series1, aes(x = Date, y = Total, color = County), linetype="solid") +
geom_line(data = Series2, aes(x = Date, y = Total, color = County), linetype="dashed")
The plot looks like this:
Now I just need to add one legend showing that solid line represents Series1 and dashed line represents Series2. How can I do this?