Artificial Intelligence in Electoral Analysis: Media Sentiment in Fortaleza, Ceará, Brazil
In recent years, technology has been transforming the way we analyze data and make decisions, especially in areas like politics and electoral campaigns. Although this project is recent, it is the result of a long journey that I have been building for years, working with social networks, electoral campaigns, and government. From 2008 to 2016, I participated in successful campaigns in Ceará, including Fortaleza, and helped create strategies that were already beginning to consider the influence of the internet on politics. The analysis of “sentiment” on social networks, which at the time required considerable manual effort, was a pioneering practice in which I had the privilege to work. Today, I am applying this experience with a more technological and strategic approach through artificial intelligence. We conducted an Electoral Sentiment Analysis with AI.
This personal project is a direct evolution of that experience. It arose from my academic interest in using internet data to identify decision-makers’ preferences, applying these insights in game theory models. Sentiment analysis of electoral news was a natural step within this context, and by focusing on the 2024 Fortaleza elections, we were able to generate a detailed report on how the main candidates were perceived throughout the campaign.
From Idea to Implementation
The conception of this project is deeply rooted in my journey with political campaigns and social media management. Back in 2010, when I began working more intensively on using the internet for campaigns, sentiment analysis was done manually, with teams analyzing each content to understand how messages resonated. This experience taught me the value of understanding the audience and adjusting strategies based on real data.
Today, with artificial intelligence, the process has evolved, becoming more agile and precise. The idea of using AI to monitor sentiment is not just technological but also strategic. Campaigns change rapidly, and having a tool that allows real-time adaptation to changes in voter perception is a competitive advantage. Seeing AI automatically classify mentions of candidates as positive, negative, or neutral was the result of a vision I’ve been cultivating for a long time.
Sentiment Analysis and Academic Applications
My academic motivation has always been to better understand how data can reveal decision-makers’ preferences. Game theory, in which I am deeply interested, can be enriched by these analyses of data extracted from the internet. With the monitoring of real-time sentiments, we can predict behaviors, map future scenarios, and create more accurate models to understand how individuals and groups make decisions.
The sentiment analysis project for the Fortaleza elections is a clear example of how these concepts can be applied. Utilizing AI, we analyzed more than 1,132 news articles, collected from 56 media outlets, and identified how the candidates were perceived over time. The mentions were classified as positive, neutral, or negative, allowing deep insights to be generated from the data.
*Sorry about graphs in Portuguese


The Generated Report: A Portrait of the Elections in Fortaleza
The report generated by the project provided a clear view of how the candidates were perceived during the campaign. Mentions of Evandro Leitão and Capitão Wagner showed a predominance of positive perceptions, while candidates like Eduardo Girão faced a greater amount of negative mentions.
Furthermore, most mentions were classified as neutral, reflecting the informative nature of the news. However, the fluctuations between positive and negative sentiment helped show how specific campaign events directly influenced public perception. This type of analysis allows campaigns to adjust their strategies in real-time, according to the evolution of media coverage.





The cumulative sentiment over time offers a detailed view of how candidates’ perceptions changed during the electoral campaign, highlighting the moments that led Evandro Leitão and André Fernandes to the second round and the fall of the current mayor, José Sarto, who failed to get re-elected. Evandro Leitão stood out with a clear trend of growth in positive sentiment. From the end of August, there was a steady rise until early October, indicating continuous positive response from the media and the public, which consistently consolidated his image throughout the campaign. André Fernandes, on the other hand, showed moderate fluctuations at the beginning of the race, with a sharp drop in cumulative sentiment in mid-September. However, he managed to recover in early October, with a slight increase in positive mentions, demonstrating a resilient campaign that overcame challenges in the final weeks. As for José Sarto, he showed a relatively stable sentiment until the end of September, when there was a significant negative shift starting on the 27th. This sharp decline may have been the result of more critical coverage, and the accumulated positive sentiment remained low, reflecting the difficulties his campaign faced in the final weeks.
The study considered the period between August 6 and October 5, 2024, covering the most intense weeks of the electoral campaign up to the final phase before the election. During this time, the public and media perception of the main candidates for the Mayor of Fortaleza was monitored, with sentiment analysis extracted from 1,132 news articlespublished in 56 media outlets.
Sentiment Analysis with AI: A System of Global Application
O que mais me entusiasma é que este projeto, embora focado nas eleições de Fortaleza, pode ser aplicado em diferentes What excites me most is that this project, although focused on the elections in Fortaleza, can be applied in different contexts and industries. The system we developed is capable of analyzing data on any subject, whether a political campaign or a brand’s reputation in the market. Companies can use this technology to monitor the public perception of their products or services, while public agencies can track how policies are being received.
The ability to monitor data in real-time, in different languages and markets, makes this system a tool of great strategic value for any organization that needs accurate and immediate insights about what is being said in its area of operation.
It is essential to emphasize that, despite the power of AI, it does not replace human work. Artificial intelligence is a tool that amplifies our analytical capacity, but it is still human critical thinking and creativity that provide the necessary context to transform this data into strategic actions.
This project is proof that technology can be an indispensable ally, but it is human work that gives meaning to data and transforms insights into concrete results. In the electoral field, or any other sector, the balance between technology and human intelligence will be the key to success.
Throughout this process, I also needed to reflect on the ethical issues involving data monitoring. Although we are dealing with public data and news sources, it is important to consider the impact that monitoring can have. Privacy and transparency are issues that are always present when we use AI for sentiment analysis. And in times of fake news and post-truth, the use of AI to detect patterns of misinformation is an increasing necessity.
In this project, we sought to ensure that all analyses were done ethically, and that the focus was on quality public data. Thus, the project not only provides valuable insights for political strategy but also acts transparently and responsibly in its use of data.
Finally…
This project reflects not only my academic interest in data and strategic decision-making, but also my years of experience working with electoral campaigns, social networks, and government. The generated report provides a detailed view of how the candidates in Fortaleza were perceived over time, and I believe this technology has an essential role in the future of data analysis.
Furthermore, the application of this technology goes far beyond elections. Whether in the political field, the corporate market, or the public sector, sentiment analysis and real-time data monitoring offer valuable insights for any organization that needs to adjust its strategies based on public perceptions.
If you want to know more about this project, access the full report, or how this technology can be applied in other contexts, get in touch. This is just the beginning of a path that I believe has much more to offer!
Deoclécio Paiva de Castro
Ph.D student in Economics
M.Sc in Mathematical Optimization Modeling and Quantitative Methods
B.Sc in Industrial/Production Engineer
Leave a Reply
Want to join the discussion?Feel free to contribute!