Motivation

The 2016 General Election for President of the United States was our very first general election in which we were able to vote. Many pundits, politicians, and citizens alike found the contest between Hillary Clinton and Donald Trump to be one of the most bitter presidential races in recent memory, and many more were surprised by the outcome.

Most pollsters and statisticians had Hillary Clinton maintaining a comfortable margin before the election. Yet, Donald Trump emerged victorious as the 45th President of the United States. Our goal is to try to explain why.

We have incorporated US Census demographic data, as well as employing comparisons between Donald Trump’s 2016 victory over Hillary Clinton with Barack Obama’s 2012 re-election victory over Mitt Romney.

Content

This website primarily displays the visualizations generated from our analysis coupled with machine learning models. They were created via leaflet and ggplot2 in R. Our 2012 election data was obtained from the Huffington Post, and our 2016 election data was sourced from Kaggle.

Code chunks for the graphics and models are not output. Please consult our Github (https://github.com/theNathanLin/election2016) for more information, including our original graphics and code.

Furthermore, our analysis excludes Alaska and Hawaii as well as third-party candidates.