champagne anarchist | armchair activist

Privacy

The Digital City

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.

De digitale stad

Amsterdam heeft een nieuw coalitieakkoord. De passage over democratisering en de Digitale Stad is goed ontvangen - een Amsterdams-Britse onderzoeker was zo enthousiast dat ze een Engelse vertaling maakte.

De nieuwe coalitie wil een democratische invulling geven aan de smart city. Burgers moeten meer controle krijgen over hun data, er worden niet meer gegevens verzameld dan nodig en er komt steun voor coöperaties die een alternatief willen bieden voor platformmonopolisten. Een informatiecommissaris gaat erop toezien dat de uitgangspunten ‘open tenzij’ en ‘privacy by design’ worden waargemaakt.

Het akkoord noemt ook een aantal onderwerpen waar de gemeente al mee bezig is (of was):

  • Raadsinformatie wordt toegankelijk. In 2015 heeft de gemeenteraad daar al om gevraagd. Sindsdien is een deel van de raadsinformatie beschikbaar via Open Raadsinformatie, maar er is nog geen goede oplossing om alle raadsinformatie in een goed doorzoekbare en analyseerbare vorm beschikbaar te stellen.
  • Wob-verzoeken en documenten worden toegankelijk. Hier is ook al een begin mee gemaakt. Tot nog toe zijn er drie Wob-besluiten gepubliceerd.
  • Ook interessant is dat Amsterdam zo veel mogelijk met open-sourcesoftware gaat werken. Ruim tien jaar geleden was Amsterdam dat al van plan, en dat was serieus genoeg om Microsoft op de kast te jagen. In 2010 leden de plannen schipbreuk op ambtelijke weerstand.

Al met al een mooie mix van nieuwe ambities en uitvoering van ‘oude’ plannen.

The impact of #deletefacebook

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.

Search Facebook by date

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.

Embedding tweets in Leaflet popups

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.

Pages