# NOT RUN {
if(FALSE){
# To obtain the entire dataset, run the following code:
library(readr)
library(dplyr)
library(janitor)
house_district_forecast <-
"https://projects.fivethirtyeight.com/congress-model-2018/house_district_forecast.csv" %>%
read_csv() %>%
clean_names() %>%
mutate(
state = as.factor(state),
district = as.factor(district),
party = as.factor(party),
model = as.factor(model)
) %>%
select(-special)
}
# }
Run the code above in your browser using DataLab