May 112012
 
Mapping local deviations from regional voting patterns in Germany

Political Science is the magpie amongst the social sciences, which borrows heavily from other disciplines. These days, many political scientists are actually failed economists (even more failed economists are actually economists, however). I used to think of myself as a failed sociologist, but reading the proofs it dawned on me that I might actually aspire to become a failed geographer.

Apr 262012
 

For the un-initiated: Geocoding is the fine art of converting addresses into geographical coordinates (longitude and latitude). Thanks to Google and some other providers like OpenStreeMap, this is now a relatively painless process. But when one needs more than a few addresses geocoded, one does not rely on pointing-and-clicking. One needs an API, i.e. a software library that makes the service accessible through R, Python or some other programming language.
geocode is a user-written Stata command that gives access to Googles API from within Stata. It takes a variable containing address strings and returns two new variables containing the latitude/longitude information

Apr 212012
 
Putting candidates in their place with R

Counting the number of mainstream candidates living in a constituency is a point-in-polygon problem: each candidate is a co-ordinate enclosed by a constituency boundary. R function overlay from package sp carries out the relevant operation. Counting candidates and mapping their number is easy if you remember one thing: VECTORISATION

Apr 202012
 
Islam 'does not belong in Germany'?

It’s silly season all over again: On the eve of this year’s ‘German Islam Conference’, Volker Kauder, head of the Christian Democrats in parliament and one of Merkel’s key alleys, declared that ‘Islam is not part of our tradition and identity in Germany and so does not belong in Germany.’. As an aside, he added that Muslims do belong to Germany and enjoy their full rights as citizens. Phew!