[Contact]

Daily breaking news

πŸ”’
❌ About FreshRSS
There are new available articles, click to refresh the page.
Before yesterdayNews from Amsterdam

Trust instead of algorithms

By DIRKMJK

A number of Dutch cities have contracted a company named Totta data lab to predict which welfare recipients may have committed fraud (the cities were somewhat secretive about this approach, but newspaper NRC wrote about it last spring). Totta has trained algorithms on a considerable amount of personal data: 2 to 3 hundred variables over a period of 25 years.

Such analyses carry the risk that existing biases are reproduced:

Luk [A Totta spokesperson] says that in some municipalities more fraud is found among people who have a partner (e.g., they don’t report income), whereas in others it is people without a partner (failing to report they live together). «But it’s quite possible that only that group has been investigated and we build our algorithms on that.»

Luk says they sometimes add ‘deviant’ citizens to the suspects, apparently in an attempt to look beyond the usual suspects.

Another problem is the lack of transparency regarding how this type of algorithms work. Totta doesn’t disclose its algorithms because it wants to protect its business interests; further, it can be difficult to interpret and explain how algorithms work. As a result, the government is unable to explain what criteria it uses to prepare decisions that affect citizens. Recently, the Dutch Council of State expressed concerns over digital decision-making by the government.

Proponents of algorithms argue that they help to detect more fraud while reducing the burden for innocent citizens. In fact, there may not be such a clear distinction. The organisation of welfare agencies said that alleged welfare frauds are often people who mean no harm, but who get into trouble as a result of complex and ambiguous welfare rules.

Still, Amsterdam city council member Anne Marttin (VVD) finds the approach interesting. She asked if Amsterdam uses algorithms and data mining to detect welfare fraude. The answer is no. This is why:

The city government is aware of the use by other municipalities of algorithms and/or data mining to fight welfare fraud. The city does not use such instruments to deal with or prevent welfare fraud. […]

Our services for welfare recipients are based on trust. Further, the city government attaches great importance to the privacy of citizens and the way in which their data is used by the government, for example to develop algorithms. The city government thinks it’s very important that the use of data mining and algorithms doesn’t have a negative impact on the privacy and the legal protection of citizens.

Source (pdf)

  • September 16th 2018 at 13:18

Scooter-free cycle tracks in Amsterdam

By DIRKMJK

Amsterdam plans to ban scooters from most cycle tracks. Currently, cycle tracks are still used by the so-called snorfiets category which has a speed limit of 25km/h - although most ride (much) faster. The measure will make cycle tracks safer for cyclists, and it will also result in cleaner air on cycle tracks.

The city has produced a map showing the new snorfiets regime. By my calculations, snorfietsen will have to use the road on a total of 180km (blue on the map) and they will be banned from another 71km of routes where there’s only a cycle track (marked in red). However, they’ll still be allowed to use about 93km of cycle tracks (green), at least for now.

Busy cycle tracks

To decide where to ban scooters from the cycle track, the city used data from the Fietstelweek, the large-scale initiative to collect smartphone location data from cyclists. This is interesting, since governments have complained that the number of participants in the Fietstelweek is declining (they started experimenting with Strava data instead).

Perhaps that’s why the city of Amsterdam used the 2016 edition of the Fietstelweek (rather than 2017) to assess how busy cycle tracks are. It used its own traffic counts to validate the Fietstelweek data. The Mathematics Centre of the University of Amsterdam deemed the method used ‘reliable and suitable’.

I’ve created a map to show how the new snorfiets regime compares to Fietstelweek data. The width of the pink lines corresponds to the number of cyclists who used a route; the green dotted line shows where snorfietsen will still be allowed to use the cycle track.

It appears that the city has done a decent job at avoiding the busiest cycling routes (in some cases, this is because these routes don’t have separate bicycle tracks to begin with).

That said, some problems remain. One example is the cycle track along the IJ north of Central Station, which can be very busy and where some snorfiets riders overtake other traffic in a dangerous way. And there’s the Amsterdamse Brug and Schellingwouder Brug (the bridges to the northeast of Amsterdam), where cycle tracks are too narrow for snorfietsen.

Making all cycle tracks scooter-free

In the future, the city intends to ban scooters from all mandatory cycle tracks within the A10 Ring Road. Obviously, they want to do this without compromising the safety of snorfiets riders. This will be easier on routes where car speed is already low.

The map below shows the current average car speed on major roads. The green lines indicate where snorfiets riders will initially be allowed to continue using the cycle track.

Of course I don’t know what the situation is when you’re reading this, but likely some of the highest car speeds (on sections where snorfietsen will initially be allowed to use the cycle track) will be on the Gooiseweg, entering the city centre from the southeast, and the aforementioned Amsterdamsebrug and Schellingwouderbrug. On those bridges, many motorists exceed the speed limit. The city wants to change the road design to invite lower speeds before banning snorfietsen from the cycle track.

Elsewhere, it should be relatively easy to make the remaining cycle tracks scooter-free. Of course, a more practical solution would be to abolish the snorfiets category altogether.

If you wish to respond to the city’s plans, you can use this form. The deadline is 24 September.

Method

I used Qgis to create the first map and Leaflet for the second. I used GeoPandas and Shapely to calculate lengths. On the first map, the width of the pink may be slightly distorted due to varying distances between cycle routes in opposite directions.

  • September 2nd 2018 at 08:38

Alas! They don’t make the Joep bicycle anymore

By DIRKMJK

Photo: Gonca Akyar

[This is a translation of an article from 2016] - I think the Joep bicycle - and the women’s version Ari - were launched in 2008. Joep Salden, owner of a bicycle shop in Utrecht, designed a minimalistic, functional bicycle, without any unnecessary accessories. The only concession was a bicycle bell. «You’ll need one; on this bicycle you’ll overtake anyone», Salden said when I bought my greyish green Joep in 2009.

I’m happy with my Joep and I’m not the only one: Utrecht alderman Lot van Hooijdonk owns one too. TestKees, the bicycle tester of cyclists’ organisation Fietsersbond, tested a number of fast city bicycles in 2009. His conclusion at the time:

Joep and Ari mainly stand out because of the minimalistic assemblage and the beautiful classic look. The frame and the parts go well together. (…) It’s clearly faster than the VanMoof and much faster than the luxurious city bicycles with gear hub and suspension that have been so popular in the Netherlands for years.

For Salden, the fact that his bicycles look good came second. «I appreciate that people are enthousiastic about how it looks, but for me the most important thing is for them to ride off thinking: that’s a smooth ride!», he said in an interview. The bicycle was supposed to last at least ten years.

Imitation

Coincidence or imitation: by now, there are various bicycles on the market with designs and colours reminiscent of Salden’s bicycles. Take the citybike, since rebranded courier bike, introduced by the Hema department store in 2011. On the face of it, they look a lot like the Joep and Ari - even though the execution is inferior, with wide aluminium tubes and a comfort saddle.

In Amsterdam, I was once addressed by the owners of a bicycle shop at the Weesperplein. They said my Joep was a beautiful bicycle, but also an imitation of the Achielle bicycles they sold. But I don’t think it’s true Salden has imitated Achielle. That said, Achielle has beautiful Sam and Saar bicycles that show similarities to the Joep and Ari.[1]

Interestingly, Salden had his frames built in Belgium. Achielle is also based in Belgium, and has its origins in a family business of frame builders. It wouldn’t surprise me if the Joep frames used to be built by Achielle.

[Update: on Twitter, Achielle has since stated that they used to build the Joep bicycles and that the frames are the same as those of the Sam and Saar.]

Someone else once said my Joep is reminiscent of the VanMoof bicycle produced in Amsterdam, but I have to disagree. Tastes differ, but I think the Joep is restrained and elegant, whereas the VanMoof is neither.

Out of business

Currently, I use my Joep in Utrecht, where I work. It isn’t as shiny anymore as when I bought it, but it’s still a beautiful bicycle. What’s more, it still runs very smoothly, even though it has seen little maintenance.

Meanwhile, I needed a new bicyle in Amsterdam. I reckoned I’d just buy another Joep. But the website of Salden’s bicycle shop, Het Fietspad, was no longer online and its phone number had been disconnected.

At the location of Het Fietspad, there’s now another bicycle shop, Cycleworks, with beautiful old road bicycles hanging from the wall. They told me that Salden is out of business for good. In fact, he has been for a while, as I found out later.[2] Alas!

Meanwhile, I’ve placed an order for a shiny black Achielle Sam with path racer handlebars. Also quite nice.


  1. Especially the version with the lightly bent Miel handlebars. The oldest references to the Sam and Saar I could find on Google are from 2010 - that’s why I don’t think Salden imitated them.  ↩

  2. According to the Chamber of Commerce, Het Fietspad went out of business on 14 January 2015.  ↩

  • August 13th 2018 at 18:41

Is tourist dispersion working? An analysis of Lonely Planet maps

By DIRKMJK

Discussion

For more than fifteen years, Amsterdam has been trying to convince tourists to visit areas outside the city centre. There is a concern that the inner city is approaching the limit of how many tourists it can handle.

To explore the effect of these policies, I analysed changes in the maps in Lonely Planet guides. Over the past years, sights have been added in areas outside of the inner city - mostly areas that had already been affected by gentrification. Still, the large majority of sights are still in the traditional tourist areas, in the city centre and some parts of the Zuid district.

It appears that the effect of tourist dispersion policies is modest at best - and not nearly enough to compensate for the growth of tourism. Reducing the impact of tourism may well require a different approach - for example targeting hotel capacity and low-cost flights to Schiphol Airport.

Dispersion policies

In its coalition agreement, the new city government said that the positive aspects of tourism are increasingly overshadowed by its negative effects, putting the liveability of some neighbourhoods at risk. One of the ways to deal with this is spreading tourists over the city (and the surrounding region). Amsterdam is to be primarily a place where people live and do business, and only in the second place a tourist destination.

The idea to disperse tourists is not new. In 2016, Amsterdam launched a campaign to promote areas outside the inner city. Interestingly, the campaign caused a bit of a controversy when politicians noticed the Nieuw-West district had been left out of a promotional map. Amsterdam Marketing responded that ‘in our professional opinion’, the district is currently ‘less suitable to be offered as a primary alternative to the city centre’. They argued that neighbourhoods must first be embraced by locals, which suggests that city marketing follows gentrification.

In 2009, Amsterdam planned to promote the eastern parts of the city as ‘the new (2nd) Museum Quarter’; the Northern IJ Waterfront as ‘Creative City’, the Westerpark as a variation on Berlin’s ‘Kulturbrauerei’; the Eastern Harbour Area as Docklands; de Pijp as ‘Quartier Latin’ and Oud-West as ‘Notting Hill’.

And as early as 2001, the tourism board warned that the inner city had almost reached the limit of how many tourists it can handle. «But where should they go? To IJburg for architecture; fun shopping at the Arena Boulevard in Zuidoost and visit the former GVB tram depot in Oud-West.»

A common denominator of the campaigns is that they target repeat visitors. As the tourism board explained in 2001, «we don’t want to send first-time foreign visitors to the outskirts».

Lonely Planet maps

To get an idea of the impact of these policies, I analysed changes in the sights shown on maps in Lonely Planet guides (for caveats, see Method below). If tourists turn to new parts of the city, you’d expect these areas to show up on those maps. Further, in 2009, the tourism board started seinding information about sights outside the city centre to publishers of travel guides. «Inclusion in the guides is not guaranteed, but this often happens.»

2006 is a bit of an outlier. A number of sights outside of the city centre were added, only to disappear again in the next edition (see below, Sights that were dropped). If you zoom in on specific neighbourhoods, you’ll notice more changes. For example:

  • A number of sights in Oost were added in 2012: Oosterpark (including De Schreeuw, Slavery Memorial and Spreeksteen), Dappermarkt and Frankendael;
  • In 2018, a number of sights in Noord were added, including some at the former NDSM Wharf, EYE Film Museum and Nieuwendammerdijk.

The table below shows the percentage of sights per district:

District 2000 2006 2012 2016 2018
Stadsdeel Centrum 84 74 78 78 75
Stadsdeel Zuid 10 12 11 11 10
Stadsdeel Oost 1 3 6 5 6
Stadsdeel Noord 2 1 0 0 5
Stadsdeel West 3 5 4 5 4
Stadsdeel Nieuw-West 0 1 0 0 0
Stadsdeel Zuidoost 0 1 0 0 0
Wijk 00 Amstelveen 0 3 0 0 0

There has been an increase in especially Oost and Noord, but the large majority of sights are still in Centrum and in Zuid (which includes the Museumplein).

Sights that were dropped

In each edition, new sights are added and others are dropped. The latter category includes sights that don’t exist anymore, such as the Netherlands Media Art Centre, the Vakbondsmuseum (trade union museum) and temporary locations of the Stedelijk Museum. Other sights apparently fell out of grace with the authors.

The authors of the various editions have their own preferences and interests. For example, Andrew Bender, author of the 2006 edition, appears to be a bit of a health enthousiast. He added many sports facilities and fitness centres, which explains why his edition had more sights outside the city centre. Most of these were dropped in the next edition. In 2012, Karla Zimmerman and Sarah Chandler added many hofjes (~almshouses). Again, most of them didn’t make the next edition.

Method

I used the following editions of the Lonely Planet Amsterdam guide:

2000: Rob van Driesum, Nikki Hall
2006: Andrew Bender
2012: Karla Zimmerman, Sarah Chandler
2016: Catherine Le Nevez, Karla Zimmerman
2018: Catherine Le Nevez, Abigail Blasi

I analysed sights in the legends of the maps at the end of the guides. The maps also include categories like eating, drinking, sleeping and entertainment. I focused on sights, reckoning that this category would likely present less problems when you want to geocode information from old maps. Note that the classification of especially the 2000 edition is somewhat different from later editions.

It’s possible that errors occured in geocoding or in copying data from the guides. If you spot any errors, please let me know.

Obviously, Lonely Planet maps are not a perfect measure of tourism dispersion. On the other hand, if there had been major shifts in the areas tourists visit, it seems rather unlikely they wouldn’t be reflected in the sights Lonely Planet shows on its maps.

  • August 5th 2018 at 10:32

Circular Metro and Tram map of Amsterdam

By DIRKMJK

This weekend, Amsterdam’s new North-South metro line will open. To celebrate the occasion, Straatkrant Z! offers a free copy of Eric Hammink’s beautiful circular Metro and Tram map of Amsterdam. Z! is a newspaper sold by homeless people.

Seven years ago, Hammink designed the first version of his map, modelled after the pattern of the city’s canals. At the time, there was talk about Amsterdam’s public transport company GVB adopting the map, but apparently they haven’t. A missed opportunity.

The map is also used in Hammink’s iPhone route planner app.

  • July 20th 2018 at 16:46

Converting Election Markup Language (EML) to csv

By DIRKMJK

Note that the map above isn’t really a good illustration here because I used a different data source to create it.

Getting results of Dutch elections at the municipality level can be complicated, but what if you want to dig a little deeper and look at results per polling station? Or even per candidate, per polling station? For elections since 2009, that information is available from the data portal of the Dutch government.

Challenges

The data is in Election Markup Language, an international standard for election data. I didn’t know that format and processing the data posed a bit of a challenge. I couldn’t find a simple explanation of the data structure, and the Electoral Board states that it doesn’t provide support on the format.

For example, how do you connect a candidate ID to their name and other details? I think you need to identify the Kieskring (district) by the contest name of the results file. Then, find the candidate list for the Kieskring and look up the candidate’s details using their candidate ID and affiliation. But with municipal elections, you have to look up candidates in the city’s candidate list (which doesn’t seem to have a contest name).

Practical tips

If you plan to use the data, here are some practical tips:

  • Keep in mind that locations and names of polling stations may change between elections.
  • If you want to geocode the polling stations, the easiest way is to use the postcode, which is often added to the polling station name (only for recent elections). If the postcode is not available or if you need a more precise location, the lists of polling station names and locations provided by Open State (2017, 2018) may be of use. Use fuzzy matching to match on polling station name, or perhaps you could also match on postcode if available. Of course, such an approach is not entirely error-free.

Further, note that the data for the 2017 Lower House election is only available in EML format for some of the municipalities. I guess this has something to do with the fact that prior to the election, vulnerabilities had been discovered in software to count the votes, so they had to count the votes manually.

Python script

Here’s a Python script that converts EML files to csv. See caveats there.

  • July 20th 2018 at 08:14

The orientation of Amsterdam’s streets

By DIRKMJK

Eight days from now, Amsterdam will have a new metro line traversing the city from north to south. But what about the orientation of the city’s streets?

Geoff Boeing - who created a Python package for analysing street networks using data from OpenStreetMap - just published a series of polar histograms of American and ‘world’ cities. Amsterdam isn’t among them, but Boeing made his code available, so I used that to create charts for the largest cities in the Netherlands.

While the pattern isn’t nearly as monotonous as in most American cities, I’m still surprised how many streets in Amsterdam run from north to south or from east to west. The Hague has a strong diagonal orientation; Rotterdam doesn’t seem to have a dominant orientation and Utrecht is a bit in between.

With Boeing’s code, you can also do the analysis specifically for roads that are accessible to cyclists, but for Amsterdam that doesn’t make much difference since most roads are.

Discussion

15 July 2018 - There was some really interesting discussion on Twitter in response to my post from last Friday (I use Twitter names to refer to people; most sources are in Dutch).

Curved streets

Both Sanne and Egon Willighagen asked how the chart treats curved streets. I have to admit I hadn’t checked, but the docstring of the add_ege_bearings function explains that it calculates the compass bearing of edges from origin node to destination node, so that implies that streets are treated as if they were straight lines.

Is that a problem? Probably not for many US cities, for they seem to have few curved streets. As for Amsterdam: most people’s mental image of the city is probably dominated by the curved canals of the city centre. However, many neighbourhoods consist of grids of more or less straight streets. So perhaps curved streets have little impact on the analysis after all.

Length versus surface

Hans Wisbrun argues that the chart type is nice, but also deceptive. The number of streets is represented by the length of the wedges, but one may intuitively look at the surface, which increases with the square of the length. In a post from 2013 (based on a tip from Ionica Smeets), he used a chart by Florence Nightingale to discuss the problem.

Rogier Brussee agrees, but argues that a polar chart is still the right choice here, because what you want to show is the angle of streets.

In a more general sense, I think the charts are an exploratory tool that’ll give you an idea how street patterns differ between cities. If you really want to understand what the wedges represent, you’ll have to look at a map.

Beach ridges

That’s what Stephan Okhuijsen did. He noted that the chart for The Hague appears to reflect the orientation of the city’s coastline. Not quite, Christiaan Jacobs replied. The orientation of the city’s streets is not determined by the current coastline, but by the original beach ridges.

I don’t know much about geography (or about The Hague for that matter), but a bit of googling suggests Jacobs is right. See for example this map (from this detailed analysis of one of The Hague’s streets), with the old sand dunes shown in dark yellow.

See also links to previous similar work in this post by Nathan Yau (FlowingData).

  • July 13th 2018 at 07:55

Gentrification mapped

By DIRKMJK

The map makers of the City of Amsterdam have created a map that shows the Neighbourhood Street Quota or BSQ. The BSQ plays a key role in a highly controversial reform that is eroding the city’s social ground lease policy, but that’s not the topic of this article. For now, I’m interested in the BSQ as an indicator of land value.

As the city government puts it, «the high BSQs are found at popular locations in the city and the low BSQs at less popular locations in the city» (for details see Method, below). Unsurprisingly, the centrally located Centrum and Zuid districts have high BSQs and the peripheral areas have low BSQs.

More interesting is how the BSQ has changed. The city government has provided data for thousands of streets or street segments, for 2014 and 2016. Of course, this is a short time period and the patterns may or may not reflect longer-term developments.

The chart below shows the distribution of BSQs for flats (as opposed to single-family dwellings) for 2014 and 2016.

The peak has moved to the right, as the median value has risen from 28 to 38. For political reasons, the BSQ can never be lower than 5 or higher than 49, which explains the large number of streets with a value of 5 or 49. This implies that rises in BSQ don’t fully reflect how much land values have risen.

The map below shows how much BSQs for flats have risen in different parts of Amsterdam. I omitted streets with low or high BSQs where substantial changes in BSQ may have been hidden by the upper and lower limits. At the high end, this applies to the Canal Belt and much of the Zuid District. At the lower end, this applies to many peripheral areas including almost the entire Zuidoost District.

Red streets indicate an increase of the BSQ by more than a half; orange streets an increase by less than a half and the rare green streets a decrease of the BSQ. There are some red areas outside the ring road: mainly the IJburg expansion to the east; some parts of Nieuw-West; and Buitenveldert. Buitenveldert is a neighbourhood south of the Zuidas business district with a growing number expats and students among its residents.

Within the ring road, BSQs are rising in areas that are often associated with gentrification, such as the Kolenkit in West, the Vogelbuurt in Noord and the Indische Buurt in Oost. Perhaps more surprising is Betondorp, a low-income area with many older residents, described in 2015 as «one of the few neighbourhoods in Amsterdam not yet affected by the advance of gentrification». If the BSQ is an indication, that may be about to change.

Method

A list (pdf) of BSQs for 2016 and 2014 was recently sent to the city council. The BSQs are referred to as 2018 and 2017, but are based on data from 2016 and 2014 respectively (or to be more precise: the ‘2017 BSQ’ uses data from 2015 or 2014, whichever is lowest). The map created by the City of Amsterdam uses the ‘2017 BSQ’.

For each house, the municipality calculates an individual land quota using the formula: land value / (land value + theoretical cost of rebuilding the house). The land value is obtained by subtracting the rebuilding cost from the total value of the house (WOZ).

Subsequently, BSQs are calculated as the average land quota per street (or street segment if a street traverses multiple neighbourhoods). This is done separately for single-family dwellings and flats.

The interpretation of the BSQ is a bit tricky: one should expect higher land values to be reflected in higher BSQs, but the exact relationship will depend on the value of the building and whether that also responds to changes in land value (for example, because more expensive materials are used).

In my analysis, I only used BSQs for flats, and only the streets or street segments for which a BSQ is available for both 2014 and 2016 (thus excluding new urban expansions).

For the map, I also excluded streets where an increase of the BSQ by less than half may be hidden by the lower or upper limit of the BSQ: those with a 2014 value of 5 and a 2016 value of less than 8; and those with a 2014 value above 32 and a 2016 value of 49.

In creating the map I also ignored long streets that traverse multiple neighbourhoods and that therefore have been separated into multiple segments. Constructing street segments from line geometries representing the entire street seemed like a lot of work (perhaps there’s a simple way to do this, but I couldn’t find it).

I used Tabula to extract data from the original pdf; this Python script to process the data, create a csv for the chart and create a shapefile for the map; D3.js for the chart and Qgis to create the map (using Open Street Map map data and Stamen Toner Lite for the background).

  • June 17th 2018 at 08:04

Dutch governments consider using Strava data

By DIRKMJK

Strava is a popular app to record bicycle rides. For some years, the company has been trying to sell its data to local governments for traffic planning. NDW, a platform of Dutch governments including the city of Amsterdam, has bought six months’ worth of Strava data to give it a try.

The switch to Strava may mean the end of the Fietstelweek, an annual one-week effort to collect bicycle data from thousands of volunteers. In the past, I’ve used Fietstelweek data to analyse waiting times at traffic lights. The Fietstelweek received funding from the same governments that are now experimenting with Strava data.

One reason why they are looking for alternatives is that the number of Fietstelweek participants is lower than they’d like. They seem to have a point. Consider for example the map below, which shows bicycle routes to and from Amsterdam Central Station.

As such, it’s an interesting map. Unsuprisingly, it seems that intensity is highest near the bicycle parking facilities. Main access routes appear to be the Geldersekade (with the sometimes chaotic crossing with Prins Hendrikkade) and the Piet Heinkade. It seems that people cycling to and from Central Station are somewhat more likely to live in the eastern part of the city.

There’s one caveat though: the numbers are small. Even the busiest segments represent at most 40 rides. One loyal Fietstelweek participant recording her commute during the entire week could literally change the map.

Strava has far larger numbers, but its data raises different kinds of questions. Strava calls itself ‘the social network for athletes’ and wants to know if you use a road bike, a mountain bike, a TT bike or a cyclocross bike (no option ‘other’ available). So how representative is Strava data of people who use their city bike for commutes and other practical purposes?

Strava’s response to such questions is that they’re trying to make the app less competition-focused and more social, with Facebook-like features. This should help them collect data about ‘normal’ bike rides. They have also argued that «especially in cities, those with the app tended to ride the same routes as everyone else».

But is that really true? Strava’s heatmap (choose red and rides) for Amsterdam could perhaps be interpreted as a combination of recreational rides (Vondelpark, Amstel) and cyclists trying to get in or out of the city as quickly as possible (plus quite a few people who recorded their laps at the Jaap Eden ice skating rink as bicycle rides).

Perhaps you could find a way to filter out ‘lycra’ rides and end up with a sufficient number of ‘normal’ rides. Then again, almost three-quarters of bicycle rides in the Netherlands are under 3.7 km, and I suspect very few of those short rides end up on Strava.

There’s also a socio-economic aspect. It has been argued that Strava is used most by people living in wealthier neighbourhoods, which aren’t necessarily the neighbourhoods most in need of better cycling infrastructure.

Of course, bicycle use is unequal in the first place, which is also reflected in Fietstelweek data. The map below shows the start and end points of rides for Amsterdam.

Density is highest in the area within the ring road and south of the IJ. The number of trips per 1,000 residents also correlates with house values: more bicycle trips start or end in affluent neighbourhoods. As said, this probably reflects actual patterns in bicycle use and not a problem of the data.

To summarise, Fietstelweek has smaller numbers than one would like, while Strava data raises questions about representativeness. One way for Strava to help answer these questions would be to make a subset of its Amsterdam data available as open data.

This Python script shows how the analysis was done.

  • June 10th 2018 at 10:15

The Digital City

By DIRKMJK

Amsterdam has a new coalition agreement. The paragraph on democratisation and the Digital City was well received - a London-based researcher from Amsterdam liked the plans so much she decided to translate them into English.

The new coalition wants to create a democratic version of the smart city. Citizens should be in control of their data. The city will support co-operations that provide an alternative to platform monopolists. An information commissioner will see to it that the principles ‘open by default’ and ‘privacy by design’ are implemented.

The agreement also lists a number of issues the city is (or was) already working on:

  • City council information will be opened up. In 2015, the city council asked to make documents such as council meeting reports, motions, written questions etc available as open data. Since, some of that data has been made available through Open Raadsinformatie, but as yet no solution has been found for offering all council information in a machine readable form.
  • Freedom of information requests (Wob requests) will be published. Amsterdam started publishing decisions on Wob requests earlier this year; so far three have been [published][wob].
  • Interestingly, Amsterdam wants to use open source software whenever possible. Over ten years ago, Amsterdam planned a similar move, and its plans were sufficiently serious to needle Microsoft. In 2010, the plans foundered on an uncooperative IT department.

All in all, a nice combination of new ambitions and implementation of ‘old’ plans.

  • May 27th 2018 at 09:09

Dutch government drops 3D pie charts

By DIRKMJK

The Dutch government has replaced pie charts with bar charts in it’s annual reports, someone noted on Twitter (via @bokami). Pie charts aren’t always a bad choice - contrary to the view of some adherents of the stricter school in data visualisation. But 3D pie charts are really hard to justify and it’s a bit awkward they were still used one year ago.

The charts are from the 2016 and 2017 reports of the Department of Social Affairs and Employment.

  • May 20th 2018 at 08:38

How to use Python and Selenium for scraping election results

By DIRKMJK

A while ago, I needed the results of last year’s Lower House election in the Netherlands, by municipality. Dutch election data is available from the website of the Kiesraad (Electoral Board). However, it doesn’t contain a table of results per municipality. You’ll have to collect this information from almost 400 different web pages. This calls for a webscraper.

The Kiesraad website is partly generated using javascript (I think) and therefore not easy to scrape. For this reason, this seemed like a perfect project to explore Selenium.

What’s Selenium? «Selenium automates browsers. That’s it!» Selenium is primarily a tool for testing web applications. However, as a tutorial by Thiago Marzagão explains, it can also be used for webscraping:

[S]ome websites don’t like to be webscraped. In these cases you may need to disguise your webscraping bot as a human being. Selenium is just the tool for that. Selenium is a webdriver: it takes control of your browser, which then does all the work.

Selenium can be used with Python. Instructions to install Selenium are here. You also have to download chromedriver or another driver; you may store it in /usr/local/bin/.

Once you have everything in place, this is how you launch the driver and load a page:

from selenium import webdriver
 
URL = 'https://www.verkiezingsuitslagen.nl/verkiezingen/detail/TK20170315'
 
browser = webdriver.Chrome()
browser.get(URL)

This will open a new browser window. You can use either xpath or css selectors to find elements and then interact with them. For example, find a dropdown menu, identify the options from the menu and select the second one:

XPATH_PROVINCES = '//*[@id="search"]/div/div[1]/div'
element = browser.find_element_by_xpath(XPATH_PROVINCES)
options = element.find_elements_by_tag_name('option')
options[1].click()

If you’d check the page source of the web page, you wouldn’t find the options of the dropdown menu; they’re added afterwards. With Selenium, you needn’t worry about that - it will load the options for you.

Well, actually, there’s a bit more to it: you can’t find and select the options until they’ve actually loaded. Likely, the options won’t be in place initially, so you’ll need to wait a bit and retry.

Selenium comes with functions that specify what it should wait for, and how long it should wait and retry before it throws an error. But this isn’t always straightforward, as Marzagão explains:

Deciding what elements to (explicitly) wait for, with what conditions, and for how long is a trial-and-error process. […] This is often a frustrating process and you’ll need patience. You think that you’ve covered all the possibilities and your code runs for an entire week and you are all happy and celebratory and then on day #8 the damn thing crashes. The servers went down for a millisecond or your Netflix streaming clogged your internet connection or whatnot. It happens.

I ran into pretty similar problems when I tried to scrape the Kiesraad website. I tried many variations of the built-in wait parameters, but without any success. In the end I decided to write a few custom functions for the purpose.

The example below looks up the options of a dropdown menu. As long as the number of options isn’t greater than 1 (the page initially loads with only one option, a dash, and other options are loaded subsequently), it will wait a few seconds and try again - until more options are found or until a maximum number of tries has been reached.

MAX_TRIES = 15
 
def count_options(xpath, browser):
 
    time.sleep(3)
    tries = 0
    while tries < MAX_TRIES:
 
        try:
            element = browser.find_element_by_xpath(xpath)
            count = len(element.find_elements_by_tag_name('option'))
            if count > 1:
                return count
        except:
            pass
 
        time.sleep(1)
        tries += 1
    return count

Here’s a script that will download and save the result pages of all cities for the March 2017 Lower House election, parse the html, and store the results as a csv file. Run it from a subfolder in your project folder.

Notes

Dutch election results are provided by the Kiesraad as open data. In the past, the Kiesraad website used to provide a csv with the results of all the municipalities, but this option is no longer available. Alternatively, a download is available of datasets for each municipality, but at least for 2017, municipalities use different formats.

Scraping the Kiesraad website appears to be the only way to get uniform data per municipality.

Since I originally wrote the scraper, the Kiesraad website has been changed. As a result, it would now be possible to scrape the site in a much easier way, and there would be no need to use Selenium. The source code of the landing page for an election contains a dictionary with id numbers for all the municipalities. With those id numbers, you can create urls for their result pages. No clicking required.

  • May 13th 2018 at 09:54

The pay gap between CEO and workers

By DIRKMJK

The Dutch Corporate Governance Code has been revised. As a result, Dutch listed companies have started to report their internal pay ratios. These pay ratios are often thought of as the gap between CEO pay and what other workers in the firm get paid.

How can you use these ratios? One way is to create a Fat Cat Calendar. The inspiration here is the British phenomenon of Fat Cat Day: the day when CEOs have earned as much as their employees will earn in an entire year.

The calendar shows that by 2 January at quarter to five in the afternoon, the Heineken CEO had earned more than his workers over all of 2017.

Some firms are missing from the calendar. For example, Euronext says it’s complicated to calculate a pay ratio, because they operate in different countries (but then, this would apply to most listed companies). Shell has calculated a pay ratio, but they don’t report how high it is - only how it compares to the pay ratios of a selection of other companies.

Note that a pay ratio is not a simple and straightforward figure. Below is an exploratory analysis of some of the issues involved (see Method section below for caveats).

Heineken

Heineken, which has by far the highest reported pay ratio in my sample (215), argues this is a consequence of their business model.

First, Heineken does a lot of business in ‘emerging markets with widely different pay levels and structures compared to the Netherlands and Europe’. In other words, many workers are in low-wage countries. The underlying suggestion seems to be that you don’t have to pay these workers the same wages as their colleagues in Europe.

Second, Heineken has ‘a large number of breweries and sales forces in-house worldwide, which adds to the variety of pay within the Company’ (the treatment of Heineken sales staff in Africa is controversial, but that’s a different matter). Aside from the question whether Heineken are paying their brewery and sales workers enough, they do have a point here.

Many companies have simply outsourced their low-paid workers. It’s a bit arbitrary to compare CEO pay to employees of the firm but not to the outsourced workers who clean their offices, serve their lunches, fix their computers, and manufacture and sell their products.

Third, Heineken says that pay ratios can be very volatile because of the substantial bonuses that go up and down. One might argue that this is not a problem of the pay ratio, but a problem of the composition of CEO pay.

Anyone can calculate a ratio

According to the Corporate Governance Code, firms should report the ‘ratio between the remuneration of the management board members and that of a representative reference group determined by the company’. This leaves ample room for firms to decide how to calculate the ratio. For that reason, comparing ratios between firms is a bit tricky.

In practice, many firms calculate the pay ratio as the ratio between total CEO pay and total staff costs per FTE. This is information that is normally included in the annual report, so you can calculate the pay ratio yourself.

I calculated pay ratios for a sample of companies listed in Amsterdam and compared these to the pay ratios these companies reported in their annual report. The chart below shows how my calculated pay ratios compare to the reported pay ratios.

In many cases, my calculated pay ratios are quite similar to the pay ratios reported by the companies. It’s interesting to look into some of the examples where this is not the case, and why this might be:

  • Some CEOs were appointed during 2017 and therefore weren’t paid an entire year’s remuneration. I didn’t correct for this, so my calculated pay ratio is too low in these cases. An example is AkzoNobel, which correctly reported a higher pay ratio than the one I calculated.
  • Randstad probably used only corporate employees and not ‘candidates’ (temp workers) to calculate their pay ratio. This would explain why they arrived at a smaller gap between CEO and workers than the one I calculated.
  • Other companies also use a subset of their employees for their calculation. Assuming these are relatively well-paid employees, the gap between CEO and workers will appear smaller that way. An example is OCI, which used only employees in Europe and North-America as a reference group. Unilever takes this approach one step further by comparing CEO pay to their various UK and Dutch management work levels. This resulted in a range of pay ratios, each far smaller than the one I calculated.
  • A few companies use the average remuneration of the entire executive board, rather than CEO remuneration, to calculate the pay ratio. Assuming the CEO earns more than the other board members, this will also make the gap with workers appear smaller. An example is AMG, which argues that using average board remuneration is appropriate ‘given the collective management responsibility of the Management Board members’ (this is somewhat ironic, for ‘collective responsibility’ was apparently not a key consideration when they decided to pay the CEO 50% more than the other board members).

Discussion

I think it would be fair to say that the requirement to report pay ratios is a failed attempt at transparency. Since firms can use whatever method they want to calculate the ratio, comparisons across firms are problematic. Meanwhile, anyone can calculate ratios from data that is already available. While this isn’t entirely unproblematic (see Method section below), the ratios you calculate will probably be more consistent across firms than the reported ratios.

Instead of requiring firms to report a pay ratio, it would make more sense to require them to report CEO pay, staff costs and staff numbers in a more consistent and transparent way.

Further, it’s somewhat arbitrary to compare CEO pay only to employees of the firm, and not outsourced workers such as cleaners. A fair measure of inequality should look beyond the employees of the firm. One option is to compare CEO pay to the median income in a country; another is the norm which states that CEO pay should not be higher than 20 times the legal minimum wage. Of course, a limitation of these approaches is that they don’t capture international inequality.

The highest CEO-to-minimum wage ratio for the firms in my sample is 577 (Unilever). By 1 January 2017 at quarter past three in the afternoon, the CEO of Unilever had earned a the minimum wage for an entire year. If you want to narrow this gap, there are broadly two ways to do it: show more restraint in CEO remuneration, and raise the minimum wage.

Method

I calculated ‘Fat Cat Day’ by simply adding one year, divided by the pay ratio, to 1 January 2017:

d1 = dt.datetime.strptime('2017-01-01', '%Y-%m-%d')
d2 = dt.datetime.strptime('2018-01-01', '%Y-%m-%d')
year = d2 - d1
 
dates = defaultdict(list)
for i, row in df.iterrows():
    if pd.notnull(row.ratio_reported_17):
        ratio = row.ratio_reported_17
        fcd = d1 + year / ratio
        date = dt.datetime.strftime(fcd, '%Y-%m-%d')
        time = dt.datetime.strftime(fcd, '%H:%M')
        company = row.company
        item = {
            'time': time,
            'company': company
        }
        dates[date].append(item)

Note that the British High Pay Centre has a far more elaborate method to calculate Fat Cat Day, which considers how many hours CEOs work, whether or not they work weekends, etcetera. While this is very conscientious, I don’t think it’s necessary. CEOs are paid on an annual basis, and if they work less than a full year, they’ll generally receive a (more or less) proportional share of their annual pay, regardless of the actual number of hours worked.

I googled for annual reports of companies listed on the Amsterdam stock exchange (in a few cases, I also looked up a separate remuneration report). I didn’t always find one, which can be for a number of reasons: perhaps I didn’t look hard enough; perhaps companies hadn’t filed their report yet; or perhaps they filed it with the company register but didn’t publish it online. As a quick filter, I disregarded reports that don’t contain the term pay ratio. All in all, this is a rather pragmatic sample, which may not be representative of all Amsterdam-listed companies (for example, it’s conceivable that firms with stronger roots in the Netherlands are more inclined to comply with the Corporate Governance Code). For exploratory purposes, I think that’s ok.

I calculated the pay ratio dividing total CEO pay by the average total staff costs per FTE. This may sound straightforward, but it isn’t:

  • I had to manually copy data from pdfs, so errors can’t be excluded;
  • Different methods may be used to calculate CEO pay (I used the total amount as reported by the company, without checking the method they used to calculate it);
  • It’s not always clear which categories of workers are included in staff costs and staff numbers;
  • If possible I used FTE for staff numbers, but sometimes only headcount is reported and some reports don’t specify what unit they used;
  • If possible I used the average number of staff, but sometimes only the number of staff at the end of the year is reported;
  • I didn’t annualise CEO pay for CEOs who were appointed during 2017. It might seem simple to do so (total pay * 365 / number of days worked), but in some cases CEO pay appears to contain elements that are not dependent on the number of days worked (e.g., the annual incentive at Philips Lighting).

All but two companies in my sample use EUR as presentation currency. I pragmatically used the average exchange rate for 2017 as reported by OCI to convert USD to EUR.

For the minimum wage, I used the average of the rates per 1 January and 1 July 2017, and added 8% holiday pay.

The ‘20 times minimum wage’ norm has been ascribed to trade union FNV, but that’s not technically correct.

The data I used can be found in this csv file. Please let me know if you find any errors.

  • April 29th 2018 at 08:22

Voter revolt in Amsterdam

By DIRKMJK

In the 21 March municipal election, many Amsterdammers voted for new parties. The map below shows the effect this had on parties that already had seats on the city council. Red circles represent polling stations where the established parties lost; the rare green circles show where they won. The size of the circles corresponds to their gain or loss in percentage points.

Established parties lost across the city, but less so in Centrum and Zuid. The voter revolt was felt most in the peripheral districts Nieuw-West, Noord and Zuidoost, followed by parts of West and Oost. At some polling stations, support for the established parties declined by 15 to over 30 percentage points, with a peak of 43 percentage points.

The success of the new parties has been explained by ethnic background (especially DENK gained substantial ethnic minority support), but there’s also a socio-economic component. The chart below, showing results at the neighbourhood level, illustrates this. The share of votes for the new parties DENK, FvD, BIJ1 plus ChristenUnie is larger than the loss of the established parties, because they also won votes from parties that didn’t make the city council four years ago.

The new parties got their votes mainly in the less affluent neighbourhoods of Amsterdam, as measured by the average value of houses. This doesn’t have much impact on pro-market parties like VVD and D66, which get most of their votes in the richer parts of the city. For the social-democrat PvdA and socialist SP, things are different. The chart below shows what happened to their voters. Grey circles represent the 2014 election; red ones the situation in 2017/2018 (the scale on the y-axis is slightly different from the one above).

First, it should be noticed that most circles have moved to the right: the value of houses has increased significantly over the past years. This effect tends to be somewhat stronger in richer neighbourhoods. As a result, inequality has increased.

In 2014, PvdA and SP had considerable support in the less affluent neighbourhoods, but those are also the neighbourhoods where they lost most on 21 March. By now, their support there is hardly larger than in the richer neighbourhoods anymore. This effect is strongest for the PvdA (note that this effect doesn’t apply to other left-wing parties like GroenLinks).

Over the past years, concern has grown over Amsterdam’s social divide. The 21 March election outcome can be seen as a reflection of this inequality. In the less affluent peripheral neighbourhoods, established parties lost votes, as new parties grew.

The winner of the election, green party GroenLinks, has opted not to invite these new parties to the negotiations for a coalition agreement. In itself, there’s nothing wrong with that choice. Meanwhile, the new city government will need to come up with a credible answer to the city’s social divide. GroenLinks has often identified this as one of the key issues that need to be addressed.

For data sources and method, see the Dutch version of this article.

  • April 8th 2018 at 19:24

The impact of #deletefacebook

By DIRKMJK

This is turning into a bit of a series: in previous posts, I showed how there’s a yearly peak in people googling “delete facebook” around New Year, the time for New Year’s resolutions. The peak is even higher than for “quit smoking”.

Against the backdrop of the latest Facebook controversy, Whatsapp co-founder Brian Acton helped launch a #deletefacebook campaign. Below is an update of my previous chart, which gives a preliminary impression of the impact of this campaign.

Some caution is in order, for recent Google Trends data can sometimes be a bit unstable. Also, it’s possible that currently some people are googling “delete facebook” out of curiosity, without actually intending to delete their account. That said, the impact of the current campaign may well be substantially larger than the annual New Year’s peak.

  • March 25th 2018 at 09:01

Search Facebook by date

By DIRKMJK

Henk van Ess and Daniel Endresz have created a tool to search Facebook by date or date range. The tool creates a url containing the search criteria (as with Facebook Graph). It uses Javascript to generate the search urls. For example, this is how the date range url is generated:

function generate_url_timerange() {
 
    var keyword = $('#input-timerange-keyword').val();
 
    var day1 = $('#select-timerange-day1').val();
    var month1 = $('#select-timerange-month1').val();
    var year1 = $('#select-timerange-year1').val();
 
    var day2 = $('#select-timerange-day2').val();
    var month2 = $('#select-timerange-month2').val();
    var year2 = $('#select-timerange-year2').val();
 
    var url = 'https://www.facebook.com/search/str/'+keyword+'/stories-keyword/'+day1+'/'+month1+'/'+year1+'/date-3/'+day2+'/'+month2+'/'+year2+'/date-3/stories-2/intersect'
 
    $('#btn-search-timerange').attr('href', url);
}

The tool has been published with an open source license. The creators indicate that they «respect your privacy and the cases you are working on, so we are not storing any searches you will make» - which is nice, even if it would seem to be of little consequence since you need to be logged into Facebook to use the tool.

  • March 13th 2018 at 09:43

Topics discussed in the Amsterdam city council, 2006-2018

By DIRKMJK

The other day, I downloaded the reports of 205 city council meetings and 1,116 council committee meetings of the Amsterdam city council. These can be used to write a brief recent history of Amsterdam politics.

The charts below show how often certain terms were used (per 100,000 words). Data for 2006 is incomplete and of course, this applies also to 2018. Therefore, the columns for those years have a lighter colour. And note that the scale on the y-axis varies.

Information about more recent political developments can be found in this English-language voting advice application for Amsterdam.

Airbnb

Airbnb was launched in 2008 and it appears that the first listing in Amsterdam dates from January 2009. As of 2013, the negative impact of Airbnb on liveability and on housing prices started to become an issue. Initially, the city saw Airbnb as a partner in tackling these issues, but the relationship became increasingly distrustful. Amsterdam started to scrape the Airbnb website to gain independent data and introduced a requirement to report the use of Airbnb.

Allochtoon

The Netherlands has a bit of an obsession with ethnic background. People born in the Netherlands may still be registered as allochtoon if one of their parents is foreign-born. Statistics Netherlands even keeps data on third generation allochtonen - people who have at least one foreign-born grandparent.

While there has never been a serious debate about these registrations; there has been debate about the use of the term allochtoon. By 2013, the city of Amsterdam decided not to use the term anymore. By then, the council itself had long all but stopped using it.

Crisis

It won’t come as a surprise that the term crisis was used a lot in 2009. There was some debate about the nature of the crisis:

Mr. VERWEIJ [right-wing VVD] proposes not to speak of the credit crunch, but of the financial crisis […]
Mr. IVENS [socialist SP] says it pleases him that Mr. Verweij also wants to call the credit crunch an economic crisis. He awaits the moment it will be called a crisis of capitalism.

That didn’t really happen. Over the past years, the term credit crunch was used 223 times in the city council; economic crisis 206 times; financial crisis 59 times; climate crisis 36 times and crisis of capitalism 4 times (the list is not exhaustive).

Eviction

In 2010, a national squatting ban came into force. There has been quite a bit of debate in the city council on how it should be implemented; specifically focusing on the eviction of ‘breeding places’ like Schijnheilig and squats where refugees with no alternative housing lived. Dilan Yeșilgöz (VVD) and Marijke Shahsavari (christian-democrat CDA) argued for prosecuting squatters, which Ruger Groot Wassink (GroenLinks) called using police resources for right-wing hobbies.

Open source

Over ten years ago, there was broad support in the city council for ending the contract with Microsoft and switching to open source software. Not only would Amsterdam become independent of expensive provider contracts; it would also help promote Amsterdam as a city that promotes new developments in IT.

An attempt to end the Microsoft contract as of 2008 failed. In 2009, the city started installing OpenOffice.org and Firefox. A lobbyist for Microsoft complained that the company was all but banned from the city.

But in 2010, it became clear that the project had failed. Apparently, the city’s IT department was uncooperative:

Alderman WIEBES thinks that commitment on the part of the government and civil servants is spotty. Also, one may ask whether the wishes of the city council were consistent with what city departments deemed realistic.

Schiphol

When Lodewijk Asscher became alderman in 2006, it had been all but decided to privatise Schiphol Airport. But Amsterdam owns 20% of the airport, and Asscher wasn’t convinced that privatising it served the city’s interests. In his book De ontsluierde stad, he describes how he was put under pressure by the political and corporate elites. Among them was Wilco Jiskoot of ABN AMRO:

Condescending little smile. Did I realise the flotation would happen no matter what? What ambitions did I have for my life after politics?

Asscher persevered and blocked the privatisation. By now, no-one seriously seems to think it’s a good idea to privatise Schiphol anymore. In fact, many parties think the city, in its role as shareholder, should become more involved in the airports policies.

After 2006, the airport continued to appear on the city council agenda. Topics discussed include safety risks, after the Turkish Airlines crash in 2009; health risks caused by ultra-fine particles and the working conditions of cleaners and security staff.

Scooter

The number of snorfietsen (scooters allowed to use the bicycle path) in Amsterdam is growing steadily. Citizens sounded the alarm: in 2008 on air pollution and in 2009 because cyclists no longer felt safe on bicycle paths.

Fjodor Molenaar of GroenLinks adopted the issue. After other approaches yielded little results, he tabled a proposal to ban scooters from bicycle paths in 2012. The debate has since moved to the national parliament, which should allow Amsterdam to introduce scooter-free bicycle paths.

City districts

For some reason, it is deemed necessary to restructure Amsterdam’s administrative system every four years. In 2010, fourteen districts were merged into seven; in 2014, the districts got bestuurscommissies instead of district councils, with limited powers; and this year these will be replaced with stadsdeelcommissies with hardly any powers at all.

By 2015, it became clear that local media were losing interest in district politics. The chart above suggests their relevance is decreasing in the eyes of the city council as well.

Red light district

In 2008, Alderman Lodewijk Asscher launched the Coalitieproject 1012, named after the postcode of the Wallen (red light district). The aim was to get rid of criminal entrepreneurs, if necessary by buying their real estate. Currently, the Accounting Office is carrying out an evaluation of the programme. It appears that the number of prostitution windows has decreased. They have been replaced with bars, restaurants, shops and tourist-oriented businesses.

Information about more recent political developments can be found in this English-language voting advice application for Amsterdam.

  • March 4th 2018 at 09:13

Windchill

By DIRKMJK

On average, a windchill (gevoelstemperatuur) of –15 occurs three times per year in the Netherlands. «One can weather that with extra scarfs and a warm hat.» And if people do freak out, there’s still weatherman Gerrit Hiemstra, who will argue for common sense and warm sweaters.

1. January 2010

Only die-hard homeless people still sleep outdoors. «Last year, a homeless person told our mobile team: ‘Get lost, it’s only minus eightteen’. But now most are indoors. At least they’re somewhat sensible. Especially with the wind freshening, the cold feels disagreeable.»

2. December 2010

It’s the coldest December in over fourty years.

According to satirical website De Speld, anti-swearing group Bond tegen het Vloeken objected against describing the cold with swearwords. The Bond tegen het Vloeken takes a different position. According to a spokesperson, it’s rather cold today.

3. February 2012

At 7 February in the morning, the windchill was exceptionally low. At many places, windchill dropped to –25 degrees at dawn.

Carnival fever has reached high levels, but the mercury stays behind. Building clubs [for carnival floats] are stuck with cans of frozen paint and are working at Siberian cold locations.

In Russia, they’re not impressed with the Dutch minus 15. Minus 36, that’s cold.

4. March 2013

In central Netherlands, March 2013 was the coldest since 1962; in England it was even the coldest March since 1883. The cold air was supplied by an exceptionally strong and persistent current from Siberia.

Weatherman Gerrit Hiemstra sees only one solution: ‘Let’s make this a warm sweater weekend’.

  • March 2nd 2018 at 13:52

The fastest speaker of the Amsterdam City Council

By DIRKMJK

I’ve downloaded the reports of 205 city council meetings (as well as 1,116 council committee meetings) from the website of the City of Amsterdam. They contain over 38 thousand text fragments spoken by council members. Each fragment comes with an indication how long the council member had the floor. From this, it should be possible to calculate how fast council members speak.

The chart below shows the correlation between speech duration and the number of words, for the current city council period (see Method for caveats):

There’s a strong correlation: longer speeches contain more words (rank correlation 0.95), which shouldn’t come as a surprise. The median rate is over 158 words per minute, but this varies per council member. The red dots represent Jan Paternotte, the fastest speaker of the city council (he has since become a member of the national parliament). During this council period, his median rate was over 185 words per minute.

This doesn’t mean he rushes through his text. Here is an example (starting at approximately 59 minutes) where Paternotte speaks at his characteristic rate. For comparison, the speech by Daniel van der Ree (starting at approximately 6:08) is close to the median rate for all council members.

It’s tricky to compare these outcomes with data from other sources, but with that caveat: Paternotte speaks faster than the average news reader at BBC radio, but slightly slower than radio news readers of the French RF or the Italian RAI (not to mention the Spanish RNE).

UPDATE - Valid criticism of the chart title here (in Dutch).

Method (and an update on open council data)

For this analysis, I used the ‘old’ source for city council information. When I had almost finished, a press release announced that council information is now available as open data. Amsterdam participates in the commendable Open Raadsinformatie programme, which aims to make the city council information of over one hundred Dutch municipalities available as open data, in a uniform format. This will make it easier for journalists, researchers, app developers and anyone else who is interested to access and use this data.

Council members in Amsterdam have for quite some time been asking for open city council information. Participation in Open Raadsinformatie was meant to provide for this. However, at this moment only council meeting reports and voting results are available, and only in pdf format. This means that Amsterdam trails cities like Utrecht in terms of transparency.

Open State, an organisation that plays a key role in the Open Raadsinformatie programme, indicated that service provider NotuBiz currently makes agendas and agenda items available as part of a pilot. They are currently evaluating the pilot with the national organisation of municipalities VNG and their customers, and considering adding more data and functionality in the future.

For now, I used the ‘old’ source. Its search functionality is sub-optimal, but in this case I could get around this by scraping the site map.

The amount of text in the reports varies considerably; as of 2015, more text is available than in previous years. Further, the speech rate is higher in more recent years: a median of 158 wpm for the current council period, compared to about 145 wpm before that. I’m not sure how this can be explained, but it appears that minute taking has improved over time. Before 2015, there are frequent examples of meetings for which (almost) no speech has been reported. All in all, it appears that the data for the current council period is the most reliable.

The chart omits a few outliers. Further, I excluded speech of the chairmen of meetings from the analysis; this contains more noise. This script shows how I collected and anlysed the data.

  • February 25th 2018 at 08:27

Embedding tweets in Leaflet popups

By DIRKMJK

I just created a map showing where so-called Biro’s (small cars) are parked on the pavement and annoying people. Twitter has quite a few photos of the phenomenon. In some cases, finding their location took a bit of detective work.

First you’ll need the embed code for the tweet. You can get it manually from the Twitter website, but if you want to automate your workflow, use a url like the one below. It’ll download a bit of json containing the embed code:

https://publish.twitter.com/oembed?url=https://twitter.com/nieuwsamsterdam/status/958761072214896640

When trying to embed the tweets in Leaflet popups, I ran into a few problems:

  • When popups open, the markers didn’t properly move down. As a result, most of the popup would be outside the screen. The problem and how to solve it are described here.
  • Twitter embed code contains a script tag to load a widget. Apparently you can’t execute javascript by adding it directly to the html for the popup content, but you can add it using a selector (cf here).

Here’s the code that’ll solve both problems:

map.on('popupopen', function(e) {
    $.getScript("https://platform.twitter.com/widgets.js");
    var px = map.project(e.popup._latlng); 
    px.y -= e.popup._container.clientHeight;
    map.panTo(map.unproject(px),{animate: true});
});

You may also want to do something about the width of the popups, because otherwise they will obscure most of the map on mobile screens and it will be difficult to close a popup (which you can normally do by clicking outside of the popup). You can change the width of embedded tweets, but this will not change the width of the popup itself. A simple solution is to give popups a maxWidth of 215 (.bindPopup(html, {maxWidth: 215})).

Of course, you could also vary maxWidth depending on screen width, but I think 215px works well on all screens. Further, embedded tweets appear to have a minimum width of about 200px, so if you want popups narrower than 215px you’ll have to figure out a way to fix that.

If you embed tweets, Twitter can track people who visit your webpage. Add <meta name="twitter:dnt" content="on"> to your page and Twitter promises they won’t track your visitors. I wasn’t sure whether this should be put in the web page itself or in the html content of the popups (I opted for both).

If the popups have a somewhat spartan look and do not contain photos: Good for you! You’re probably using something like Firefox with tracking protection enabled. This blocks sites which have been identified as ‘engaging in cross-site tracking of users’ - including, apparently, platform.twitter.com.

  • February 11th 2018 at 11:03
❌