Data

My first D3 graph

I’m trying to master D3, a javascript library for creating (interactive) web graphics. As an excercise, I redid this graph, which uses Eurostat data on the percentage of the population who have ever written a computer programme.

I can’t say it’s a very good graph: some of the most intriguing aspects of the data have to do with changes over time (decline in some countries, rather large growth in Finland, implausible fluctuations in the Netherlands), which don’t show very well in my graph. Nevertheless, it feels good to have coded my first interactive D3 graph.

P.s. the graph may not be visible in older versions of internet explorer.

ATMs and cycle paths

The habits of cyclists are shaping cities like Amsterdam. “There are many ATMs along the main bicycle path network”, urban planner Marco te Brömmelstroet told Vogelvrije Fietser, the magazine of cyclists’ organisation Fietsersbond.

The map above shows Amsterdam’s main cycle path network (provided by the city as open data) and the location of ATMs. It appears that many ATMs are indeed located near cycle paths. Exceptions include shopping areas such as the Kalverstraat, Gelderlandplein and Bijlmerplein. (I tried to calculate the distance between ATMs and cycle paths but I couldn’t get this to work in QGIS.)

Data viz course assignment: bailout and votes

The fourth assignment of the data visualisation course was to do something with this data on unemployment in US states, published by the Guardian Data Blog. My project could be summarised as ‘It’s the unions, stupid’.

P.S. I didn’t post my work for the third assignment on this blog. I’m afraid it wasn’t any good.

Update - Elsewhere, the impact of the bailout on the election is questioned as well.

Clint Eastwood won the LAUGHTER contest

I’m not sure what this says about the audiences at US national party conventions, but among a sample of 16 speeches, Clint Eastwood’s was the one that elicited the most laughter (Rand Paul’s got most applause). Among the presidential candidates, Obama won the applause contest, while being about equally funny as Romney.

For the second lesson of Alberto Cairo’s online data visualisation course, we were asked to comment on and perhaps redesign this convention word count tool created by the NYT. I wouldn’t be able to do such a cool interactive thing myself (I got stuck in the jQuery part of Codeyear), so I decided to focus on differences between individual speeches instead.

First I needed the transcripts – preferably from one single source to make sure the transcription had been done in a uniform way. As far as I could find, Fox News has the largest collection of transcripts online. As a result, Republican speakers are overrepresented in my sample, but that’s ok because the key Democratic speakers are included as well.

I wrote a script to do the word count (I’m sure this could be done in a more elegant way). One problem with my script was that html-code got included in the total word count. I thought I could correct this by subtracting 1,000 from each word count, but this didn’t work so well, so I had to make some corrections.

This assignment was a bit of a rush job so I hope I didn’t make any stupid mistakes.

85,1% kans dat Obama dinsdag wint

Volgens polling analyst extraordinaire Nate Silver is de kans 85,1% dat Obama dinsdag de presidentsverkiezing wint. Zijn voorspellingen roepen wel enige weerstand op. Als ik de discussie goed begrijp kunnen sommige mensen moeilijk bevatten dat er zo’n grote kans is dat Obama wint, terwijl de meeste peilingen maar een krappe overwinning voorspellen.

Silver heeft een kleurrijke achtergrond: ooit adviseerde hij bedrijven hoe ze hun belastingen zo laag mogelijk kunnen houden. Hij ontwikkelde een programma om statistieken van baseballspelers te analyseren en won als professionele online pokerspeler $400.000, om vervolgens weer $130.000 te verliezen.

Vervolgens ontwikkelde hij een model om verkiezingsuitslagen te voorspellen, waarbij hij gebruik maakt van een groot aantal polls en er onder meer rekening mee houdt hoe accuraat deze polls in het verleden waren. In 2008 wist hij de uitslag van 49 van de 50 staten correct te voorspellen, waarmee zijn reputatie was gevestigd.

In zijn blog op de website van de New York Times doet Silver de meest uiteenlopende voorspellingen, inclusief de relatieve kans dat een individuele kiezer de doorslag geeft - die kans is uiteraard het grootst in Ohio. Eerder opperde ik dat Obama wellicht zou kunnen winnen in North Carolina vanwege de hoge opkomst bij de early vote, maar volgens Silver is die kans maar 21%.

Pages