In a workshop session on data visualization earlier this week, Christophe Bontemps of the Statistical Institute for Asia and Pacific (SIAP) used as an example a range of infographics attempting to show, on a map of Asia and the Pacific, the proportion of members of Parliament that are women. The point of the exercise was to illustrate the challenges with the various ways it could be done – using colours, shapes or sizes of glyphs drawn in the countries centres, or as a choropleth map – none of the methods were particularly satisfactory.
Building a nice map showing proportions
I did think the most promising method was when the proportion was shown as a vertical bar for each country. As used by Christophe this wasn’t great because it was difficult to compare the heights of the bars scattered all over the map (which was the point of his illustration). But mixing this up with an idea he’d mentioned earlier in his talk, I thought the bars could work if you could add a reference line or shape showing 50%, and also use the colour coding. Plus a participant asked for numbers added to the map, which we agreed could work so long as it didn’t get cluttered.
I had some sleep-deprived time in an airport the morning after so thought I’d give a go to implementing this approach, and came up with this, which I think is pretty good!
I did cheat a bit by knocking out the Middle East because the map got really cluttered over there. For many purposes Middle East is treated differently to Asia by various international organisations, so there is some justification in this. There’s also an issue that my bars’ heights are calculated in degrees latitude, and with the projection of the map onto flat screen that should mean that the bars in countries with higher latitudes will be shorter. But this doesn’t seem to be a visual problem, because of the effectiveness of the pale blue 50% reference blocks.
There’s some spots where the clutter stopped the numbers being readable in my first iteration – for North Korea and for Cambodia and Laos and a few others – and I had to code in some ad hoc adjustments for them. But overall the effect was pretty good, even before I made those corrections.
In terms of the substance here, not much to say. It really stands out how New Zealand, Australia and (perhaps more suprisingly to some) Timor Leste are the front runners with near-equity in gender representation in Parliament. Uzbekhistan, Nepal and Vietnam make up the second tier with 30% or higher. Pacific Island countries, Japan and South Asia (other than Nepal) stand out in the other direction.
Nepal and Timor Leste both have formal quota requirements for women in Parliament. Check out the Global Database of Gender Quotas in Parliaments worldwide, maintained by International IDEA, the Inter-Parliamentary Union and Stockholm University.
Here’s the code that makes the map, all in one chunk. It turned out to be pretty straightforward. The main trick is I had to pre-calculate coordinates for the heights of the 50% rectangle and the segments showing the actual height, rather than letting ggplot calculate it on the fly like it would for a bar chart.
Post continues after R code
I do like my map but there’s no denying it’s not an efficient way of transmitting the full information. Great for a sense of global spread, not so good for identifying individual countries (for example, it took me quite a while to realise the Timor Leste bar was Timor Leste, not Indonesia). If we want to compare countries using their names and the spatial element is secondary, we’re better with a more straightforward representation like this one: