A twitterbot for the Extreme Right Bibliography

I’m still collecting references for the next iteration of the Extreme Right Bibliography (but I am almost there. Honest to God. Really). Meanwhile, while I should have probably been doing other things, I’ve brushed up my fairly rudimentary R skills and taught myself how to write a similarly rudimentary twitterbot. If you are reading this,…

What are the most important journals for Radical Right research?

Which publishers are the most relevant for Radical Right research? Good question. https://twitter.com/FFRBookSeries/status/789509504576651269 Radical Right research by type of publication Currently, most of the items in the The Eclectic, Erratic Bibliography on the Extreme Right in Western Europe (TM) are journal articles. The books/chapters/articles ratios have shifted somewhat over the years, reflecting both general trends…

Five bumper years for Radical Right research

Five bumper years for Radical Right research 1

For the past 15 years or so, I have maintained an extensive collection of references on the Radical/Extreme/Populist/New/Whatever Right in Western Europe. Because I love TeX and other command line tools of destruction, these references live in a large BibTeX file. BibTeX is a well-documented format for bibliographic text files that has been around for…

Analysing Facebook with R

I’ve recently discovered Rfacebook, which lets you access public information on Facebook from R. In terms of convenience, no package for R or Python that I have seen so far comes near. Get yourself a long-lived token, store it as a variable, and put all posts on a fanpage you are interested in into one…

Embarrassing Parallelism: I Got 99 Problems, but a Core ain’t One

Somewhat foolishly, my university has granted me access to Mogon: not the god, not the death metal band but rather their supercomputer, which currently holds the 182th spot in the top 500 list of the fastest computers on the planet. It has some 34,000+ cores and more than 80 TB of RAM, but basically it’s just a very large bunch of Linux boxes. That means that I have a rough idea how to handle it, and that it happily runs my native Linux Stata and MPlus (and hopefully Jags) binaries for me. It also has R installed, and this is where my misery began.

Easy Google geocoding in Stata

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

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

Sampling from a Multinomial Distribution in Stata

Sometimes, a man’s gotta do what a man’s gotta do. Which, in my case, might be a little simulation of a random process involving an unordered categorical variable. In R, sampling from a multinomial distribution is trivial. rmultinom(1,1000,c(.1,.7,.2,.1)) gives me a vector of random numbers from a multinomial distribution with outcomes 1, 2, 3, and…

Web-scraping made easy: outwit

These days, a bonanza of political information is freely available on the internet.  Sometimes this information comes in the guise of excel sheets, comma separated data or other formats which are more or less readily machine readable. But more often than not, information is presented as tables designed to be read by humans. This is…