GoogleVis could be used to visualize the dynamic change of social pattern. Here I will test some examples.
library(googleVis) data(package="googleVis") # Data sets in package ‘googleVis’: # Andrew Hurricane Andrew: googleVis example data set # CityPopularity CityPopularity: googleVis example data set # Exports Exports: googleVis example data set # Fruits Fruits: googleVis example data set # OpenClose OpenClose: googleVis example data set # Population Population: googleVis example data set # Regions Regions: googleVis example data set # Stock Stock: googleVis example data set # Visualizing the hurricane of Andrew data(Andrew) plot(Andrew) AndrewGeoMap <- gvisGeoMap(Andrew, locationvar='LatLong', numvar='Speed_kt', hovervar='Category', options=list(width=600,height=300, region='US', dataMode='Markers')) plot(AndrewGeoMap) AndrewGeoMap$html$chart setwd("d:/r") cat(AndrewGeoMap$html$chart, file="AndrewGeoMap.html") # then you can find it in the work directory. # Since WordPress doesn’t allow embedded JavaScript. I put it into dropbox public folder and i past the
link is given here.
Further, I visualize the dynamic change of cell phone ratio in the world.
# fixed telephone use ftel<-read.csv("d:/r/Fixed Telephone.csv", header = T, sep = ",", quote = "\"'", dec = ".")[1:7263,] ftelr<-read.csv("d:/r/Fixed Telephone ratio.csv", header = T, sep = ",", quote = "\"'", dec = ".") ftelm<-merge(ftelr, ftel, by=c("Country.or.Area","Year")) ftelm<-cbind(ftelm[,1:3], ftelm[,5]) names(ftelm)<-c("Country or Area","Year","Percentage","Users") library("googleVis") fixed_telephone_motion<- gvisMotionChart(ftelm, idvar="Country or Area", timevar="Year", options=list(width=1024, height=768))plot(fixed_telephone_motion) setwd("d:/r") cat(fixed_telephone_motion$html$chart, file="fixed_telephone_motion.html")
The geographical distribution of cell phone usge (per 100 people)
The motion chart of cell phone usage (per 100 people)
# International news coverage visualization
Finally, i visualize the international news of different countries during August of 2011.
You may not be able to see the links above, I made a web page to show the result, click here: