Analysis of the 2016 U.S Presidential Primaries

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’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

#python #trainwithnycdsa 2019 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans 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 boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay gbm Get Hired ggplot2 googleVis H20 Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI