D3.js

VVD mikt op rijke Amsterdammer; SP op buurt met lage opkomst

Landelijke politici kwamen dit weekend naar Amsterdam om mee te helpen met de campagne. Je mag ervan uitgaan dat er goed is nagedacht over de buurten die ze hebben bezocht: campagneleiders zullen zorgvuldig hebben gekeken naar de politieke, demografische en sociaal-economische kaart van Amsterdam. Welke keuzes hebben ze gemaakt en wat zegt dat over hun strategie?

Eerst wat achtergrond: kiezers van de PvdA en de SP wonen vaak in buurten waar de opkomst laag is. Voor deze partijen is het een logische strategie om te zorgen dat veel mensen in die buurten gaan stemmen. Hoog opgeleide, liberaal geöriënteerde kiezers gaan vaak al stemmen. Partijen die deze groep bedienen hebben dus minder te winnen bij opkomstbevordering en zullen op een andere manier moeten proberen stemmen te winnen.

PvdA

De PvdA stuurde zowel Diederik Samsom als Lodewijk Asscher naar het Osdorpplein in de buurt Osdorp-Oost. Bij de raadsverkiezing in 2010 was dit een buurt waar redelijk veel PvdA werd gestemd, al haalde de partij nog betere scores in buurten als de Bijlmer en de Kolenkit.

VVD

Jeanine Hennis bezocht het Museumkwartier: de één na duurste buurt van Amsterdam (naar woningwaarde), met een overwegend blanke bevolking en veel expats. Daarnaast stond de Noordermarkt op het programma. Officieel ligt deze buurt in de Jordaan maar hij grenst aan de Grachtengordel-West, een buurt met een vergelijkbaar profiel als het Museumkwartier.

In het Museumkwartier en de Grachtengordel-West stemden in 2010 veel mensen op VVD en D66. Dat Hennis naar deze buurten werd gestuurd geeft wel een hint wie de VVD-strategen als hun belangrijkste concurrent zien.

GroenLinks

Kamerlid Jesse Klaver kwam in februari naar de Oosterparkbuurt. In 2010 was dat één van de buurten waar GroenLinks de beste resultaten haalde.

SP

Emile Roemer bezocht de Van der Pekbuurt (Volewijck) in Amsterdam-Noord, waar de SP vier jaar geleden een goede uitslag had. Anders dan de PvdA koos de SP een buurt waar de opkomst vorige keer laag was. Blijkbaar is het doel om sociaal geöriënteerde kiesgerechtigden die mogelijk thuisblijven over te halen om toch te gaan stemmen. (Switch in de grafiek hierboven tussen Museumkwartier en Volewijck om te zien hoe de twee buurten elkaars spiegelbeeld vormen.)

D66

D66 heeft zich niet zoveel aangetrokken van de gegevens op buurtniveau en stuurde Alexander Pechtold vorige week naar het exclusieve Hyperion Lyceum aan het Tolhuisplein in Amsterdam-Noord. Dit adres ligt in de buurt Buiksloterham. Sociaal-economisch scoort deze niet zo hoog en voor wat betreft de verkiezingsuitslagen heeft O+S deze buurt gemakshalve samengevoegd met Volewijck.

Op basis van de cijfers op buurtniveau is Buiksloterham niet echt een buurt waar je Pechtold zou verwachten. Maar het is een langgerekte buurt en daarbinnen vormt Overhoeks, waar het Hyperion ligt, een nieuwbouwgebied dat sterk in opkomst is. Het is een handige lokatiekeuze om je te profileren als hip en pro-onderwijs, al komt het bezoek aan het lyceum misschien wat elitair over.

Komende woensdag komt een bus met (landelijke?) D66-politici naar stations. De lokatie is nog niet bekend, maar een voor de hand liggende gok is dat ze een station bezoeken waar je hoog opgeleide forenzen tegenkomt. Zeg Amsterdam Zuid.

Slovenians seem to buy more bicycles than the Dutch or even Danes

Mona Chalabi of the Guardian has collected data on car and bicycle sales and concludes that bicycle sales not only outnumber car sales, but that the gap has widened. The title of the article suggests the recession might play a role, but this article by Fabian Küster of the European Cyclists’ Federation - who uses the same sources - suggests it’s «an idle hope to believe that as soon as Europe’s economy recovers, car sales will go up again to pre-crisis levels».

If you look at car sales per 1,000 population, it turns out the Slovenians are Europe’s most enthusiastic bicycle buyers (that’s assuming the bicycle sale data for Slovenia are correct - this article quotes a lower number but gives no source). If you look at the bicycle sales to car sales ratio the picture changes considerably - likely because fewer cars are sold in poorer countries.

Embed code for the graph (the graph probably doesn’t work in older versions of IE):

<iframe src = "https://dirkmjk.nl//2013/bikeSales/bikeSales2.html" frameborder=0 width = 510 height=610 scrolling='no'></iframe>

Cycling: Garmin altimeter compared to elevation databases

During a very rainy ride in Scotland, my Garmin altimeter appeared to be off: on some of the steepest climbs it failed to register any gradient. Afterwards, I tried the «elevation correction» feature on the Garmin website, which generously added over 750m to the total ascent the device had measured. This was certainly more satisfying, but it left me wondering. Can the weather affect the Garmin altimeter? And how accurate is the recalculated ascent?

Garmin’s recalculation service works basically by looking up the gps locations of your ride in an elevation database. Strava offers a similar service. Below, I analyse the Garmin and Strava recalculations for a number of rides. Note that this is only an exploratory analysis and that no firm conclusions can be drawn on the basis of this rather small set of observations. That said, here are some preliminary conclusions:

  • If you want to boost your ego, let Garmin recalculate your ascent: chances are it will add (quite) a few metres. Strava’s recalculations tend to stay closer to the original measurement. When it does make changes, it frequently lowers the number of metres you’re supposed to have climbed, especially on relatively flat rides.
  • In theory, you’d expect weather changes to affect the ascent measured by the device, because the altimeter is basically a barometer. In practice, weather changes don’t seem to have much effect on the altimeter.
  • It appears plausible that heavy rain does in fact mess with the altimeter.

In the graphs below, the colour of the dots represents the region of the ride. Red dots represent the Ronde Hoep, a flat ride to the south of Amsterdam. Blue ones represent the Kopje van Bloemendaal (north, south), the closest thing to a climb near Amsterdam (it’s not high but quite steep). Green dots represent the central area of the country and include the Utrechtse Heuvelrug, Veluwezoom, Rijk van Nijmegen and Kreis Kleve (the latter in Germany).

General

By default, the graph above shows how much the Garmin recalculation differs from the ascent measured by the device (graphs may not show in older versions of Internet Explorer). The closer a dot is to the dashed line, the the closer the recalculated ascent is to the original measurement.

For rides shown on the left part of the graph, where the device measured less than 500m ascent, Garmin’s recalculation often adds about 50 to 100% or more. With higher ascents, the recalculated ascent is closer to the original measurement, although it still tends to add about 30 to 50%. The highest dot to the far right of the graph is the rainy ride in Scotland; here Garmin’s recalculation added over 35%.

With the selector above the graph, you can select the Strava recalculation. You’ll notice the scale on the y axis changes (and the dashed line moves up). Also, a few red dots enter the graph. These are rides along the Ronde Hoep, which is a flat ride. For these rides, Garmin’s recalculation added up to 750% to the ascent measured by the device; therefore these dots were initially outside the graph area.

The Strava recalculations are similar to the Garmin ones in that the correction is larger for relatively flat rides. Unlike Garmin, Strava lowers the ascent in these cases, often by 15 to 50%. For rides where the device measured a total ascent of over 500m, the Strava recalculation tends to be pretty close to the original measurement.

Weather changes

It has been suggested that changes in the weather may affect elevation measurements. This makes sense, since the Garmin altimeter is in fact a barometer. Wikipedia says that pressure decreases by about 1.2 kPa for every 100 metres in ascent. In other words, if net atmospheric pressure would rise by 6 mBar, this would cause the device to underestimate total ascent by about 50 metres, so the theoretical effect wouldn’t seem to be huge.

The graph above shows how much recalculations differed from the original measurement, with change in pressure on the x axis. Note that the effect of recalculations is here in metres, not percent. I tried different combinations of pressure measures and recalculations and in only one case - the Garmin recalculation shown above - the correlation was statistically significant (and the regression line much steeper than the Wikipedia data would suggest), so this is not exactly firm evidence for an effect of weather change on elevation measurement.

Heavy rain

It has been suggested that heavy rain may block the sensor hole and thus affect elevation measurement. This may sound a bit weird, but I have seen the device stop registering any ascent during very heavy rain. Among the rides considered here, there are two that saw really heavy rainfall (the Scottish ride and a ride in Utrechtse Heuvelrug on 27 July). These do show some of the largest corrections, especially in the Strava recalculation. So it does seem plausible that rain does in fact affect elevation measurement.

In the spirit of true pseudoscientific enquiry, I tried to replicate the effect of heavy rain by squirting water from my bidon onto the device during a ride in Utrechtse Heuvelrug. This didn’t yield straightforward results. At first, the device registered implausibly steep gradients and it turned out it had interpreted the hump between Maarn and Doorn as 115m high, more than twice its real height. About halfway, unpredicted rain started to fall, mocking my experiment. Strava recalculation didn’t change much to the total ascent but it did correct the height of the bit between Maarn and Doorn, so it must have added some 50+ metres elsewhere. Be it as it may, the «experiment» does seem to confirm that water can do things to the altimeter.

Method

I took total ascent data measured by my Garmin Edge 800 and obtained a recalculation from the Garmin Connect and Strava websites. Subsequently, I looked up weather data from Weather Underground (as an armchair activist I do appreciate their slightly subversive name). Weather Underground offers historical weather data by location, with numerous observations per day. I wrote a Python script that looks up the data for the day and location of the ride and then selects the observations that roughly overlap with the duration of the ride. There turned out to be two limitations to the data. First, it appears that only data at the national level are available (the Scottish ride yielded data for London and all Dutch ones data for Amsterdam). Second, for the day / location combinations I tried there was no time-specific data for precipitation available, only for the entire day.

Because of these limitations, I also took an alternative approach, looking up data from the Royal Netherlands Meteorological Institute KNMI. This did yield more fine-grained data, although obviously limited to the Netherlands. In the end it turned out that it didn’t make much difference for the analysis whether KNMI or Weather Underground data is used. Code from the scripts I used for looking up weather data is here.

I tested quite a few correlations so a couple of ‘false positives’ may be expected. I didn’t statistically correct for this. Instead, I took a rather pragmatic approach: I’m cautious when there’s simply a significant correlation between two phenomena but I’m more confident when there’s a pattern to the correlations (e.g., Garmin and Strava recalculations are correlated in a similar way to another variable).

The spread of the fast food strikes in the USA

[Updated 6 December 2013] - On 29 November last year, 200 workers in fast food restaurants in New York went on strike to demand decent wages. What seemed exceptional at the time, has only grown since, culminating in a national day of fast food strikes in over 100 cities last week.

Their demands are justified, the NYT noted: “we’re talking about big, profitable companies, which are big and profitable in part because they rely on underpaid labour”. You can support these workers by telling fast food chains like McDonald’s and Burger King that low pay is not ok.

Embed code for the map (may not display in older versions of internet explorer):

<iframe src="https://dirkmjk.nl/2013/fastfood/fastFoodStrikeMap.html" frameborder=0 width=510 height=380 scrolling='no'></iframe>

Method

Data on strikes was collected from various sources and may be incomplete. I used d3.js to draw the map and setTimeout to time the transitions. For some reason I couldn’t get this to work with a for-loop without the latest transition terminating the previous ones or all transitions using the last value of i, so I hard coded each step of the iteration.

Pages