How one piece of code empowered hundreds of thousands voters in the South African Local Government Elections 2021
Abigail Kemper
November 26, 2021
The founder of Open Cities Lab (OCL), Richard Gevers, was all over the South African press recently talking about — the tool that tells you who you can vote for in the Local Government Elections (LGE). It was only possible because the open data community made it happen. The portal is a collaboration between Richard Gevers (Open Cities Lab leader), Matthew Adendorff (head of Data Science at Open Cities Lab), Adi Eyal and JD Bothma (from OpenUp), Paul Berkowitz (who wrangled data from the IEC), Wasim Moosa (Open Cities Lab Lead developer) and Jodi Allemeier.

At the time of publishing, 118 000 people had used the tool, and we can assume that most of them were registered voters. And possibly more exciting than the site analytics are the stories about people who used the tool and as a result started engaging in conversations with their friends and peers about who their ward candidates were.

How it works: Type in your address and it will identify your ward as well as all the candidates contesting in your ward, as listed by the Electoral Commission of South Africa (IEC). Each candidate’s name, age and political party appear in the search results including all the other wards in which the candidate is contesting. When you click the name of the candidate, you will be redirected to the google search results for that name. You can also view more information about your ward by clicking the link to Wazimap.

It’s a really simple tool. “I really wasn’t sure if it would be successful,” said Richard Gevers. However the positive reception and media attention received proved that at least some people do want to have an active role in society. He said, “If you remove barriers, they can get involved. My one concern was that it was too simple to be useful. Clearly it wasn’t and clearly this is something people wanted. If you create an enabling environment, people can and will participate.” This is how hundreds of thousands of voters were empowered in the 2021 LGE.

How it all started: Just over 2 weeks before the LGE on 1 November 2021, Richard and a few colleagues were having dinner together, when one of OCL’s data scientists, expressed frustration with not knowing who to vote for. The information about candidates was not easily accessible, even for our tech savvy team.

Amidst the end of the year rush to meet deadlines, Richard had asked Matthew Adendorff (Open Cities Lab lead data scientist), what it would take to get the MyCandidate tool up and running. Knowing that the data on each candidate was published by the IEC in pdf format, Matt was not sure if it was possible within such a short time frame to scrape all the candidate information into a spreadsheet and cross check it for accuracy. The data needed to be available in an open format.

It just so happened that Paul Berkowitz had just done this. With much effort, he had taken all the candidate information in the pdf and made it openly available on this google spreadsheet. So that night, Matt plugged in the now open data and resurrected the

It was far from perfect. There was no styling or even any branding but it worked. A few days later at 18:58 on 19 October 2021, Richard tweeted the following message asking the twitter community for some user testing feedback. The responses were invaluable, and the retweets and media attention catapulted this simple tool into stardom.

The first version of the MyCandidate tool had been conceived and published just days before the 2016 LGE. The use case then was the same: Who are the candidates running in my ward? Some of us know about the parties contesting in our ward, but who are the candidates, and who are the independent candidates. Five years later, the tool went live in just enough time to reach a wider audience and have a significant impact.

All the hallmarks of Open Data:

The success and impact that the MyCandidate tool has had and will have in the future are testament to the Open Data Mission and the mission of Open Cities Lab: We work to build inclusion and participatory democracy in cities and urban spaces through empowering citizens, building trust and accountability in civic space, and capacitating government. When we can use technology and open data to do this, we do.

The MyCandidate tool is licensed under the Attribution 4.0 International. Leading up to the elections, we encouraged media organisations and even the IEC to embed the tool on their site. The embed code is available on the tool itself. We invite you to find, use, test, improve and share the code, which can be found on Github here.

Change Log:
Since the MyCandidate tool went live on 19 October 2021, some changes and improvements were made. Wasim Moosa (Open Cities Lab Lead developer), worked late on Friday night before the Monday election day, to solve the geocoding “problem” we had. It’s a wonderful problem to have so many users that the search functionality needs upgrading. When the number of users exceeded a certain threshold, Wasim needed to switch the geocoding query to google places API.

Thanks to the community of user testing that shaped the tool into what it became, we made the following changes after launch:

1. Added an embed link for others to embed the tool on their sites and in their news articles
2. Added a Favicon for the app
3. Added missing candidate data that was not found in the original dataset
4. Switched the Geocoding query to google places API
5. Updated the ward boundaries using the Open Up Mapit tool

6. Added privacy note on the application stating “The My Candidate tool does not store any user information, including your address.”

7. Added a link to Jodi Allemier’s informative blog piece about how local elections work and what each ballot you receive at the voting stations means.

8. Added the ward number to the search results, making it easier for users to see which ward their street address belongs too.

Future plans for the MyCandidate tool

Open Cities Lab is open to all opportunities to develop the MyCandidate tool further and replicate it in other countries. We are particularly interested in the potential for use in Zimbabwe, Kenya, and other countries in the continent. Whatsapp integration is also on the cards. This would make it possible for users to initiate a request via Whatsapp. And there is also an opportunity More work to potentially create a MyCounsellor type intervention, where we can build a track record for local representatives. We look forward to exploring these ideas and encourage others to contact us about the MyCandidate tool for more information.

Latest blog articles