Location analytics is a broad topic – it is not just what can I understand about a location, but how patterns are revealed when laying lots of location-based data on a map together. This example showcases how a rich visualisation can aid in understanding complex spatial patterns – this insight is useful in supporting better spatial planning, service delivery prioritisation, canvassing and many other use cases.

So, how did I make the map? I now follow a standard four step process as follows:

What is the question am I trying to answer?

I was born and grew up in South Africa in the 1980s. I understand the history of spatial segregation and how people were forcefully moved to suit the governments intent. So, I have this basic understanding in my head how different people, different races, different cultures, different backgrounds are laid out geographically and that their voting patterns mirror this. Could I use modern mapping to prove this, or perhaps change my perception?

Let’s find out.

Get the data together.

As a democracy, South African election data is freely available as it should be. This allows all of us, not just the government, to understand how people are geographically situated and what patterns exist between them. That doesn’t mean that the data is just ready to throw on a map though.

To get the data I needed, I started by downloading data from the IEC website here, which comes as a set of Excel sheets that list per line, the number of votes, per party, per voting district. That is a total of 1.1 million lines of data! So, my first step was to pivot this data to show in one row, the voting district and all the votes for each party as columns. The second step was to join it with the spatial representation of the voting district boundaries so it can be located on the map.

That done, I published the data to ArcGIS Online to make the map.

Make the map.

I wanted to show something that is normally hard to see in thematic maps like this – how the patterns merge into one another. Traditional choropleth maps show distinct values per geographical area which implies separation along a hard boundary and are difficult to use when you have multiple values per area to highlight. If your neighbour lives across the street but is in a different voting district, should they really be seen as a completely different colour on the map with a hard line between you?

Along comes the dot density thematic mapping style. This allows you to randomly represent quantitative data across a given area as dots, as well as layer multiple dot density renderers for each area simultaneously. Because they are points, these multiple renders blend into one another giving you a better perception of the overall spread of the data.

I did this using the new Map Viewer in ArcGIS Online and choosing the Dot Density render type, and selecting the top 4 political parties as separate colours. Each of these is then displayed for each voting district as blended, random dots.

To make this pop, I added a few cartographic tricks – I used a darkened ocean basemap to help accentuate the dots, used a plain (unobtrusive) dark basemap, used high intensity dot colours (aligned to the party colours) and even added a “shadow” around the country boundary to help it pop out.

And this is the result:

Share the map to make it accessible, dynamic and easy to use.

I didn’t want to leave this as a static image, because the patterns change as you dynamically zoom into certain areas of interest. So I again used ArcGIS Online and the media map template to create a simple, interactive version of the map that shows over 22,000 polygons with blended dot density renderers at once. On most occasions, this loads in about a second, which is quite a phenomenal feat.

The data lives in the app – i.e. it is streamed into your browser – which makes it possible to use that data locally. The example I added to showcase this is a hover popup that shows more details of a particular voting district when you hover over it. This happens at all scales, across all 22,000+ polygons!

You can run the app from here:

https://esriza.maps.arcgis.com/apps/instant/media/index.html?appid=87c16a0f6a634e2b9fee596736510135

From the product, I can see my original perceptions were fairly accurate. There are spatial concentrations, or voting patterns, that align with the spatial planning of the Apartheid government – specifically around the former “homelands” in Limpopo, North West and the Eastern Cape. While urban centres have strong patterns and cultural differences that are uniquely highlighted when looking into the Kwa-Zulu Natal province.

The real value of an interactive map like this, is that it allows experts or interested parties with different needs, to interpret it in the way that helps them. This is the premise of location intelligence, it takes data you have, shows it up in a new ways, and through engagement with it gives you insights you may never had had before.

I hope you enjoy the map!

Leave a Reply

%d bloggers like this: