Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
data new stories Nov 15, 2016
maps first commit Nov 9, 2016
.RData new stories Nov 15, 2016
.Rhistory new stories Nov 15, 2016
.gitignore additional analysis Nov 10, 2016
analysis2.Rmd new stories Nov 15, 2016
analysis2016.R additional analysis Nov 10, 2016
analysis3.Rmd new stories Nov 15, 2016
analysis3.html all datahaven data Nov 10, 2016
analysis4.html added links Nov 15, 2016
background.png first commit Nov 9, 2016
election-2016-r.Rproj first commit Nov 9, 2016
index.html first commit Nov 9, 2016
pres_map_generator.R first commit Nov 9, 2016
trend_masthead.png first commit Nov 9, 2016


Presidential Elections in Connecticut 2016

This repository contains data and methodlogy behind the following Trend CT stories:


  • 2016 CT post-election analysis - [HTML] [RMarkdown]
  • Analysis II (Correlations between votes and selected Census and DataHaven data points) - [HTML] [RMarkdown]
  • Analysis III (Correlations between votes and all DataHaven data points) - [HTML] [RMarkdown]
  • Analysis IV (Correlations between diff in 2016 and 2016 votes and selected Census and DataHaven data points) - [HTML] [RMarkdown]

The Data

  • 2012 and 2016 presidential election results by town from the Office of the Secretary of the State
  • 2012 voter turnout stats
  • DataHaven 2015 Wellness Survey data by town
  • Transformed data indicating which towns switched parties by supporting Clinton or Trump
  • List of polling places in Connecticut
  • 2016 registered voters by town
  • town population density by town from the Census
  • 2016 voter turnout calculations by town
  • Classification list of towns by urban, rural, or mixed
  • Total presidential votes back to 2000

What's in this repo

  • data folder - Folder with raw election results and participation rates and transformed data
  • maps folder - Folder of shapefiles to generate maps
  • output folder - Charts and maps generated on election night to be used on social media or the live blog
  • pres_map_generator.R - Pulls data from the SotS and creates a town by town map and chart graphic
  • turnout_estimate.R - Calculates turnout by town based on SotS online results
  • usa_map.R - Pulls data from a Google Spreadsheet and generates a U.S. electoral votes results map


We believe in open data. Our scripts may be too technical for the average reader, but we make it accessible because we believe it is important to be as transparent as possible about our methodology so our work can be checked or expanded upon. Read more.

Check out the reproducible scripts and data behind many of our other stories in our central repo

Follow us out on Twitter @TrendCT and on Facebook/TrendCT.


If you use our data or methodology, please give us a shout out in your story. It'd also be nice if you gave me a heads up: @abtran or

This walkthrough explains the methodology behind adjusting income in the Trend CT story Would your job make you better or worse off in another state?