Take Care of your Choropleth Maps

Over the last week I had some fun playing with choropleth maps. Thereby I analyzed the following US poverty map, which was recently published at the Guardian data blog:

To be honest, the first time I saw this map I didn’t thought much about it. Ok, poverty is highest in south central of the United States, especially near Mexican border. But recently I used the same data to demonstrate a choropleth map that I created from-scratch and I was really surprised to see a somewhat different picture:

click to dig into the world of choropleth maps..

Wikileaks Mirror Network Map

After seeing how incredibly fast the network of wikileaks mirrors evolved over the last few day, I quickly wanted to visualize this process. I resolved the ip addresses using the free GeoLite City database by maxmind. For the map visualization I used an early prototype of my open source mapping framework OpenFlashMaps.

Interaktive Version (Flash)

Some static views:

Nachdem ich gesehen hatte, wie schnell sich das Netzwerk von Mirror-Servern der Wikileaks-Webseite aufgebaut hat, kam sofort der Wunsch in mir auf, diese Entwicklung zu visualisieren. Die IP-Adressen wurden größtenteils über die GeoLite City Datenbank von Maxmind aufgelöst. Da die Datenbank leider etwas unvollständig ist, habe ich die übrigen Einträge über die Dienste von geoip.co.uk und websitegoodies.com aufgelöst.

Interaktive Version (Flash)

Statische Ansichten:

Continue reading

Wie und warum wir die Tweets für die Live Map archivieren

Für das Twitter Live Map Experiment habe ich mich in der letzten Woche etwas ausführlicher mit der Twitter API auseinandergesetzt. Da Twitter die öffentliche Timeline und insb. die Suchfunktion nur für einen begrenzten Zeitraum zur Verfügung stellt, war es notwendig selbst ein Archiv von relevanten Tweets anzulegen. In unserem Fall gibt es ein PHP-Cronjob der regelmäßig die Twitter-API anfunkt und die Ergebnisse in einer Datenbank speichert.

Continue reading

InfoVis: Neben­einkünfte deutscher Bundestags­abgeordneten

Aufgrund der überwältigenden Resonanz zu meiner Parteispenden-Visualiserung habe ich mich direkt zur nächsten Visualisierung durchgerungen. Diesmal geht es um die Nebeneinkünfte unserer Bundestagsabgeordneten, welche seit einigen Jahren zumindestens teilweise offengelegt werden müssen. Die Daten stammen auch diesmal von bundestag.de und wurden automatisch ausgewertet.

Aufgrund der überwältigenden Resonanz zu meiner Parteispenden-Visualiserung habe ich mich direkt zur nächsten Visualisierung durchgerungen. Diesmal geht es um die Nebeneinkünfte unserer Bundestagsabgeordneten, welche seit einigen Jahren zumindestens teilweise offengelegt werden müssen. Spiegel Online hat dazu in Zusammenarbeit mit abgeordnetenwatch.de mit dem Bundestagsradar bereits einen ersten Schritt gemacht. Dort kann die Abgeordneten in einer schematischen Darstellung des Plenums nach verschiedenen Kriterien filtern, darunter auch das Vorhandensein von Nebeneinkünften in bestimmten Stufen.

Leider ist aus der Grafik lediglich ersichtlich, ob ein Abgeordneter Nebeneinkünfte erzielt hat, nicht aber wieviele Nebeneinkünfte es waren. Damit kann nicht unterschieden werden, ob jemand nur einen einmaligen Vortag gehalten oder über die gesamte Legislatur ein monatliches Nebeneinkommen erzielt hat. Was ich mir hingegen vorgestellt hatte, war eine Visualisierung, in der einem hohe Nebeneinkünfte sofort “ins Auge springen” sollen. Bei der Anordnung der Abgeordneten habe ich mich zur Abwechslung nicht am Plenum des Bundestags sondern an den Heimatwahlkreisen orientiert. Zum einen, weil dadurch der lokale Bezug zwischen Bürgern und Abgeordneten betont wird und zum anderen, weil ich irgendwie ein Faible für Kartenvisualisierungen zu scheinen habe…

Die interaktive Version befindet sich hier: labs.vis4.net/nebeneinkuenfte/

Ergänzungen:

Visualization of Local Network Traffic

Just created a simple visualization to enhance my Processing experiences. The initial data is collected using Wireshark Network Protocol Analyzer. Each package network route is resolved via traceroute and then mapped using the free GeoLiteCity database by MaxMind.

Session 1: 60 seconds browsing through several websites

[flashvideo file=wp-content/uploads/2010/09/websites.avi.flv /]

Session 2: 60 seconds peer-to-peer file sharing

[flashvideo file=wp-content/uploads/2010/09/p2p_1152kbps.flv /]

Static image of session 2

The following image shows all network routes at once:

Further Development Of The Piwik Map

Here are my ideas for the next version of Piwik Maps.

  • The map has altogether four views: world, continent1 and two new country views for provinces and cities.
  • In both country views there is one active country. All other countries are displayed in gray like the empty countries in world and continent view (the inactive country borders are missing in the following images, just imagine them for now).
  • Since we now have three different zoom levels it is not as easy to provide simple navigation through the views. Starting from the world view, the user can click on active regions to zoom into it2. At every time, clicking at the “sea” (the white space) leads to a zoom out to the previous level. After selecting a country the user can switch between province and city view using the icons in the bottom icon bar.
  • To improve the navigation between different countries, all inactive countries are labeled with their iso-code (or maybe the full country name). This way the user can easily jump between adjacent countries. Empty countries (= countries with no visitors coming from) are not clickable. The other country labels could be sized relativly to the number of visitors, but this may be to distractive.
  • On top of the map the user can see the total number of visits for the active country.

Province view

Now we come to the first new country mode, which displays all sub-regions or provinces of a country. Since maintaining all provinces for nearly 300 countries means a lot of work, this feature may be limited to some countries at first. The tooltip displays the name (again a lot of work for the translators) and the selected metrics. I’m not quite sure about the percentage value, but I tend to relate it to the countries total value (and not the overall total value as in world view), which would mean “4% of the all site visitors of France came from Burgundy”.

City view

The second country view displays all visitors city in the selected country. The concept should be familiar to most web analytics users, so I think it’s a good idea to adapt the bubble layout from GA. Note the change in the icon bar in the following mockup:

If you have any comments or suggestions for the further development of the map widget, feel free to join the discussion in the comment section.

  1. Some continents are divided into serveral regions for better zooming performance
  2. This is the first difficult point since the world map already provides tooltips for individual countries. Some users might get annoyed when they have to find and click their preferred country twice. On the other hand are users which might get confused when jumping from the world view to a (possibly wrong selected) country.

Visitor Map for Piwik Web Analytics

If you’re using Piwik, the open source web analytics tool, then you probably already missed a map visualization of your visitors location, which is a standard feature of all major web analytics tools. As I really like the idea of open source and decentral web analytics and also gained some experiences on map visualizations, I decided to contribute a map plugin to the Piwik community.

Download

You can download the plugin here: UserCountryMap.zip

Update: the current version of my plugin relies on features, that are not available in Piwik 0.6.4 yet, so it doesn’t work now. You have to either wait for the final release of Piwik 1.0, which will be released in August 2010 and will include the map plugin by default, or checkout the current development version via svn.

Features

Interactive world map: The plugin provides a new dashboard widget showing an interactive world map. The countries are colored according to the selected data metric (like number of unique visitors). It is possible to zoom into certain regions to get a closer look at smaller countries. While moving the mouse over countries, tooltips show the exact value and its ratio.

Piwik API integration: The map is fully integrated into the new Piwik report API, so there is no limitation on the displayed data metrics.

Legend: Besides the map there is a small legend that helps to interpret the country colors. This is especially helpful, if you want to print out the map.

Fullscreen: You can set the map into fullscreen mode. This is very handy if you’re working on a smaller screen.

Image export: It is possible to download the current map view as PNG image, just like the other flash-based charts in Piwik. The exported map view will be resized to 1000px width. You can even export high-resolution images by using the image export while in fullscreen mode (accessible via context menu).

Screenshot

This is how the widget looks, after zooming into Europe:

Here is an example for the new fullscreen mode (click image to enlarge):

Current progress / Roadmap

The plugin is ready and waits for the release of Piwik 1.0.
Update: Since Piwik 0.9 the map plugin is one of the core plugins that are also activated by default.

Future versions
There are some more features, which I would like to implement in the future. One is to display vistitors cities as implemented in Google Analytics. This feature needs further improvement on the GeoIP plugin, because by now Piwik does only store the visitors country but not the city. Once this features makes it into Piwik core I’ll update the map plugin.

Donate

If you like the plugin, please support the developer with a small donation via paypal or flattr.


Flattr this