Can Twitter predict the new Dutch trade union president

Number of tweets in which candidates are mentioned

According to an American study, you can predict the outcome of elections by simply counting how often the names of the candidates are mentioned on Twitter. Members of the Dutch union confederation FNV are currently voting for their new president (it has been claimed this is the first time in the world union members get to directly elect their confederation president). Would it be possible to predict who will be the new FNV president using Twitter?

Since last Friday, I’ve been collecting the tweets containing the term ‘FNV’; so far, there are over 2,500. In those tweets, the incumbent Ton Heerts is mentioned 204 times, whereas his challenger Corrie van Brenk is mentioned 146 times. In short, if Twitter is a good predictor (which of course is a matter for debate), the contest is tighter than one might have expected.

The graph above shows the results for the days for which complete data is available. On Saturday, Van Brenk got some attention because something she had said had been fact checked (and found to be correct). On Sunday, Heerts was mentioned because he appeared on a TV show hosted by Eva Jinek. On 1 May, it was officially announced who the candidates are and they had a debate.

Update - Updated to include 13 May, the final voting day. In sum, Van Brenk was mentioned 497 times and Heerts 631. It has since been announced that Heerts has won the election (of course, this doesn’t necessarily mean that the method is sound; in order to make such claims one would need to evaluate a fair amount of predictions).
Influences reflected in the graph include: Factcheck confirms Van Brenk statement (27 April); Heerts in Eva Jinek TV show (28 April); candidates officially announced (1 May); debate in Buitenhof TV show (5 May); problems at tax authorities that Van Brenk’s Abvakabo FNV had warned about (6 May); Van Brenk interview at (9 May); Van Brenk in radio show (10 May); Heerts at presentation of initiative to train technical staff (13 May); EenVandaag TV show poll predicts Heerts will win (13 May).
The graph may not be visible in older versions of Internet Explorer.


I collected tweets using the Twitter Streaming API (the ‘firehose’), in the way described here. I prepared the data using Python and analysed it using R (find the code on Github). The graph was created with D3.js.
I looked into how influential twitterers are (how many followers, how often listed) and into their backgrounds (e.g., do they mention ‘fnv’ in their profile). The most important finding is that twitterers who mention Van Brenk, more often mention ‘abva’ or ‘akf’ in their profile - not surprising since Van Brenk is currently president of Abvakabo FNV, the public sector union affiliated to the FNV.
The American study on Twitter as a predictor of election outcomes was done by DiGrazia c.s. and can be found here. Some remarks on their study:

  • Yes, twitterers are only a small part of the population and no, they’re not representative of the entire population. Likely, Twitter is dominated by a small, active incrowd. It’s also correct that tweets mentioning a candidate need not endorse them; they may as well be critical. Despite all this, DiGrazia c.s. found that mentions on Twitter consistently predict election outcomes. Perhaps they are an indicator of something else - e.g. media attention or how actively people are campaigning for a candidate.
  • Of course, this method doesn’t provide any certainty on who will win. It’s possible for a candidate to get almost 100% of the tweet share and still lose (at least, that’s what the scatterplots of DiGrazia c.s. suggest).
  • It’s unclear to what extent the conclusions of the American study can be generalised to other situations. It’s therefore a bit of a gamble to use this method to predict who will be the next president of the FNV.

Bicycling Science

A recent article discusses fifteen ways to cycle faster, so as to stay ahead of the e-bikes (via AmsterdamFietst). Some of the information is from a book called Bicycling Science. I had never heard of that book, but apparently it’s a classic which - among many other things - lists ‘some prescriptions for increasing speed at medium- or high-power levels’. These will not come as a big surprise: A combination of tight clothes, good body position and an ‘aerodynamically clean’ bicycle can reduce drag by 50% or more. Through training, a ‘basically fit rider’ can increase power by up to 30%. And of course, cyclists should properly inflate their tires. Reducing bicycle or body weight doesn’t seem to help much, at least not for cycling on a flat surface.

Bicycling Science is a technical book, but occasionally the cycling enthusiast gains the upper hand. For example, in a discussion of slope resistance, this observation pops up:

The author remembers riding up a hill with a maximum slope of 1 in 3.5 (grade of 30%), possibly Porlock Hill in Devon, United Kingdom, on a three-speed heavy bike (i.e., one having a low gear of around 36’’).

Much of the information in the book is too technical for me. Nevertheless, it’s fun to page through, if only for the intriguing graphs and for quotes like this:

Human observers are notoriously suggestible. When told that a given bicycle is special for some reason (carbon forks, selected by a world champion, designed for hard cornering), they easily convince themselves that it is.

And last but not least, the book has a great cover (designed by one Derek George).


German coalition parties hardly ask any questions

Nice: der Spiegel has launched a data blog, Datenlese. One of the first posts analyses questions asked by members of the lower house, the Bundestag. I thought it might be interesting to compare these findings to the Dutch situation. Unfortunately, der Spiegel doesn’t appear to publish the actual dataset they use in their analysis (unlike, for example, the Guardian Data Blog, which usually provides a spreadsheet with all the relevant data). [Update: the author kindly provides a link to the dataset here]

However, the Bundestag does publish statistics of parliamentary initiatives, as does the Dutch Tweede Kamer. A few conclusions:

  • The Bundestag asks about 75 questions per month. The Tweede Kamer more than three times as many, even though the Bundestag has four times as many members.
  • Written questions are primarily a tool for the opposition, but more so in Germany than in the Netherlands. In Germany, only 1% of questions are asked by members of coalition parties. In the Netherlands, 17% (or even 33% if former quasi-coalition party PVV is included).
  • In Germany, most questions are asked by the left-wing party die Linke and by the green party. Far fewer questions are asked by the social-democrats. A spokesperson told der Spiegel that the party knows from its experience as a former government party that questions ‘can paralyse the entire apparatus’. In the Netherlands, the social-democrats asked the largest number of questions in 2011. This hasn’t always been the case: when the social-democrats were still in government, they asked fewer questions and the left-wing SP headed the list.


Statistics of the current session of the Bundestag can be found here (pdf). Apparently, there is a distinction between ‘small’ and ‘large’ questions; the latter resulting in a debate. The number of large questions is very small; like der Spiegel I focused on the little questions. The Tweede Kamer is quite a bit slower than the Bundestag in publishing its statistics; I used the figures for 2011 published here.


Tribute to the rebellious cyclist

Apparently, bike couriers with fixies and cans of Grolsch hold an alternative commemoration each year on 4 May – the date of the official war commemoration – to honour their predecessors who were active during the German occupation. Pete Jordan writes about this in his book De Fietsrepubliek. The commemoration takes place at a small monument near the Martelaarsgracht, which reads:

At this location on 4 May 1945, the last courier of the resistance, Annick van Hardeveld, was murdered by the German occupier. She was 21 years old. This sign is a tribute to all who fought against injustice and oppression.

The text is reminiscent of a passage in Pete Jordan’s previous book, Dishwasher. In that book, he investigated the history of dishwashers and discovered that radical dishwashers had played a pioneering role in the American union movement. To honour them, he put up pieces of paper at various historical locations, with texts like:

On this spot in 1934, dishwasher Ramon Bolasquez smashed the windows of the Waldorf-Astoria during a strike by culinary union workers.


On this spot in March 1972, fifteen dishwashers fought for workers’ rights by staging a successful wildcat strike. And I, for one, thank them.

De Fietsrepubliek is a tribute to the Amsterdam cyclist. From the ‘possessed riding style’ of the bicycle boys who made deliveries for shops and laundrettes in the 1930s, to the organisations that fought for our right to cycle through the passage under the Rijksmuseum. Jordan writes about the anarchist reputation of cyclists and how the authorities time and again tried to discipline them; about the cycling monarchs Wilhelmina and Juliana; the antibicycle measures of the German occupiers; the fight for a bicycle-friendly city and the history of bicycle theft.

Perhaps these subjects aren’t new, but Jordan adds surprising details and new insights. For example, I had no idea that Queen Wilhelmina – when still just underage – appealed to the Council of State because her mother Emma wouldn’t let her ride a bicycle. Or that it was customary between the end of the 1950s and the mid-1970s in confrontations between youths and the police to unscrew the housings off bicycle bells and throw them at the police (tip: don’t skip the footnotes in the book).

Pink bicycle

One of the subjects Jordan has sunk his teeth into is the white bicycle plan launched in 1965. Provos wanted to make thousands of bicycles available for anyone to use for free. When the first white bicycles had been confiscated by the police, provos left flowers and painted a bicycle white at the statue of anarchist Ferdinand Domela Nieuwenhuis, near the Westerpark.

There have been at most a few dozen white bicycles in Amsterdam, but in the international media the project grew to mythical proportions. According to some, the white bicycle plan had been a fantastic failure; others claimed it had been a great success. The success stories were used to legitimize imitations: yellow bicycles in Portland, Oregon; purple bicycles in Spokane, Washington; red bicycles in Madison, Wisconsin; blue bicycles in Victoria, British Columbia; green bicycles in Tampa, Florida and pink bicycles in Olympia, Washington.

De Fietsrepubliek is full of such stories. Anyone even slightly interested in cycling or Amsterdam should read this book.

The original English version of De Fietsrepubliek, In the City of Bikes, will be published later this month.

Data analysis course

Cool, I’ve got my statement of accomplishment for the Data Analysis course. It was a lot of work and I learned a lot, but there’s still a lot more to learn and I might actually re-enroll if they offer this course again.