1 of 18

Turning Data into Democracy:

AKA: Complex Political Phenomenon

2 of 18

Setting the Stage

In the ever-shifting landscape of politics, predicting the outcome of an election is no easy feat. Historically, analysts and pundits have relied on a combination of polling data, demographics, and intuition to forecast electoral outcomes. However, as election dynamics become more complex, traditional methods often fall short.

​

The question, then, is how can we improve the accuracy of our predictions? One promising approach lies in leveraging the vast wealth of historical polling data that we have accumulated over the years. By using this data to train machine learning models, we may be able to unlock new insights and improve the accuracy of our election predictions.

​

In this presentation, we will explore the process and challenges of harnessing historical polling data to create a predictive model for future elections.

3 of 18

TABLE OF CONTENTS

01

03

02

04

Stephen Whitson

Data Collection

Emmanuel Montano

Data Cleaning

​

Michael Schell

​

Programming Model

Robert Lehr

​

Visualizations

4 of 18

Data Collection

01

Stephen Whitson

5 of 18

Data Collection

Polling Data

​

  • 2016
  • 2019
  • 2023

​

The dataset for this project, sourced from Kaggle.com and fivethirtyeight.com and is a compilation of historical polling data from various organizations and research groups.

​

6 of 18

Data Cleaning

02

Emmanuel Montano

7 of 18

Data Cleaning

Data used

​

  • Presidential_polls_2016 csv with 10237 rows 28 col
  • Favorability_polls_rv_2019 csv with 1632 row 17 col
  • Favorability_polls_2023 with 2380 rows 37 col

​

For data cleaning, we used pandas to load the data from SQLite database files, filtered it down to four columns, and exported the cleaned data as CSV and JSON files. We compiled the data into an SQLite database, chosen for its serverless hosting advantage. Our model training utilized data from the 2016 and 2019 elections. With our testing using the 2023 data.

8 of 18

Data Cleaning

9 of 18

Programming Model

03

Michael Schell

10 of 18

Programming Model

Look at the data used

​

  • Re-formatted data to work in the model
  • Started with a Neural Network
  • Predicted no president will be elected in 2024 with Random Forest model
  • Using XGBoost, predicted Biden has a 77% chance of winning the 2024 election

​

11 of 18

Programming Model

Initial Random Forest Predictions

Random Forest Predictions

Results: .99

Interpretation: Trump has a 99% chance of winning.

12 of 18

Programming Model

XG Boost Training Model

XGBoost Predicting Model

​

Results: .23

​

Interpretation: Biden 77% of Winning.

13 of 18

Visualizations

04

Robert Lehr

14 of 18

Visualizations

15 of 18

16 of 18

Visualizations

17 of 18

Summary

A Complex-Political-Phenomenon

The M.E.R.S. Research Facility uses massive multivariate optimizing algorithmic models (MMOAMs), a.k.a. machine learning algorithms, to predict the winner of the next USA Presidential Election. The model predicts that there is a 77.4% that Democrats will win the Presidential election. Our model predicts with with 82.5% recall (i.e. - 17.5% the model inaccurately states Republican favorability is higher) and 100% precision (i.e, - 100%, the model accurately states Democrat favorability). Read more to find out how!

​

18 of 18

Any Questions?