googleVis 0.2.9

Today we published googleVis 0.2.9 on CRAN. The new version updates the package for the new features of the Google Visualisation API and brings a new in-page editor option.

Here is a simple example, displaying the participants of the R user Conference 2011 in Warwick by country. Notice the ‘Edit me’ button in the top left corner of the chart, which allows you to change and customise the graph.

library(XML)
url <- "http://www.warwick.ac.uk/statsdept/useR-2011/participant-list.html"
participants <- readHTMLTable(readLines(url), which=1, stringsAsFactors=F)
names(participants) <- c("Name", "Country", "Organisation")
## Correct typo and shortcut
participants$Country <- gsub("Kngdom","Kingdom",participants$Country)
participants$Country <- gsub("USA","United States",participants$Country)
participants$Country <- factor(participants$Country)
partCountry <- as.data.frame(xtabs( ~ Country, data=participants))
library(googleVis)
## Please note the option gvis.editor requires googleVis version >= 0.2.9
G <- gvisGeoChart(partCountry,"Country", "Freq", options=list(gvis.editor="Edit me") )
plot(G)

Citation

For attribution, please cite this work as:

Markus Gesmann (Sep 04, 2011) googleVis 0.2.9. Retrieved from https://magesblog.com/post/2011-09-04-googlevis-0-2-9/

BibTeX citation:

@misc{ 2011-googlevis-0.2.9,
 author = { Markus Gesmann },
 title = { googleVis 0.2.9 },
 url = { https://magesblog.com/post/2011-09-04-googlevis-0-2-9/ },
 year = { 2011 }
 updated = { Sep 04, 2011 }
}