The attendants of useR! 2013 around the world

[This article was first published on rapporter, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Alex and I had a great time in Albacete this summer, where the annual useR! conference took place. Of course we were really interested in the exciting news on R development, new packages and other related topics that we hoped to hear about there, and we also wanted to present what we have created with our R packages and beside socializing and to meet some guys from SO and GH in real life at last, but I also really expected to meet some other Hungarian guys at the conference.

It turned out that I was the only attendant from Hungary – except for Szilárd Pafka, who has been living in the USA for a long time, so he does not really count by the strict standard 🙂 Since then, I know that there are a lot more R users living in Hungary, but I’ve just had the chance to verify my feeling that the number of attendees from East-Europe was rather low – as the official list of attendants has been recently published at the homepage of the conference:

> library(XML)
> d <- readHTMLTable('', which = 1, stringsAsFactors = FALSE)

That looks like:

> library(pander)
> pander(table(d[, 2]), split.table = Inf)

Converted to HMTL:
AustraliaAustriaBangladeshBelgiumCanadaCzech RepublicDenmarkEstoniaFinlandFranceGermanyHungaryIranIrelandIsraelItalyJapanKoreaLatviaMexicoNew ZealandNorwayPolandPortugalRussiaSerbiaSingaporeSloveniaSouth AfricaSouth KoreaSpainSwedenSwitzerlandTaiwanThe NetherlandsTurkeyUnited KingdomUnited StatesUSA

Well, it really seems that I was the only guy from Hungary, but at least Polish users were a lot more active from this region. Anyway, this list could use some cleaning and finishing touches with the help of e.g. the countrycode package:

> names(d) <- gsub(' ', '', names(d))
> library(countrycode)
> d$COUNTRY[which($COUNTRY, '', 'iso2c')))]
[1] "England" ""        "Letonia" "Madrid" 

It seems that there are some unidentified countries and even a missing one, let's fix that (with some desktop research):

> d$COUNTRY[which(d$COUNTRY == 'England')] <- 'United Kingdom'
> d$COUNTRY[which(d$COUNTRY == 'Letonia')] <- 'Latvia'
> d$COUNTRY[which(d$COUNTRY == 'Madrid')]  <- 'Spain'
> d$COUNTRY[which(d$NAME == 'Yurii Aulchenko')]  <- 'The Netherlands'

Much better! And I really hope that my guess was right about Yurii.

As I really liked the "Where is the R Activity?" post and found it extremely inspiring, I was also thinking about reproducing that kind of plot based on this data set. After fetching and loading the world map referenced in the article and aggregated our cleaned data, I have also created a new country ID variable in the aggregated dataset so that we could easily merge that to the shape file:

> ## aggregate
> d$flag <- 1
> counts <- aggregate(d$flag, by = list(d$COUNTRY), sum)
> names(counts) <- c("", "count")
> ## std name
> library(countrycode)
> counts$COUNTRY <- countrycode(counts$, '', 'iso2c')

Merging, magic and plotting was done just like in the original article:

Just cannot wait to render a similar cartogram next year!

To leave a comment for the author, please follow the link and comment on their blog: rapporter. offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)