HOME | ABOUT | RESUME | GITHUB | CONTACT


CapStats

2018 Staten Island Election Results

January 21, 2019

All code can be found here

Staten Island

Staten Island is the most conservative of the 5 New York City boroughs. In 2016, 56% of Staten Islanders voted for Donald Trump (compared to just 37% for all of NYC). Trump received 82% of possible Staten Island votes during the 2016 Republican Primary. If Staten Island was it’s own city, it would be the 2nd largest conservative city in America.

In 2018, Dan Donovan (R) was seeking reelection for New York’s 11th Congressional District. The 11th district combines all of Staten Island with some parts of southern Brooklyn (mostly Bay Ridge). Staten Island voters represent 3/4 of all possible congressional votes. Max Rose, the Democratic challenger did not stand much of a chance. fivethirthyeight.com gave Rose a 1 out of 4 chance to win. On the night of the election, predictit.org was paying out 3.70$ for every 1$ bet on Rose to win.

Rose ran a smart campaign. He was able to overcome the fact that he is not a native Staten Islander. He appealed to conservative voters by brandishing his military service record.

Max Rose ended up winning the election with 53% of the vote. In Staten Island, Rose received about half of all possible votes. Rose’s victory may have been the biggest congressional upset in 2018.

Plotting Staten Island Election Districts

New York City election district information can be found here. The shape file is also saved on github. Plotting shape files can be intimidating. This tutorial can explain any steps below that are glossed over below.

The rgdal library will be used to read the shape file. The fortify function from ggplot2 creates a data frame using the spatial data.

One thing to note before jumping in, the maptools library is dependent upon gpclib. Permission to use gpclib must be turned on to use maptools. Use gpclibPermit() to turn on the permission. This stack overflow article explains this issue more thoroughly.

library(rgdal) #readOGR
library(maptools) 
library(ggplot2) #fortify
library(dplyr) #left_join

stat_island = readOGR("data", layer="geo_export", verbose=F)
stat_island@data$id = row.names(stat_island@data)
stat_island.points = fortify(stat_island, region="id") 
stat_island.df = left_join(stat_island.points, stat_island@data, by="id")

ggplot(stat_island.df) + aes(long, lat, group=group) + geom_polygon()