Calendar charts with googleVis

April 1, 2014
By

(This article was first published on mages' blog, and kindly contributed to R-bloggers)

My little series of posts about the new googleVis charts continues with calendar charts.

Google's calendar charts are still in beta, but they provide already a nice heat map visualisation of calendar year data. The current development version of googleVis supports this new function via gvisCalendar. Here is an example displaying daily stock price data.


For the code below to run you will require the developer version (≥ 0.5.0-4) of googleVis from GitHub and R ≥ 3.0.2.

I suppose the biggest current drawback is that the colours of the cells cannot be defined by the user. However, this should change with future versions of the Google Chart Tools. For more information and installation instructions see the googleVis project site and Google documentation.

Interestingly, the calendar chart looks very similar to the visualisation R. Wicklin and R. Allison from SAS used for the winning poster at the Data Expo 2009. Paul Bleicher created a function in R, based on lattice that creates a very similar output. You may recall David Smith's blog post about this.



Session Info

R version 3.0.3 (2014-03-06)
Platform: x86_64-apple-darwin10.8.0 (64-bit)

locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] grid stats graphics grDevices utils datasets methods
[8] base

other attached packages:
[1] googleVis_0.5.0-4 chron_2.3-45 lattice_0.20-24

loaded via a namespace (and not attached):
[1] RJSONIO_1.0-3 tools_3.0.3

To leave a comment for the author, please follow the link and comment on his blog: mages' blog.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.