Sunday, 17 May 2015

Helecxagon mapping

Two things happen whenever there's an election. First, politicians wander round spouting rhetoric in an attempt to persuade us that their colour is the one we should care about. Second, cartographers and map-makers everywhere develop a palpable sense of excitement as a new national dataset is quite literally born overnight. From a cartographic perspective, the recent UK General Election didn't disappoint.

Politically, the Conservative's couldn't have imagined such a result; a majority from seemingly out of nowhere and against all the polls. Labour were trounced and no more so than in Scotland where the Scottish National Party all but turned the map from red to yellow. The UK Independence Party did well in vote share (12.6%) but this translated into only one Parliamentary seat.

For those unfamiliar with how a UK election works, Great Britain and Northern Ireland are subdivided into constituencies. The population of each constituency get to vote for the person (standing on behalf of a political party) they would wish to elect as their Member of Parliament (MP). The votes roll in, are counted, and the person with the most votes wins that constituency 'seat' in Parliament on behalf of their party. There are 650 seats overall and the party that gains a majority of seats gets to form the government as overall winners. So, the party that reaches 326 seats wins. There's a lot of complexities if no single party gets 326 seats but let's not get into that...this isn't a political blog.

So the result was fascinating in and of itself but let's get stuck into the cartography...

Back in 2010 at the last UK General Election most news agencies went with a standard geographic map showing the results by colour of the winning party.

The trouble with this approach is that larger constituencies dominate the map in visual terms. Smaller, inner city constituencies can hardly be seen on a national map like this. It distorts the way we see the election results. On this map there's a lot of blue and a fair bit of yellow and gold. Not much red.

Alternatively, cartograms offer a form of thematic mapping that accommodates the difference in size of areas. There are plenty of alternatives. The Gastner-Newman population density equalizing cartogram tries to preserve some sense of geography while squeezing and stretching shapes. It appears a little odd to some people. The DeMers uses squares, the Dorling uses circles; both perfectly good shapes and then...there's the hexagon. Here's the 2010 results again, this time mapped with equally sized hexagons.

The colours are now equal in terms of the area they occupy on the map. The gold and yellow in the large Scottish constituencies have receded. The blue has also been shifted in visual importance as many far smaller constituencies that elected a Labour MP (red) are now visible. There was a hung parliament in 2010 and the Conservatives (blue) had to do a deal with the Liberal Democrats (gold) to get over the 326 seats needed to form a coalition government. The map in this form is a much more useful mechanism for communicating the results for this specific data. It tells the story far more effectively than a geographic map.

Hexagons have been used as a framework for mapping since at least 1895. They were also promoted by Danny Dorling in the 1980s as a method for mapping election results because they are close to circular (and thus pleasing on the eye) and they tesselate well, providing flexibility and six shared boundaries each. Dorling noted this was a pretty good fit for UK political geography. Oxford University recently published a blog reminding the world of Dorling's work prior to the recent election.

Sporadically, news agencies have used hexagons but this year the hexagonal cartogram went viral. Virtually everyone used them. In fact, you'd be hard pushed to find a news agency or media outlet that didn't. Andy Kirk even proposed a new name - the elecxagon map which struck me as a fun way to refer to them in this context. I modified it a little more - 'helecxagon'. So let's take a look...

The BBC got the 6 sided ball rolling with a giant physical map they built in the piazza at Television Centre. A map you could walk on. A map that had tiles added throughout the night as results came in. A map that was used for short interviews with virtual nobodies and which they panned across as they went to new bulletins. A map that was, well, rather under-used. Shame. It's almost like they didn't really know how best to use it as part of their broadcast.

BBC piazza election map

The BBC web site (and many of their other digital mapping) curiously did not go for hexagons which they had used successfully in 2010. An odd decision and with their under-used giant hex-map they dropped the ball a little in mapping terms.

Others filled their boots as the results rolled in and web maps began to be coloured in. The Telegraph used a hexagonal cartogram, as did Sky News

Sky news web map

The Telegraph election web map

The Independent went with a hexagonal cartogram too...but the web page opens with the geographic version and there was an option to switch to a geographic version if they wished.

The Independent web map

In their print media, The Independent preferred a geographical view and they also offered a slider comparative view comparing the 2010 with the 2015 results on their blog...again, geographic.

The Independent print version

The Independent 2010/2014 comparison slider

Bloomberg also gave visitors to their web site the option of a geographic or a hexagonal cartogram. What I particularly liked was the way that the map transitions between geographic and hex through animated proportional hex symbols. Largely meaningless, they did provide a subtle visual link between the abstract hexagons and the real geography. Using a transition gives the eye something to follow and it's arguable that it aids our interpretation of where places are in relation to one another.

The transition state of Bloomberg's web map

Bloomberg also had a fun animated map by Julian Burgess and Adam Pearce who used a blank canvas with no boundaries of any form, across which splodges of colour were fired. The results are animated so a map of colour builds during the 25 seconds that the animation plays. It's a piece of visual data art and one of the more interesting approaches to mapping the data. There's no way you can recover the results or explore the data but that's not the point. It's exists because they had a good idea. It works.

Ollie O'Brien produced a live map for election night that updated the results. He has since made a few post-election maps showing various metrics such as swing in share of vote, turnout etc. Plenty more discussion on his blog and a link to a web map featuring the various layers here. Ollie went for a geographical view of the results and multivariate proportional symbols.

Swing map by Ollie O'Brien

Ben Hennig couldn't settle on a particular style so went with the option of providing three versions on his maps of the results. He illustrates the geographic, hexagonal cartogram and a gridded population-equalizing cartogram side-by-side. You get three maps for the price of one with Ben's work and if nothing else it's a good way to show the different trade-offs between map type. More detail on Ben's blog and his continuing work with Danny Dorling in developing cartograms.

Three-in-one map by Ben Hennig

In my opinion The Guardian provided the most compelling and complete cartographic service on the night itself. A map that was coloured in as results came in, that auto-zoomed and panned to a constituency you could search for or click on. The live election headlines scrolled next to the map and they to were geographically enabled so clicking on the headline brought up the results for that place.

The hexagons showed regional boundaries and constituency boundaries, hover the mouse and you got some basic detail. Click and you get more.  More than that, you could switch between the overall map showing the winning party (using the traditional colours) to a map that showed majority, turnout, and vote share by party. While still using the basic cartogram, these maps used transparency (as an unclassed choropleth) and proportional symbols (arrows) well to convey the message of the different election metrics. Lots to interest both the casual reader and those more interested in digging a little deeper. Supporting graphs and tabulated results as well as subtle labels added to the overall approach and usability.

The Guardian general web map

The Guardian vote share for Conservatives web map

The Guardian turnout web map

The Guardian swing (here, to SNP) web map

And so, after the serious maps come the frivolous. There were plenty but these are the ones that caught my eye.

It soon became clear that the Scottish National Party were sweeping Scotland with a swathe of yellow constituencies. With much of the rest of England and Wales being coloured blue or red, the comparisons with Maggie Simpson began proliferating our social media feeds.

Vaughan Roderick compared the final map with a quick sketch of traditional coal mining areas of the UK. These traditional industrial heartlands are staunch Labour areas and so the visual correlation between the red of the map with areas of strong support for the centre-left party are a natural fit. The approach gives context though and helps to lift the lid on why the map is coloured as it is. Of course, voting behaviour is far more complex but this was a useful way of reflecting on some of the historical and geographical reasons for the patterns.

Combining a cartogram with the beauty of a hand-made 'physical' map, Tom Katsumi opted for a cross-stitched version, adding a stitch as the results came in to colour in his cartogram based on squares.

Finally, my colleague Craig Williams even built his own map using giant building blocks...all four of them, some days before the election. Given the result, he was remarkably close.

And what of my efforts...they're coming along nicely. I have been making two interactive maps. One an artistic effort and one built from the ground up using 3D hexagons (I'm calling them hexstones). I wasn't intending to make the maps live on the night. Instead, preferring to work on the full results after the election and taking the time to make the map I want to make.

For the 3D map I went for hexagons because I've spent years making 2D cartograms...and I wanted to tackle the technical challenges of making tesselating hexagons on a 3D, spherical world. There's also a natural metaphor with the Giant's Causeway in Ireland and part of my inspiration was this picture of David Cameron taken last year.

My 3D map as a work in progress

The artistic one was partly inspired by the Bloomberg one but I want it to also reveal the data. I'm calling it a splat map.

My splat map as a work in progress

The election was fascinating. The cartography of the election was perhaps more fascinating if you're interested in maps (and if you've read this far I'm guessing you are).

It's pleasing to see the rest of the world waking up to the value of cartograms and, in particular, the hexagon though I wonder if there will be a backlash at the next General Election? Will everyone stick with the hexagon...or twist and search for something different that tries to set them apart. By the time of the next election there will undoubtedly be a raft of new technologies that may help or hinder as well.