State Analysis (Part 1)

A short description of the post.

Vishal Singh true

Table of Contents

State Level Analysis

This section explores the relationship between voting behavior and demographics at the state level. We begin with a quick look at state-level election outcomes since WWII.

Section 2 takes a closer look at the demographic correlates of voting (Trump vs. Clinton) using a large number of state attributes (e.g. politics, religion, demographics, crime, & ‘psychographics’).

Section 3 provides simple multivariate analysis (PCA/Clustering). These are primarily class notes for introductory EDA (exporatory data analysis) for Data Driven Decision Making (D3M) class I teach at NYU-Stern.

Note: Analysis presented here is focused on visual interpretation of data patterns. All data and replication codes in R are provided. You can see R codes by clicking on the icons on the right side of the graphs.

1. Election History

Here we visualize the election outcomes at the state level since the end of WWII. Three different approaches are presented: small multiples, motion charts, and heatmaps. Visualizations in this section use R wrapper to Highchart library by Joshua Kunst

Note: Michigan, Arizona, and NH for 2016 are not declared as of this writing but are assigned Red-Blue based on projections.

Electoral Maps

Hover over the maps for Details

Motion Map

We can condense the small multiples to a single chart thanks to the motion plugin in Highcharter.

Heat Map


If you see mistakes or want to suggest changes, please create an issue on the source repository.


For attribution, please cite this work as

Singh (2020, April 25). Blog: State Analysis (Part 1). Retrieved from

BibTeX citation

  author = {Singh, Vishal},
  title = {Blog: State Analysis (Part 1)},
  url = {},
  year = {2020}