I Let AI Analyze The 2024 Election... Here's What It Found
Science & Technology
Introduction
As the buzz around the 2024 U.S. presidential election intensifies, I found myself pondering whether it’s possible to make accurate predictions about the election results. Instead of relying on political analysts with their complicated graphs and expert opinions, I decided to conduct an experiment by utilizing artificial intelligence (AI) to analyze publicly available data. Here's how I approached the project and the surprising results I obtained.
The Great AI Experiment
Late at night, while catching up on Trump meme videos, I had a "what if" moment: Could AI predict the next president? To set the experiment up, I decided to turn to social media for anecdotal data reflecting public sentiment about the candidates—specifically Donald Trump and Kamala Harris.
Given the limitations with certain platforms (notably, Twitter now requires a hefty subscription for data access), I opted for Reddit, where users often engage in political discussions. However, I had an understanding that focusing on just one platform could introduce bias to the results.
Gathering Data
To collect meaningful data, I used AI to assist in determining how to fetch relevant comments and sentiments from Reddit. I relied on tools like Hugging Face and ChatGPT to generate code capable of scraping and analyzing Reddit comments. The plan was straightforward but did require creating an API project to get authentication credentials from Reddit itself.
Analyzing Comments
For my analysis, I started by querying various political subreddits, one of which boasted nearly nine million members. After multiple iterations, I analyzed 400 posts and over 73,000 comments, observing trends and sentiments surrounding the election.
Results that Surprised Me
The results were startling. After the initial analysis, Trump was predicted to have a 65% chance of winning, while Kamala Harris sat at 34%. Repeating the process showed Trump’s chances rising to 71% while Harris dropped to 29%. The analysis revealed a consistent trend that, seemingly counterintuitively, the more data I collected, the larger Trump’s predicted margin became.
Perhaps more interesting than numerical predictions were sentiment analyses on the comments themselves. Despite Trump having a larger support prediction, the emotional tone of comments skewed positively towards Harris. While both Trump and Harris supporters expressed confidence, they had differing emotional responses—Harris supporters exhibited more positivity, while Trump supporters expressed more anger.
What This Means
While these predictions were derived from Reddit data, it’s crucial to recognize that social media sentiment is not a definitive gauge of electoral outcomes. The analysis pointed out that the data had inherent biases, and results might differ substantially from another social media platform, like Twitter. The takeaway? AI analysis, though fascinating, should be taken with a grain of caution.
Conclusion
This project unveiled a unique perspective on approaching political predictions, empowering anyone, regardless of technical expertise, to experiment with data analysis. Ultimately, the use of AI will not provide definitive answers but can stimulate insightful conversations about political trends.
If you’re curious and interested in trying this out yourself, I have included the code and dataset used in the project below.
Keywords
- AI analysis
- Polarizing opinions
- 2024 Election predictions
- Political sentiment
- Reddit data scraping
- Emotional tone analysis
FAQ
1. Why did you choose Reddit as your data source?
Reddit offers a rich tapestry of user opinions in various specialized communities, which can provide insights into public sentiment about political candidates.
2. How did you analyze the comments?
I used AI-generated code to scrape comments and posts from specific political subreddits and applied sentiment analysis algorithms to gauge the tone of discussions.
3. What was the outcome of the AI predictions?
The AI predicted that Trump has a higher chance of winning compared to Harris based on the collected comments, showing a trend of increasing support for Trump as more data was analyzed.
4. Were there any biases identified in the data?
Yes, bias was identified based on the platform used for data collection. Results may not be universally applicable as different platforms can reflect various segments of the population.
5. Can this method be used for future predictions?
While the methodology could be applied again, it’s essential to use a diverse mix of data sources for more accurate predictions, as relying solely on one platform may yield skewed results.