Category Archives: piece

Flickr as a vehicle of narrative: photos contextualised in space and time

After my project proposal had been accepted, I have attended a workshop at ETH Zurich, titled “Cartography & Narratives” organised by Barbara Piatte, Sébastien Caquard and Anne-Kathrin Reuschel in last summer. The goal of the workshop was to explore “mapping as a conceptual framework to improve our understating of narratives”. Narratives are

“an expression in discourse of a distinct mode of experiencing and thinking about the world, its structures, and its processes“ (White 2010)


any cultural artefact that ‘tells a story’ (Bal 2009)

I decided to investigate the photo-sharing platform Flickr as vehicle of narratives (think: the slide show of pictures from a trip, be it directly on the camera’s screen or as an image projected onto your living room wall, as one of arguably the most ubiquitous types of every day narrative).

I have uploaded a preliminary result of my workshop paper on Vimeo (view it large, for good quality):

[vimeo w=600]


The movie shows the temporal and spatial patterns that emerge, when we conflate 80’000+ images taken by 4’000 photographers over the course of several years in the city of Zurich, Switzerland (I only looked at georeferenced photographs). See the description of the video on Vimeo for full information.

I will post more about the workshop results and further work, shortly.

Swiss population density versus that of cities

The Swiss population has grown more or less steadily over the last decades:

With a current growth of about 1%, the Federal Statistics Office has forecast that Switzerland should have welcomed the 8 millionth inhabitant at some point this summer (jeez, I remember learning at school that Switzerland has 6.5 mio. inhabitants – you can check above where that puts me on the graph).

Now, Switzerland as a country is relatively heterogeneous, topographically speaking, with the Alps in the south. So it would be hard to spread out built-up areas evenly:

Yet, as an experiment I have taken data about some well-known, diverse, international cities and have computed the area that would be needed to house the entire Swiss population of 8 millions (give or take) at the cities’ population densities. Lo and behold, how compact, in fact, Switzerland could be (if we only wanted hard enough;  or click here for a pdf in A3 format or here for a bigger graphic:

Switzerland as a City State?“: How big an area would be needed to house the population of Switzerland, at population densities of various cities around the world (click to view high-resolution image)

Visualizing Swiss politicians on Twitter using D3.js

I’ve recently been playing with D3.js, mainly for my side-project, SoMePolis, which investigates social media usage by Swiss MPs.

D3.js (D3: data-driven documents) is a Javascript library for creating complex, static or animated/interactive web graphics using HTML, SVG and CSS. The main site has a short tutorial and lots of example implementations. A well-known solid introduction to D3.js is the one by Scott Murray from Small tutorials also come from Mike Bostocks (developer of D3.js), Jan Willem Tulp and Christophe Viau.

D3.js is not exactly easy to use to build something from scratch, especially if you are not that experienced a Javascript developer. But it’s easily understandable enough to take an existing visualization and tweak it to fit your purpose. Guess what? That’s exactly what I did.

SoMePolis infographic of tweeting Swiss politicians

Our first infographic (German, but English-speakers should still be fine looking at it; find the French version here) details the membership of tweeting MPs to a range of classes in the dimensions “political party”, “sex”, “chamber”, “status in parliament”, “age” and “year of account creation”.

The visualization, called Par(allel)Sets, thus allows you to explore a six-dimensional attribute space with relative ease. All the dimensions can be (vertically) re-ordered using drag-and-drop.
Similarly, the classes on each dimension can be (horizontally) re-ordered using either drag-and-drop, alphabetic sorting or sorting according to class size (in terms of number of politicians in each class). The latter two support ascending and descending sorting.
Distilling insight from the graphic is facilitated by informative captions that show when you hover over a class or a portion of the coloured bands.

The adaptation of the D3.js code was actually not as much work as making the graphic in an iframe work seamlessly within our WordPress template and compiling a concise introduction video using in-browser screencasting tool Screenr (thumbs up!) and YouTube annotations (thumbs down).

Journalists’ Twitter network

[Deutsch weiter unten]

Recently, I’ve been looking into analysis and visualization of Twitter networks. So, David Bauer posting a list of 300+ German-speaking, Twitter-using journalists came just right. Scroll down to see the resulting network. By they way, you can find more information on the technical background of the production of these Twitter network visualizations in this post.


In letzter Zeit habe ich an der Extraktion, Analyse und Visualisierung von Twitter-Netzwerken herumgepröbelt. Da kam es gerade recht, dass David Bauer eine Liste von über 300 deutschsprachigen, twitternden Journalistinnen und Journalisten gepostet hat. Hier präsentiere ich das resultierende Netzwerk. Achtung: Die resultierenden Darstellung sind optisch komplex und erfordern deshalb eine genügend grosse Auflösung. Die Grafiken sind also nicht ideal für die Betrachtung auf mobilen Geräten mit kleinen Bildschirmen.

Übrigens: In diesem Post finden Sie mehr Angaben zu den technischen Hintergründen der Erstellung dieser Twitter-Netzwerkvisualisierungen.

Netzwerk von Journalistinnen und Journalisten auf Twitter, Knotengrösse gemäss "Branchen-Followern" // Network of tweeting journalists, node size scaled according to fellow journalist followers

Die erste Grafik zeigt das Netzwerk der tweetenden Journalistinnen und Journalisten. Die Knoten sind nach Gruppen eingefärbt, die sich aus den Follower-Beziehungen ergeben. Die Knotengrösse richtet sich nach der Anzahl Follower des einzelnen Users unter den Journalistinnen und Journalisten.

Man sieht, dass die meisten Journalistinnen und Journalisten in einem grossen, aber kompakten Bereich des Netzwerks liegen, der aber in unterschiedliche Gruppen zerfällt. Der Urheber der Liste, David Bauer, ist gemessen an den Brachen-Followern sehr gut vernetzt. Er bildet zudem mit Ronnie Grob und Peter Hogenkamp eine Art Brückenkopf zur blauen Gruppe. Ich vermute, bei der blauen Gruppe handelt es sich um deutsche Journalistinnen und Journalisten. Sie sind nicht gut mit dem Rest des Netzwerks vernetzt.

Auf den ersten Blick sind T. Benkö, M. Binswanger, P. Müller, S. Brotz, N. Lüthi, W. de Schepper, S. Bärtschi, M. Daum, K. Weber, C. Moser und A. Sautter Journalistinnen und Journalisten mit vielen “Branchen-Followern”.

Erhellend ist auch die zweite Visualisierung, in der die Knoten anhand der Twitter-Follower (also nicht nur brancheninterne Follower) skaliert sind:

Netzwerk von Journalistinnen und Journalisten auf Twitter, Knotengrösse gemäss Twitter-Followern // Network of tweeting journalists, node size scaled according to total Twitter followers

Die zweite Visualisierung zeigt anhand der allgemeinen Follower auf Twitter, wer viele Follower ausserhalb des Journalismus anziehen kann. Natürlich ist das nicht ganz präzise, denn die Grafik zeigt einfach alle Follower, also:

  • Follower auf der Liste (Journalistinnen und Journalisten) und
  • Follower, die nicht auf der Liste figurieren. Diese können Journalistinnen/Journalisten sein oder auch nicht.

Die Visualisierung zeigt deutlich, dass zum Beispiel Nik Hartmann und Tom Brühwiler in dieser Interpretation mehr Gewicht erhalten, sie verfügen also über einen atypisch hohen Anteil von Nicht-JournalistInnen unter ihren Followern. Peter Hogenkamp, Thomas Benkö und Michèle Binswanger sind andere, die auch immer noch gross angezeigt werden. Es fällt weiter auf, dass die Knoten der blauen Gruppe besonders gross dargestellt sind – daher meine Vermutung, dass es sich hierbei um deutsche Journalistinnen und Journalisten handelt, die über einen grösseren Follower-Pool verfügen als die scheizerischen Kolleginnen und Kollegen.

Mich würde interessieren, was es sonst noch in diesen Darstellungen zu entdecken gibt. Was sehen InsiderInnen in diesen Darstellungen? Haben Sie Korrekturen? Was sind ihre Interpretationen und Hypothesen? Diskutieren Sie mit!

[Aktualisierung vom 28.2.2012: Kommentare und Pingbacks auf diesen Post sind geschlossen, mehr dazu hier]

Twitter networks – Mechanics

[Deutsch weiter unten]

Recently, I’ve been working on a Twitter-related project with two friends of mine. As there’s nothing to present yet, I won’t go into detail regarding that project. But working on Twitter-related stuff led me to explore the generation, modelling, analysis and visualization of Twitter networks.

An excerpt from a Twitter network

Then, some weeks back, Swiss journalist/author/blogger David Bauer started a Google Doc to collect Twitter handles of journalists (read his post here, in German). Two weeks later David Bauer’s list featured 300 accounts from German-speaking, mostly Swiss journalists (as of now there are 360 accounts) – a nice crowdsourcing success!

I think David Bauer had an interesting idea there. And some people even took to simple analyses such as gender proportions of journalists on Twitter (see below – it’s disappointingly biased!).

Gender proportion of journalists using Twitter (based on David Bauer's list)

Now, I wanted to visualize the network of these tweeting journalists. The tools of trade in this case are:

Using the API I could get the User IDs of each journalist (rather than the Twitter handles which can be changed, the User IDs are numerical, stable IDs) and the User IDs of the people who follow them as well as the people they follow. Obviously, as a side-product of this process I also got the current follower numbers for each journalist.

Now, all that was left to do to derive the Twitter network was to find for each pair of journalists, if one of them followed the other or both followed each other or no one followed the other. Using Python with custom modules I could generate this structure and export it to a GraphML file that can be read by Gephi. Using this programme I did some network analysis and created visualizations, check them out in this post.


In letzter Zeit bin ich daran, mit zwei Freunden eine Art Twitter-Projekt aufzubauen. Es gibt da aber noch nichts zu präsentieren, dieser Post handelt aber von einer Art Spin-Off-Projekt. Ich habe mich nämlich vermehrt für die Erzeugung und Modellierung, Analyse und Visualisierung von Twitter-Netzwerken interessiert und in diesen Bereichen einiges ausprobiert.

Auszug aus einem Twitter-Netzwerk

Dann hat der Schweizer Journalist/Autor/Blogger David Bauer vor ein paar Wochen ein Google Doc eröffnet, in dem er die Twitter-Handles deutschsprachicher (und mehrheitlich schweizerischen) Journalistinnen und Journalisten per Crowdsourcing sammelt (vgl. auch seinen Post hier). Zwei Wochen später zählte die Liste bereits 300 Einträge, aktuell sind es 360 – also ein schöner Crowdsourcing-Erfolg!

Ich finde David Bauers Idee sehr interessant. Auch andere Leute liessen sich davon begeistern und haben sogar einfache Analysen durchgeführt, zum Beispiel des Geschlechterverhältnisses (welches in enttäuschendem Mass unausgelichen ist):

Geschlechterverhältnis der twitternden Journalistinnen und Journalisten (basierend auf David Bauers Liste)

Ich für meinen Teil wollte das Netzwerk der twitternden Journalistinnen und Journalisten sehen. Die Tools, die ich dazu verwendet habe, sind:

Von der Twitter API konnte ich die User-IDs aller Journalistinnen und Journalisten abrufen (diese numerischen IDs sind – anders als die veränderbaren Twitter-Handles – über die Zeit stabil). Weiter konnte ich die User-IDs der Leute abrufen, die einer Journalistin/einem Journalisten folgen bzw. denen eine Journalistin/ein Journalist folgt. Als ein Nebenprodukt erhielt ich dabei natürlich auch die Anzahl Follower jeder Journalistin und jedes Journalisten.

Als letzter Schritt zur Ableitung des Netzwerks von Journalistinnen und Journalisten musste ich für jedes Paar von Personen auf der Liste herausfinden, ob die eine der anderen folgt, sich beide gegenseitig folgen oder sich beide nicht folgen. Mit Python und einem speziellen Modul konnte ich dann das Netzwerk aufbauen und als eine GraphML-Datei exportieren. Diese wiederum konnte ich in Gephi einlesen, um weitere Analysen durchzuführen und einige Visualisierungen zu erstellen. Die Resultate finden Sie in diesem Post.

ZIPScribble Map Germany

“Einigkeit und Recht und Frei-ei-heit…!”

But before we get to that, as explained earlier, there are different levels in my ZIPScribble Maps:

  • Level 1 ZIPScribble Map: Only the first digit of the postcode is compared. Thus, a discontinuity is detected, for example, between postal codes 8679 and 9000, but no discontinuity is detected between 8399 and 8400.
  • Level 2 ZIPScribble Map: The first two digits are compared. Thus, a discontinuity is detected between postal codes 8679 and 9000 as well as between 8399 and 8400.
  • The Level 3 ZIPScribble Map works analogously.

Find below Levels 1 through 3 of the ZIPScribble Map of Germany:

ZIPScribble Map Germany Level 1

Unlike in France, German postcode regions do not necessarily follow the boundaries of German states (nor actually the boundary between former East and West Germany. Note, however how the state and city of Hamburg (star-shaped feature in the northernmost pink region) and the state and city of Berlin stand out (star-shaped green feature in the north-eastern part).

Also remarkable: the very dense postcode structure in the state of Rhineland-Palatinate (mostly the westernmost purple region and a small part of the turquoise region due south of it)!

ZIPScribble Map Germany Level 2

On level 2 the cities of Hamburg and Berlin are still salient. Also, Bremen, Hannover, Stuttgart and, a bit less, Munich can be distinguished from their surroundings.

ZIPScribble Map Germany Level 3

Like in France, level 3 gets rather chaotic…

Also behold the patriotic renditions in black-red-gold:

ZIPScribble Map Germany Level 1, deutsche Art

Note how I had to cheat (introduce orange as a colour) in order to depict all the individual regions. This is an empiric rendition of the four colour theorem which states that you need at most four colours to colour any choropleth map. However, in Germany this is obviously not only at most, but also at least. While I did this coloring, however, I couldn’t help but notice what a special topological structure german postcode regions have. Neither France, nor Italy nor Switzerland have a level 1 postcode region which is topologically connected to almost all other regions!

ZIPScribble Map Germany Level 2, deutsche Art

ZIPScribble Map Germany Level 3, deutsche Art

If you wonder about the process of producing ZIP Scribble Maps, check out my tutorial:
Part I
Part II

Earlier: ZIPScribble Maps SwitzerlandItaly and France.

ZIPScribble Map France

“Allons enfants de la patrie…!”

But before we get to that, as explained earlier, there are different levels in my ZIPScribble Maps:

  • Level 1 ZIPScribble Map: Only the first digit of the postcode is compared. Thus, a discontinuity is detected, for example, between postal codes 8679 and 9000, but no discontinuity is detected between 8399 and 8400.
  • Level 2 ZIPScribble Map: The first two digits are compared. Thus, a discontinuity is detected between postal codes 8679 and 9000 as well as between 8399 and 8400.
  • The Level 3 ZIPScribble Map works analogously.

Find below Levels 1 through 3 of the ZIPScribble Map of France:

ZIPScribble Map France Level 1

How tidy everything looks: All the postcode regions are neatly tucked into individual départements! By the way: You may notice that Corse is there in the Mediterranean but that any overseas territories have been left out.

ZIPScribble Map France Level 2

On this level, Paris jumps out as a very colourful spot in the northern part of France!

ZIPScribble Map France Level 3

On level 3, things become a bit chaotic. However, the cities of Lyon (near the southwestern tip of Switzerland) and Marseille (on the Mediterranean coast) stand out pretty well.

Also behold the patriotic renditions in the colours of the Tricolore:

ZIPScribble Map France Level 1, à la Française

ZIPScribble Map France Level 2, à la Française

ZIPScribble Map France Level 3, à la Française

If you wonder about the process of producing ZIP Scribble Maps, check out my tutorial:
Part I
Part II

Earlier: ZIPScribble Maps Switzerland and Italy.