I have a two lists of postcodes (in R)...one of children's addresses with their academic score and one of schools...
i would like to be able to get the closest school for each child...so presumably a calculation of distance would been needed between postcodes by converting to long and lat values?
And then I would like to be able to plot on a google map all the children per school...and see if the children who live closer to school get better grades...perhaps ploting schools a different colour to kids, and the kids having a gradient of colour according to their score?
perhaps something using the googleVis package?
so for example...
if we have the data for 3 kids and 2 schools...
student.data <- cbind(post.codes=c("KA12 6QE", "SW1A 0AA", "WC1X 9NT"),score=c(23,58,88))
school.postcodes <- c("SL4 6DW", "SW13 9JT")
(N.B. My actual data is obviously significantly larger than the one given so scalability would be useful...)
what should be done with googleVis or any other package for that matter to be able to complete the above?
I would start by something like this to get the lat/long
Get lat/long for each post code
get the distance matrix