I have a data table like this:
dt <- data.table(Sector = c("Agriculture", "Manufacture", "Music", "Agriculture", "Manufacture", "Music", "Agriculture", "Manufacture", "Music"), Region = c("X", "X", "X", "Y", "Y", "Y", "Z", "Z", "Z"), Year = c("2010", "2011", "2012", "2010", "2011", "2012", "2010", "2011", "2012"), Number = c("238", "75", "1038", "150", "987", "156", "768", "398", "65"), Population = c("200875", "200875", "200875", "375600", "375600", "375600", "492000", "492000", "492000"))
I want to show the relationship over the years with the correlation matrix for the regions. How can I generate correlation matrix and then plot it with ggplot2? Thank you so much.