Who will win the 2024 US presidential elections?
In this data app, a deep dive into poll data is combined with machine learning to predict what’s in store for the 2024 presidential elections.
Used datasets:
Nationwide vote prediction for Trump vs. Harris using polling data
Run to view results
The resolut is a visualization of the individual labels (red states = republicans, blue states = democrats, purple states = swing states) results from K-means clustering.
Run to view results
In the dataframe below, you can observe the representation of Republicans, Democrats, and Swing States per state.
Run to view results
The result in the folium map below shows the behavior (Red, Blue, or Swing) of each state by coloring them on the US map accordingly.
Run to view results
Linear regression - predict the percentage for Trump and Harris
Run to view results
The Mean absolute error of 3.46% measures how close the model's predictions are to the actual numbers, according to the predictions based on all the polling data in the table, Trump is expected to receive 44.43% of the vote.
Run to view results
According to the predictions based on all the polling data in the table, Harris is expected to receive 46.65% of the vote.
Classification - predict if Democrats or Republicans will win
Run to view results
Based on the model's predictions, the Democrats are set to win the upcoming election. The model has taken into account polling data and other key factors to make this forecast. According to these results, the Democrats are likely to get more votes than the Republicans. Accuracy of classification: 0.9942004971002486 Prediction: Democrats will win the election.
Will Kamala Harris lose Michigan's crucial Arab-American Vote?
Michigan, a key swing state, could play a major role in the upcoming election due to its large Arab-American population, the largest in the U.S. How Kamala Harris positions herself on key issues may sway this community and influence the outcome. To understand which party has a better chance of winning, the polling data were analyzed to see whether Democrats or Republicans are more likely to secure Michigan’s critical electoral votes.
Run to view results
Explore the swing states
Swing states like Arizona, Florida, Georgia, Michigan, North Carolina, Ohio, Pennsylvania, and Wisconsin are key players in U.S. elections. Since they can swing either way, they’re often where close races are decided, so candidates focus heavily on winning their support.
Run to view results