On Reverse Coattails in the 2017 Virginia Election

Here, I present some data on the question of a possible reverse coattail effect in the 2017 Virginia elections. I devise counterfactual predictions of Northam performance based on HoD district demographics, electoral history, and a combined model including both demographic and political fundamentals. I find reason to express some skepticism of reverse coattails: Northam slightly overperformed in districts that had a challenger in 2017 but not in 2013, but overperformed to a higher degree in districts with no Dem Delegate on the ballot. This is in general agreement with other work suggesting red suburbs turned against Gillespie, but did so without the aid of a stellar HoD candidate.

»
Author's profile picture John Ray

Getting started with Excel

In this tutorial, we will walk through the following common uses of Microsoft Excel:

»
Author's profile picture John Ray

Test election tracker

On this page, I am tracking election results for the State House, State Senate/State Assembly, Governor, and Congressional races going on today.

»
Author's profile picture John Ray

My intro to ggplot in R slides

Using the fun and new-ish .Rpres presentation tools from RStudio, I delivered a brief presentation on using ggplot2 in my department last week. The presentation is available here.

»
Author's profile picture John Ray

Structured querying of web resources with SelectorGadget and rvest

In this post, I will provide a brief tutorial on the most common form of what is commonly known as “web scraping.” This form of web scraping involves the following operations:

»
Author's profile picture John Ray

Preparing and Plotting Spatial Polygons and Points in R

In this post we’re going to learn how to download, process, and plot some spatial data. We’ll learn some basic elements of geospatial data design and visualization.

»
Author's profile picture John Ray

A function for reading fixed-width survey data into R

In this post I introduce a function that will take survey data associated with a codebook and render that data as a dataframe in R. This function fills a need for the surprisingly large volume of data originally devised in an earlier format like .dta, .spss, .sav, and .por that is not usable by many of the common read() functions in R due to not having any metadata directly associated with the fixed-width data itself.

»
Author's profile picture John Ray