Analysis of the 2016 U.S Presidential Primaries

Jurgen De Jager
Posted on Aug 8, 2016

Overview

This analysis sets out to visualize and quantify the 2016 United States Presidential Primary. I specifically focus on how different states voted for each candidate within each party. I seek out to find if there exists correlations between certain demographic characteristics and the fraction of votes each candidate got in each state. This shiny app allows you to interactively and dynamically visualize how candidates performed in each state. Combined with the visualization aspect, I also run a couple of regression models to quantify how certain variables like education and income influenced the fraction of votes candidates got in each state. The data was compiled by Ben Hammer, and can be found here.

My app is structured as follows:

1. Spatial Visualization of Bernie Sanders Primary Results

2. Spatial Visualization of Hillary Clinton Primary Results

3. Spatial Visualization of Donald Trump Primary Results

4. Spatial Visualization of Ted Cruz Primary Results

5. Spatial Visualization of John Kasich Primary Results

6. Regression Analysis

7. 3D Visualization of How Education and Income Affected Voting Results for each Candidate

Introduction

Before we dive into the analysis, I first provide some background information about the process. Prior to a general election, there is a selection process to determine which candidate will appear on the ballot for a given political party in the nationwide general election. Political parties generally hold national conventions at which a group of delegates collectively decide upon which candidate they will run for the presidency. The process of choosing delegates to the national convention is undertaken at the state level, which means that there are significant differences from state to state and sometimes year to year. The two methods for choosing delegates to the national convention are the caucus and the primary.

Democrats

The  Democratic Party presidential primaries and caucuses  took place within all fifty U.S. states, the District of Columbia, and five U.S. territories and occurred between February 1 and June 14, 2016. A total of six major candidates entered the race starting April 12, 2015, when former Secretary of State and New York Senator Hillary Clinton formally announced her second bid for the presidency. She was followed by Vermont Senator Bernie Sanders, former Governor of Maryland Martin O'Malley, former Governor of Rhode Island Lincoln Chafee, former Virginia Senator Jim Webb and Harvard Law Professor Lawrence Lessig. On June 6, 2016, the Associated Press and NBC News stated that Clinton had become the presumptive nominee after reaching the required number of delegates, including both pledged and unpledged delegates (superdelegates), to secure the nomination. In doing so, she had become the first woman to ever be the nominee of any major political party in the United States.

Republicans

The 2016 Republican Party presidential primaries and caucuses also took  place within all 50 U.S. states, the District of Columbia, and five U.S. territories, and occurred between February 1 and June 7. A total of 17 major candidates entered the race starting March 23, 2015, when Senator Ted Cruz of Texas was the first to formally announce his candidacy: former Governor Jeb Bush of Florida, retired neurosurgeon Ben Carson of Maryland, Governor Chris Christie of New Jersey, businesswoman Carly Fiorina of California, former Governor Jim Gilmore of Virginia, Senator Lindsey Graham of South Carolina, former Governor Mike Huckabee of Arkansas, former Governor Bobby Jindal of Louisiana, Governor John Kasich of Ohio, former Governor George Pataki of New York, Senator Rand Paul of Kentucky, former Governor Rick Perry of Texas, Senator Marco Rubio of Florida, former Senator Rick Santorum of Pennsylvania, businessman Donald Trump of New York and Governor Scott Walker of Wisconsin. This was the largest presidential primary field for any political party in American history.

Bernie Sanders - Fraction of Votes by State

bern

Hillary Clinton - Fraction of Votes by State

hillary

 

Ted Cruz - Fraction of Votes by State

ted

 

Donald Trump - Fraction of Votes by State

don

John Kasich  - Fraction of Votes by State

kasich

Regression Outputs

Screen Shot 2016-08-07 at 10.56.52 PM

3D Visualization

 

3dreg

About Author

Jurgen De Jager

Jurgen De Jager

Jurgen’s fascination with analytics and its applications specifically within data science, led to his decision some time ago that this is the career path he wants to pursue post graduation. In anticipation of this, he has worked extensively...
View all posts by Jurgen De Jager >

Leave a Comment

No comments found.

View Posts by Categories


Our Recent Popular Posts


View Posts by Tags

2019 airbnb Alex Baransky alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus API Application artist aws beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep Bundles California Cancer Research capstone Career Career Day citibike clustering Coding Course Demo Course Report D3.js data Data Analyst data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization Deep Learning Demo Classes Demo Day Demo Lesson Discount dplyr employer networking feature engineering Finance Financial Data Science Flask gbm Get Hired ggplot2 googleVis Hadoop higgs boson Hiring hiring partner events Hiring Partners Industry Experts Instructor Blog Instructor Interview Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter lasso regression Lead Data Scienctist Lead Data Scientist leaflet Lectures linear regression Live Chat Live Online Bootcamp Logistic Regression machine learning Maps matplotlib Medical Research Meet the team meetup Networking neural network Neural networks New Courses nlp NYC NYC Data Science nyc data science academy NYC Open Data NYCDSA NYCDSA Alumni Online Online Bootcamp Online Lectures Online Training Open Data painter pandas Part-time Portfolio Development prediction Prework Programming PwC python python machine learning python scrapy python web scraping python webscraping Python Workshop R R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking Realtime Interaction recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn Selenium sentiment analysis Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau team TensorFlow Testimonial tf-idf Top Data Science Bootcamp twitter visualization web scraping Weekend Course What to expect word cloud word2vec XGBoost yelp