Skip to content

Instantly share code, notes, and snippets.

@mages
Created November 19, 2011 22:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mages/1379449 to your computer and use it in GitHub Desktop.
Save mages/1379449 to your computer and use it in GitHub Desktop.
library(XML)
participants=readHTMLTable(readLines("http://www.warwick.ac.uk/statsdept/useR-2011/participant-list.html"),
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment