Validating the Vote: A Crowdsourced Solution for Nigeria’s 2023 Election
How an engineer-built WhatsApp bot uses the law of large numbers to sense-check official election results.
The 2023 general elections in Nigeria are just around the corner. On 25th February 2023, Nigerians will turn out to their polling stations to cast their vote to decide who will be the next president.
Soon after polling units close, the Independent National Electoral Commission (INEC) will announce the winner. This will set in motion the process of bringing in the 16th head of state and the 14th person to rule the federation.
Given Nigeria’s history with corruption, how do we know that INEC is independent and why should we trust the results that INEC declares? Wouldn’t it be great if there was a way to validate INEC’s result?
There are over 120,000 polling units across Nigeria. When the election is over, each polling unit will collate their result and announce them to the voters. The results of the polling units are forwarded to the ward. The ward collects the results from all the polling units, summarizes them, and forwards them to the local government area (LGA). The LGA repeats the process by collating results from all wards and passes it on to the state level. The state then forwards all the results to INEC headquarters in Abuja.
When INEC release the results to the general public, they release the results at the state level and do not provide further granularity at the LGA, ward, or polling unit level. So there is no way to validate INEC’s results.
But in this era of technology, how can we as private citizens crowdsource our data to validate what INEC tells us? What if we could all send the results of our polling units to a central place? If enough of us do that, we would have a way of sense-checking INEC. This method wouldn’t be fool-proof but it would give the public a way of understanding whether our votes are counted legitimately.
The next section gives details of a project I have built to do just that. Provide a central place where we can send the results of our polling units and gain a collective understanding of the election results.
Election Monitoring WhatsApp Bot
I chose to build the bot using WhatsApp because it is a popular social messaging tool used in Nigeria. A lot of people use WhatsApp and know how to navigate it.
The first step was to download the data for all polling units, wards, LGAs and states from INEC. This was a cumbersome process as we could not use an API to download the data easily. So this part of the process was manual, labour intensive and prone to errors. I then wrote some code to clean the data and format it so that the next section of the process would be able to use it.
The next step was to write some python code to read in the data from INEC and then use that to create some dialogue to identify the user’s location so that the data they enter will be allocated to the correct polling unit.
After this, I needed a way to integrate the python code with WhatsApp.
Finally, we have a Postgres database attached to the application. This is where all the data we receive will be stored. I will be downloading this data from the database to perform some statistical analysis on it. Of course, I will be keeping you updated on everything that I discover from the data, so stay tuned.
Frequently Asked Questions
Q: Do I need to go out and vote?
A: YES, please make sure you go out and vote on election day. The data you send to us will not be used by INEC to determine the outcome of the elections. So you MUST go out and vote.
Q: What data do I need to send to the WhatsApp bot?
A: Please send the final results from your polling unit.
Q: How will I know the final results from my polling unit?
A: When election is over, the INEC officials at your polling unit will count all the votes and announce the results in front of everybody. Please note down these results and send them to us.
Q: How do I send you the results?
A: Please send a message (any message) by WhatsApp to +1234 901 3331 and answer the questions that the bot will ask you.
Q: I have sent a WhatsApp message to the bot, but I don’t know the name of my Ward and Polling Unit
A: You can find your Ward and Polling Unit on your PVC
Look at your voter’s card and look for the field called DELIM. The first part is your STATE, the second part is your LGA, the third part is your Ward. In the example PVC shown here, the voter’s state is LAGOS, the LGA is ETI OSA, and the ward is VICTORIA ISLAND II.
To find the Polling Unit, look at the code, just above the picture. The last 3 digits is the reference for your polling unit. When the bot asks you for your polling unit, just enter this number. In this example, the polling unit is 70
Q: I sent a message to the bot, but I did not get a response
A: Sometimes, due to internet connectivity, the bot might be slow to respond. However, most responses should happen within one minute.
Q: How do you verify if the results which people send to you are genuine?
A: We depend on the law of large numbers i.e. if lots of people send in their results, then we can assume that the results are representative of the reality. Also, if lots of people send in their results, then it makes it easy for us to spot insincere people who send in anomalous results. We can also see the phone numbers of people who send in results, so if someone is trying to send in multiple fake results, we will be able to identify and eliminate those results from the analysis.
Remember, none of what we are doing is the official results. We are only trying to understand what the electorate say they did, from the electorate themselves.




