googleVis 0.2.14 is released

February 5, 2012
By

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

Version 0.2.14 of the googleVis package was released on CRAN today.

Changes

The help files have been checked against changes of the Google Visualisation API, typos in the vignette have been ironed out (thanks to Pat Burns for pointing them out), a new section on dealing with apostrophes in column names has been added and the example in the section "Setting options" has been reviewed. For more details and demos check out the project site.

New Feature

Additionally a new visualisation function has been added: gvisBubbleChart, which provides an interface to the bubble chart of the Google Visualisation API. You could think of it as a static version of the motion chart. Here are some examples, followed by a motion chart.



library(googleVis)
data(Fruits)

P <- lapply(2008:2010, function(x)
gvisBubbleChart(subset(Fruits, Year %in% x), idvar="Fruit",
xvar="Sales", yvar="Expenses",
colorvar="Location", sizevar="Profit",
options=list(width=400, height=300,
colors='["#B2EE2C", "#3F4FFF"]',
title=paste("Fruit data ",x,", bubble size reflects profit", sep=""),
sizeAxis="{minValue: 0, maxSize: 12}",
vAxis=paste("{title: 'Expenses', viewWindow:{min:65, max:95},",
"baselineColor:'#EEEEEE', gridlines:{color:'#EEEEEE'}}"),
hAxis=paste("{title: 'Sales', viewWindow:{min:70, max:115},",
"baselineColor:'#EEEEEE', gridlines:{color:'#EEEEEE'}}")
))
)
bubbleCharts <- gvisMerge(P[[1]], gvisMerge(P[[2]], P[[3]]))

M <- gvisMotionChart(Fruits, "Fruit", "Year",
options=list(width=430, height=360))
plot(gvisMerge(bubbleCharts, M))

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...

Tags: , ,

Comments are closed.