Skip to Content

Mapping Uganda's Political Landscape

Maps by Paschal Ssemaganda. Shapefiles from ugandaclusters.ug

Much of the political writing on the general elections does not make sense to me. It is not a matter of the quality of the writing. It is just that for a visual learner such as myself images do far more for my comprehension than words. So in an effort to make sense of all the rhetoric and punditry ahead of the general elections next year I have created a set of maps that illustrate the political landscape in Uganda.

Creating the Maps

I did this in a number of steps. First, I took a list of the current national assembly representatives from the parliament website. That list shows the constituency and party affiliations (if any) for each representative. My goal was to plot that information across a map of Uganda, creating a single image that shows where the various parties enjoy support.

In order to do that, I needed a map of Uganda in a format that I could edit. One of those formats is called a shapefile. A shapefile is a popular geospatial vector data format for creating and editing maps. I found a serviceable shapefile with an appropriate user license on ugandaclusters.ug that contains Uganda's 2006 national, district, subcounty and parish boundaries.

The next steps are quite technical. In order to layer my parliament data onto the shapefile, I had to download and install Mapnik on my computer. Mapwhat? Yes, that is what I thought too when I first heard of it. As it turns out, Mapnik is an open source cross platform mapping toolkit that is very useful for rendering maps. It is precisely the tool I needed for the job that I had undertaken. Unfortunately for me, using Mapnik installing and configuring Python, a general-purpose high-level programming language. Not only does the name bother me - I am yet to meet a snake I did not hate on sight - but I was weary of trying to manipulate a high-level programming language. In fact, I was hoping to avoid programming completely; I just wanted to create a simple image.

Still, needs must. I got through the Python installation and configuration process using a number of helpful tutorials posted online. I installed Mapnik and got that working. At that point, all that was missing was a set of utilities to develop, test and render the map graphics. This should have been the easy part. A number of very clever developers have created a mapnik-utility called Cascadenik to help people like me, that is people who are comfortable with writing cascading stylesheets for webpages, to learn how the same concept can be applied to styling maps. Unfortunately the installation process kept throwing up errors. Luckily, one of those very clever developers, a fellow named Dane Springmeyer heard my frustration over Twitter and helped me work through the issues. I am still in awe that someone would take a part of their weekend to help out a stranger, but such are some of the generous personalities out there on the web.

With Mapnik and Cascadenik, I was finally able to start telling the program which district of Uganda supports the NRM, the FDC, the independents, so on. The workflow goes something like this: In one file, I specify the layers for districts. Then in another file, I tell the program that in that layer called districts, there is a specific district called "Hoima" that I wish to colour yellow. And when I run the script to generate the graphic, the program does. Sort of thing.

Now, for anyone out there thinking this could be done just as easily in Photoshop, if not more so, you may be right. I choose to go another way for a couple of reasons. First, I am not that good with Photoshop.1 The idea of having to draw each district using the pen tool frightens me more than snakes. Secondly, and more important to me is that desire to work with a program that will allow me to take the maps beyond basic graphics into a more interactive web application, and by interactive web application I do not mean Flash.

Reading the Maps

The colour keys should offer a simple means of reading the maps. Naturally I tried to stick with party colours when rendering the maps. For those districts that have elected representatives from a variety of parties to the National Assembly, I used the colour grey. Since those districts have a complex mix of the party politics, I think the colour choice is appropriate.

The resulting map tells me that at the district level, there at least 20 of those grey districts that could go either way in the next election. And when one considers this image alongside the fact that parliament has approved the creation of about as many new districts in the past two years, accusations of gerrymandering come into sharp focus. Take the recent announcement of the new districts approved only last week:

The new districts tabled last week before Parliament and considered by the Parliament Local Government Committee include Kalungu, Bukomansimbi and Lwengo curved out of Masaka district, Mitooma, Rubirizi, Sheema district with headquarters at Kibingo, and Buhweju formerly comprising Bushenyi district, Butambala district curved out of Mpigi district, Ngora district, Napak formerly part of Moroto district, Kibuku district, Nwoya district, and Kole district formerly under Apac district.

In its sitting on April 29, Parliament also considered the creation of Kween district curved out of Kapchorwa district with its headquarters at Binyiny.

Nearly every one of those districts has been carved out of a grey or yellow district. And since each district also elects a woman representative, there are two seats up for grabs in each new district. Just what does that mean for the opposition? The map below answers that question. It shows the distribution of women representatives by party across the nation. As you can see, there is more yellow and hardly any grey. If the NRM holds the regions that currently favour it, They will have more women representatives in parliament, and therefore more MPs.

File 78

Looking at these maps, I now feel certain that maps are some of the most useful illustrations ever invented. They help us make sense of the obscure and the complex, which is probably why they are a favoured tool among political pundits. If you have ever seen Wolf Blitzer do his thing on CNN's election night coverage then you probably understand how maps can be used to define the geography of a political contest, and to shape the public's expectations regarding the outcome of that contest.

Okay so maybe CNN goes too far-that hologram gimmick was the definition of useless on the night-but political writers can still learn something from the theatrics. It is that ability to illustrate changes in political affiliations across a country's demographics that is currently lacking in much of the political writing in Uganda at the moment. Maps can show the context.

The maps I have created should focus some of the debate about what is achievable for each party ahead of the next elections.2 When Andrew Mwenda asks after the opposition's plan for the elections, he is asking how they plan to turn all the yellow parts into another colour, as indeed the rest of us should be. And when Mwenda says that the ruling party holds the strategic initiative, that should now be clear.3

Adding Interactivity

I have a number of ideas on how to improve these maps. I would certainly like to add the new districts and counties and make them available on July 1st when those new district boundaries come into effect. This might be wishful thinking though. At the moment there is very little information on which parishes make up the new districts. As for website for the Ministry of Local Government, the would-be ideal source, it is offline. Typical.

The key idea though is to make the maps openly accessible and reusable so that others can use them to tell their own stories. The folks at Development Seed seem to have pioneered a way to do this with MapBox, a suite of open source tools for creating custom maps. I will be looking into generating dedicated custom tile maps for Uganda that can be used on the web in applications like the Ushahidi instance of Uganda Witness. Along with the political landscape layers, the maps may add a little bit of context to the violence that we are all expecting to see but hoping we won't come next February.

  1. 1. I did use Photoshop to label the maps and add the keys though.
  2. 2. The full-size maps are 1200x800 in PNG format. You can download the full size maps here and here.
  3. 3. Mwenda presents a number of reasons for his conclusion, some of which I think are entirely besides the point. Elections are about achieving a numerical advantage, and I draw my conclusions about the strategic positions of the various parties based on what I see on these maps.
Filed under: