Skip to content

Instantly share code, notes, and snippets.

View heidekrueger's full-sized avatar

Stefan Heidekrüger heidekrueger

View GitHub Profile
@heidekrueger
heidekrueger / script.R
Last active November 6, 2020 11:32
R Code to generate plot for uncalled races (as of 4pm EST on Thursday)
# Based on snippet by @charlie7whiskey https://gist.github.com/cgrilson7/86737d3b07c2a0806f8aaeaaedf2fd7c
# Via unofficial NYT api at https://github.com/alex/nyt-2020-election-scraper
#updated 11/6 after api change
library(tidyverse)
library(rvest)
library(lubridate)
url <- "https://alex.github.io/nyt-2020-election-scraper/battleground-state-changes.html"
0x1bFf4fFC1817afB746A5526F1482A53bb5081a51