This presentation uses the deck.js jQuery framework for creating HTML presentations by Caleb Troughton.
m
to get an overview of the slides
g
to go to a specific slide
googleVis is a package for R and provides an interface between R and the Google Visualisation API
The functions of the package allow users to visualise data with the Google Visualisation API without uploading their data to Google
The output of googleVis functions is html code that contains the data and references to JavaScript functions hosted by Google
To view the output a browser with Flash and Internet connection is required, the actual chart is rendered in the browser
Google integrated the motion charts into their Visualisation API
Create wrapper function in R which generate html files with references to Google's Visualisation API
Transform R data frames into JSON
objects with
Display the HTML output with the R HTTP help server
Development started in August 2010 by Markus Gesmann and Diego de Castillo
First draft code was written to visualise Lloyd's data
First public version released on CRAN on 3 December 2010
We presented googleVis at LondonR and useR! 2011
Project web site, with examples and case studies:
http://code.google.com/p/google-motion-charts-with-r/
|
|
Suppose you have an existing web page and would like to integrate the
output of a googleVis function, such as
gvisMotionChart
.
In this case you only need the chart output from
gvisMotionChart
. So you can either
copy and paste the output from the R console
R> print(M, 'chart') ## or cat(M$html$chart)
into your existing html page, or write the content directly into a
file
R> print(M, 'chart', file='myfilename')
and process it from there.
library(googleVis)
demo(WorldBank)
Here is a little example how you can use the googleVis package to display the participants of the R user conference 2011 in Warwick with a Geo Chart.
gvis-editor
option to customise the chart
Click on a coloured country and Wikipedia will be launched.
demo(googleVis)
/
#