My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
UserR2011  
Updated Nov 19, 2011 by markus.g...@googlemail.com

Analysis of UseR! 2011 participants by country

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 (you could of course use a Geo Map instead):

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)

Comment by sxf...@gmail.com, Jan 22, 2012

perfect

Comment by img...@gmail.com, Aug 15, 2012

nice fig

Powered by Google Project Hosting