NOTA BENE: This was an AI project I executed in 2019 during the 2019 elections. It was first published in my Medium blog on the 15th of February, 2019. I decided to republish here on my website for anyone looking for material for research purpose.
By streaming data from Twitter in real-time we were able to gather over 800,000 tweets which formed the sample for this analysis.
Data (Tweets) streamed were primary keywords pertaining to the Nigeria 2019 election such as: “PDP”, “Atiku”, “Atikulated”, “Peter Obi”, “APC”, “Buhari”, “Mbuhari”, “Tinubu”, “Osinbajo”, “Lagos”, “Kaduna”, “Kano”, “Abia”, “Delta”, “port harcourt” .
The sentiments of each Tweet was resolved and all values were stored on a database. See data description below.
Overall the percentage of Negative and Positive Tweets are 42% and 58% respectively as can be seen from the chart below.
For the Individual presidential candidates, Buhari had a higher number of overall mentions in tweets totaling about 218,519 tweets. Atiku on the other hand had a total mention of 136,149 mentions in tweets.
The distribution of tweets for each presidential candidate is as given below.
As can be seen in the distribution, Atiku has a higher positive rating in percentage when compared to tweets that mentions him. But this is not the conclusive milestone on our data.
Next we explore sentiment distribution as regards to the two main political parties in question, APC and PDP with a total tweet mention of 81,312 and 75,642 respectively.
In the next distribution we will be looking at comparing related data side by side to give us a holistic view of what is really happening.
Yes, we also have to factor in the sentiments for the Vice-Presidential candidates as we believe that will play some role (although of lesser weight) in overall outcome of election.
In perspective, we want to now see how each of these distributions stack up in overall weight for the winner of election.
To arrive at our final analysis, we will appropriate weights to each color and multiply by the value each color carries. Each value is a final rationalization of both the positive and negative sentiments respective to each variable.
That is, the rationalization of both the positive and negative sentiments for Buhari gives him a total score of 226 and that for Atiku gives him a total score of 314. The same rules apply for the represented political parties and the Vice Presidential candidates.
Once weight are applied and values processed. The final percentage score for each candidate is used to predict the final outcome of the Nigeria 2019 election.
Buhari rounds up to 46%, while Atiku emerges with 54% as shown in the distribution below.
GOING FORWARD — VALIDATING DATA
We continue to monitor the sentiment trends of Nigerians online, as of our most recent stream at the time of publishing this report, we see Buhari trailing below in the negative trend (we suspect the recent Kaduna killing may be a causative factor), while Atiku has a good positive sentiment building for him. See graphical distribution shown below.
The design of this project is purely for research purpose. It is designed to explore how the sentiments of online users can translate to actual actions. In this case, the sentiments of Twitter users in relation to the Nigeria 2019 general elections.
A similar approach was used during the US 2016 general election, to understand the voter sentiment distribution between President Trump and Hilary Clinton.
We understand some of our various limitations in this case, we do not lay claim to sufficient data. But overall we believe the methods utilized here can form a foundational structure if given more data and more efficient computing resources for predicting election outcome.
We also understand the many other factors not considered here such as, unrepresented eligible voters (especially in rural areas) in online spaces such as Twitter. And the claim that the majority of Twitter users are “Talk and NOT do” that is inactive voters. We believe the idea is to represent their sentiments, which is a sample of real-life, everyday Nigerians.
We also understand the fact that underage voters can influence numbers especially in many Northern states; and the fact that election rigging may alter all the critical conclusions of the biggest datasets and finest algorithms.
But all in all, we believe that, with more Nigerians coming online, and student/young population becoming the highest represented demographics in the INEC voters book, predictive tools such as the one used here will play a more active role in election processes and lead to an improved credibility system for checking against fraudulent outcomes in elections.
DISCLAIMER: This is intended strictly for research purpose in the field of AI, Machine Learning and Data Science.
It does not in anyway validate any political candidate or gives room for this to be hijacked as a political campaign edge for or against any political candidate or party.
Personally, I am looking forward to a successful election run(Nigeria 2019 Election) and wishing everyone (especially the NYSC adhoc staffers) safe during the period.
In another project, we will be collecting data to analyze the sentiments of Nigerians on the election process and results. It will cover the sentiments of how Nigerians feel about the way INEC ran the 2019 elections.