Hans Rosling popularized Motion Charts -- 2-d scatterplots that animate over time -- with the GapMinder project. Motion Charts were taken to their augmented-reality extreme in this clip from the BBC programme, The Joy of Stats, but now you can create similar (if less audacious) motion charts for yourself with just R and a Flash-enabled browser.
First, you'll need to install the googleVis package from CRAN, and then use the gvisMotionChart to create an object in R. Then, you'll need to export part of it to a text file, and embed the HTML into a web page. The googleVis documentation explains the details but a good place to start is tutorial. I followed it and with these four lines of R code:
install.packages("googleVis") library(googleVis) M <- gvisMotionChart(Fruits, "Fruit", "Year") cat(M$html$chart, file="tmp.html")
I was able to create a page just like this. If course, you can take this further and create animated visualizations of real data just as the Spatial Analysis blog has done, to create motion plots very similar to those from the GapMinder application. Check them out at the link below.
Spatial Analysis: R interface to Google Chart Tools
It's really neat how easy this looks. I can't wait to give it a try.
Posted by: DavidC | January 11, 2011 at 15:11
Great, thanks David. Any hints for getting this to work with RevR Enterprise?
Posted by: Jason | January 11, 2011 at 15:52
The googleVis package (and dependences) don't appear to have require R 2.12 specifically, but I don't think there are binaries for 2.11 (on which RRE4 is based) so you might need to build them from source. Haven't tried it yet myself, but I will and see how it works.
Posted by: David Smith | January 11, 2011 at 16:53
Really Great google VIs package i can wait
Posted by: jyotikattna | February 02, 2012 at 03:27