I am a beginner in R and require help in visualizing some data. I am trying to plot the value of HDI of countries from 1990-2017.
My collated data is as such for example:
Country Year HDI
Brunei 1990 0.782
Brunei 1991 0.787
...
Brunei 2017 0.853
...
Cambodia 1990 0.364
...
Cambodia 2017 0.582
The data follows for countries as such. My code is currently as such:
x = ggplot(data=Collated.Data, aes(x=Year, y=HDI)) +
geom_line(position=position_dodge(width=0.5)) +
labs(x="Years 1990-2017", y="Value of HDI") +
ggtitle("HDI of Country over the years") +
theme(plot.title=element_text(hjust=.5)) +
geom_text(aes(label=POT$Country), hjust=0, vjust=0)
The code shows this for instance, when I am covering ten countries:
How would I clean this graph and also add the country at the end? Would really appreciate some help on this matter :)