What does Ireland want for Christmas? A fun trick we like to use every now and then to answer this type of question is to ask Twitter. This is pretty easily done using the Twitter streaming API and a little bit of very simple text processing. The Twitter streaming API allows you to collect a portion of the Twitter stream based on some filtering criteria – in particular search terms and locations (in spite of the fact that very few tweets have exact locations associated with the, Twitter locates most tweets to their nearest city). There are really nice APIs for most programming languages to make this especially easy – for example twitter4j for Java or tweepy for Python.
So, we might use the Twitter streaming API to collect tweets from Ireland (about latitude 51.28 to 55.32 and longitude -11.05 to -5.34) containing the text “all i want for christmas is” (we might also include some simple variants like “all i want for xmas is” and “all we want for christmas is“). Very quickly and easily we can collect a very large number of tweets – we ran this and collected 10,000 tweets over a few days. A simple word cloud (from the great tool Wordle) illustrating the frequency of words in this collection (with “all“, “i“, “want“, “for“, “christmas“, “is” and some other comment words like “and“, “a“, and “the” left out) shows Ireland’s romantic soul – the most popular thing that Ireland wants for Christmas is “you“, whoever you are!