Esri might not quite work like Apple. Ok, likely not at all. But I’m pretty sure the demo computers at the Esri User Conference are vetted thoroughly before the event. Yet, Seth Stark has posted the following on Twitter: So, some Esri employee was demoing ArcGIS Pro while having QGIS visibly installed on their system. … Continue reading Tool partisanship sucks
Recently, I’ve stumbled across Noah Iliinsky’s Where 2012 talk When To *Not* Use Maps. The title immediately intrigued me. As a geographer and data consultant I’m convinced, an important part of my work lies in the question what tools best fit a purpose or a goal I want to achieve. But this is only one side of … Continue reading When NOT to use maps
The Future of GIS according to Esri I’ve been a bit busy recently with, for example, attending the Esri Partner Conference and Developer Summit. If you are interested in the latest news from the GIS world, you can read a review by a colleague and me over on the Ernst Basler + Partners’ geo-blog. Attending the … Continue reading Catch-up
Some months ago I mapped Switzerland’s administrative regions using a hexagonal cartogram. That idea was inspired by pioneering work of the Leicestershire County Council. After consulting with experts in the field – Leicestershire’s Alex Lea, Danny Dorling of Worldmapper (currently at the University of Oxford) and Adrian Herzog of MAPresso fame – I came up with my own workflow for the creation of such a cartogram, documented here and here. (Though beware: Mike Bostock liked the results but found it relatively laborious when he made one).
Ever since I published that cartogram, I have the feeling to see hexagonal maps everywhere. Most recently, my friends and colleagues at Oxford Internet Institute, Stefano de Sabbata and Mark Graham, have published the following cartogram along with their now famous map “Ages of Internet Empires”:
Another nice example, though not a cartogram, is this visualization of New York transit times (let’s not talk of the rainbow colour scale for a moment): Continue reading “Hexagons, quasi-maps and cartograms”
People at Zurich electricity provider ewz have recently kindly invited me to give a keynote presentation at one of their telematics events.
The task was to sketch emerging trends in GIS and visualisation from three perspectives: as GIS consultant at Ernst Basler + Partner, as a researcher at Oxford Internet Institute and as an individual that sometimes undertakes GIS and geovisualisation projects. I ended up highlighting four big trends that I think will continue to control developments in GIS/visualisation (although I will concede that certain aspects of these trends are over-hyped here and there). The actual keynote consisted of significant interactive parts, but I embed the slides here in case you want to check out trends and examples: Continue reading “Keynote about trends in GIS and visualization”
Some weeks ago I visualised the Swiss cantons (states) and their population numbers using what information visualization scientists call a linked view. You can click through to the actual, interactive visualization: here in German or here in French. In what follows I’ll describe the steps of data preparation for this visualization. I decided to keep the specifics on the implementation in D3.js for a third post in order to spare your scroll-wheel and -finger (so stay tuned for that one).
Welcome to the second part of this series in which I describe the production of this linked view with a population cartogram (top right):
In case you missed it: in the first post of this series, you can read about the conceptual thinking that went into this visualization. But now let’s dive into some geodata-crunching:
In what follows, I’ll try to give you a thorough description of my approach at data processing. I’ll include some screenshots of intermediate results. Obviously, I don’t know how familiar you are with GIS and spatial analysis terminology, so please bear with me if my description is too exhaustive. Conversely, speak up in the comments section, if I have forgotten something or something is not clear. I did all of the GIS analysis in Esri ArcGIS, however, any GIS that can handle vector data will do.
I started off with the following input data:
- Outlines of administrative units (cantons and cities)
- Spatially distributed population data from Swiss census
The preparation of the administrative units was quite straightforward: I applied a Union operation in GIS (ArcGIS Help Topic here). Then I did some tidying of the attributes and applied a set of geometric simplifications (polygon outline generalisations). The purpose of these is basically weeding out vertices from the geometries while preserving shape as well as possible. The bigger goal being, of course, simplifying the geometries enough for a fluid web experience down the line.
Swiss census data comes as a point grid at 100 meters resolution. Precise data characteristics don’t matter too much. And one could also use a thematic variable that comes at the same resolution as the display units – cantons and cities in this case. While the handling of canton/city level thematic data would be much easier, the spatially distributed thematic variable in this case allows for a more representative cartogram. If you wonder why, consider, for example, a US setting: Salt Lake City would cause a big local distortion in a cartogram using spatially distributed data, whereas its population would be spread out uniformly throughout all of Utah, if you use state-level data. This effect causes visible differences in the cartogram in regions where population distribution is not spatially uniform.
The GIS processing chain starts with these steps:
- Generation of a grid (in my case at 5 km resolution, but that number is a bit dependent on the resolution of your input data, your area of interest and maybe your application; as a rule of thumb, I’d suggest a grid resolution that is similar to the size of your hexagons). Any regular tesselation other than a rectangular grid will also do.
- Union operation on the grid cells and the administrative units. This yields smaller spatial analysis units, that follow the boundaries between administrative units.
- Spatial join of thematic variable to the new spatial units. A spatial join is a GIS operation where the spatial relationship of entities in two different datasets is evaluated. If a specified relationship is fulfilled, the characteristics of the features in the join dataset are joined to the features in the target dataset. The spatial relationship for this operation was containment (i.e. the criterion was: is a given census data point within the spatial unit at hand?). The join operation encompassed summing up the values. The overall process yields the sum of the population at all census data points which fall within a given spatial analysis unit – or, without the GIS lingo: the total population per unit).
For distortions you need a Scape… toad
The resulting data in Shapefile format was then transferred to the cartogram software Scapetoad. Scapetoad is a freely available Java software developed in the Choros Laboratory at EPFL in Lausanne. It employs the diffusion-based cartogram algorithm by Gastner–Newman. I did several model runs and iteratively tuned the algorithm parameters. That encompassed mainly striking an acceptable balance between subjective quality of the result and cartogram computation time. Unfortunately, I cannot give heuristics for this, you’ll really simply have to try with your data.
When I was happy with the result, I re-imported the cartogram dataset from Scapetoad into the GIS and used a Dissolve operation to aggregate the units back into regions (again, any GIS will do, but the precise name for the operation may vary).
Some weeks ago I visualised the Swiss cantons (states) and their population numbers using what information visualization scientists call a linked view. You can click through to the actual, interactive visualization: here in German or here in French. In what follows I want to give a bit more detail about what led to this visualization and what conceptual thinking went into the design.
In a subsequent post I will also describe the toolset I used to produce this visualization, so that you can build your own. If you’re not interested in the Background, you can skip to the Conceptually section. If that’s neither your cup of tea and you’re here primarily because you want to know how to produce such a visualization yourself, you’ll unfortunately have to patience yourself and wait for the second part of this series (it’s here!).
Why population sizes matter – in such a small country
Why is the particular piece of information that is visualised here important or interesting? Well, in the Swiss political system cantons are represented at the federal level, whereas cities aren’t. However, some of the big cities represent a considerably larger number of people than quite some of the smaller cantons. There have been many debates if and how cities ought to be represented in the political system, about the specificity of urban issues and how those are dealt with or ignored in Swiss politics and if weighting of the cantons should be adapted to better match their population size. The issue crops up both in relation to elections and polls (Switzerland having a direct democracy there are really many of the latter).
When I published the visualization Switzerland has just held such a poll. The poll did not pass, it achieved only 54.3% of “yes” votes.
– Wait, what? Yep, the vote won a solid majority of the people, but too many cantons said “nay” and thus, by the rules, it was a “nay”. Now, one can argue that this is not sensible or that it is perfectly sensible, I’m not going to do this here. But this background means, to my pleasure, that the visualisation was able to spark and inform many discussions (and met quite an audience). To my big surprise, it was even briefly featured in nation-wide primetime news, in a slightly reworked version. Continue reading “Conceptualisation of a D3 linked view with a hexagonal cartogram”
Digital Photography School has a nice gallery of kite aerial photography (or KAP, as it’s called amongst insiders): I have to date built various kites myself and actually also one of the KAP rigs shown in the gallery and have done some KAP experiments myself. KAP is lightweight, can produce affordable aerial photography and is … Continue reading Kite aerial photography gallery
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 … Continue reading Flickr as a vehicle of narrative: photos contextualised in space and time
As announced a while ago, I went to GIS Day in Zurich, Switzerland. On my employer’s blog, I have written up a review of the event in German. Head over to find out about interesting Switzerland-based GIS projects (in-browser-translation should be fine to get the gist, I suppose). Continue reading Review of Swiss GIS Day 2012
Recently, a friend of mine pointed me to GIS-related blog that somehow had managed to fly under my radar: www.mapbrief.com by Brian Timoney. Timoney is principal of a Colorado-based consultancy, but his blog is not what you might expect when you hear ‘consultancy’. Some articles which sprang to my eye and which will get you started on content and … Continue reading Blog: MapBrief
Still in last year, Cédric Moullet, amongst others MapFish and GeoExt contributor, sparked a discussion by his post “Why OpenStreetMap fails to replace official or proprietary base maps in a sustainable way ?” (note how this doesn’t sound like a question but bears a question mark ;) For simplicity, I will re-list Cédric’s 13 points here: … Continue reading OpenStreetMap: A valid competitor to official base maps?