I am trying to produce a ggplot2 with two geom_line
based on the y-variable. My x-axis are dates and my y-axis are the Sentiment from -5 to 5. For every date I got several Sentiment-Values. I want to see how the Sentiment changes over the days.
My Data looks like this(every row is a different person): My Data:
This is my used code to produce the plot:
ggplot(kernplot, aes(x=dates, y=Sentiment)) +
geom_line()+
scale_x_date(date_breaks = "1 day", date_labels = "%Y-%m-%d", limits = as.Date(c("2017-09-22","2017-10-10")) )+
scale_y_continuous(breaks=seq(-5,5, by=1))+
theme(axis.text.x = element_text(angle = 25, vjust = 1.0, hjust = 1.0))
Here is a picture how it looks at the moment: Sentimentplot
I already tried to split the Variable in two groups but then my Y-axis labels were not in the right order anymore.
I want 2 lines for the values from 0 to 5 and from 0 to -5. And how can I get the mean of the values to make the line better looking? Because at the moment I cannot really tell how the Sentiment changes over the days.