Predict 2024 US Election with EDA & Machine Learning
Predict the 2024 US Election with Exploratory Data Analysis (EDA), Pandas, and scikit-learn. In this hands-on project, master EDA, feature engineering, and regression modeling as you gather and preprocess polling data. Build separate models for each swing state, respecting the chronological order of events, and evaluate performance using metrics like MAE. Discover advanced techniques like ensemble methods and time-based weighting, while exploring the ethical considerations and limitations of political forecasting.
4.7 (38 Reviews)

Language
- English
Topic
- Machine Learning
Enrollment Count
- 238
Skills You Will Learn
- Machine Learning, Python, Data Science, Data Analysis, Data Visualization
Offered By
- IBMSkillsNetwork
Estimated Effort
- 60 minutes
Platform
- SkillsNetwork
Last Update
- May 5, 2025
A Look at the Project Ahead: Can Data Predict Election Outcomes?

_________________________________________________________
What You'll Learn
- Data gathering & preprocessing: Collect and clean polling data to ensure meaningful analysis.
- Exploratory data analysis (EDA): Uncover trends and relationships in electoral data.
- Feature engineering: Create robust features to capture the nuances of polling data and swing state dynamics.
- Regression models: Build and evaluate regressor-based models tailored to each swing state.
- Ensemble techniques: Experiment with stacking regressors to improve prediction accuracy.
- Time-based weighting: Apply time-decay functions to prioritize recent polling data.
- Model evaluation: Use metrics like Mean Absolute Error (MAE) and the number of correctly predicted winners to assess model performance.
Who Should Complete This Project
- Aspiring data scientists: Looking to practice predictive modeling with a real-world dataset.
- Python beginners: With a basic understanding of Python and Pandas, ready to dive into hands-on data analysis.
- Machine learning enthusiasts: Wanting to explore regression models, feature engineering, and advanced techniques like ensemble methods.
- Political data fans: Interested in the intersection of data science and electoral trends, while understanding the ethical implications of forecasting.
What You'll Need
- A basic understanding of Python: Familiarity with Python programming is essential for working with the code and concepts in this tutorial.
- Foundational data analysis knowledge: Understanding key concepts like data cleaning, manipulation, and visualization will help you navigate the project smoothly.
- Access to modern web browsers: Make sure you have access to a modern web browser such as Chrome, Edge, Firefox, Internet Explorer, or Safari.
- A learning mindset: Be open to exploring data critically and understanding the unpredictable nature of elections.
_________________________________________________________

Language
- English
Topic
- Machine Learning
Enrollment Count
- 238
Skills You Will Learn
- Machine Learning, Python, Data Science, Data Analysis, Data Visualization
Offered By
- IBMSkillsNetwork
Estimated Effort
- 60 minutes
Platform
- SkillsNetwork
Last Update
- May 5, 2025
Instructors
Hailey Quach
Data Scientist
Hi, I'm Hailey. I enjoy teaching others to build creative and impactful AI projects. By day, I’m a Data Scientist at IBM; by night, an Honors BSc student at Concordia University in Montreal, always exploring new ways to combine learning with innovation.
Read moreContributors
Ricky Shi
Data Scientist at IBM
Ricky Shi is a Data Scientist at IBM, specializing in deep learning, computer vision, and Large Language Models. He applies advanced machine learning and generative AI techniques to solve complex challenges across various sectors. As an enthusiastic mentor, Ricky is committed to helping colleagues and peers master technical intricacies and drive innovation.
Read moreJoseph Santarcangelo
Senior Data Scientist at IBM
Joseph has a Ph.D. in Electrical Engineering, his research focused on using machine learning, signal processing, and computer vision to determine how videos impact human cognition. Joseph has been working for IBM since he completed his PhD.
Read more