Input data-raw/chronology-clean.csv
Output data-raw/chronology-patched.csv
and housereps.rda
library(tidyverse) library(here)
reps <- read_csv(here("data-raw", "chronology-clean.csv"), col_types = cols(desk_number = col_integer()) )
Rijken, Max missing in 1975 but listed in Chronological List of Oregon's Legislatures by Cecil L. Edwards, Senate Historian, published by the Legislative Administration Committee, 1993.
max_rijken <- data_frame(legislator = "Rijken, Max", district = 38, party = "Democrat", residence = "Newport, Benton, Lane, Lincoln", gender = "Male", session_name = "1975 Session", session_year = 1975, regular = TRUE ) reps <- reps %>% bind_rows(max_rijken)
betty_roberts <- data_frame(legislator = "Roberts, Betty R.", district = 6, party = "Democrat", residence = "Portland, Multnomah", gender = "Female", session_name = "1965 Session", session_year = 1965, regular = TRUE) reps <- reps %>% bind_rows(betty_roberts)
1909 Jones, Benjamin F. Independence, Polk 12 F? This seems to be an error
Should be Republican according to Chronological List of Oregon's Legislatures by Cecil L. Edwards, Senate Historian, published by the Legislative Administration Committee, 1993.
# Fix one party affilation reps[reps$legislator == "Jones, Benjamin F.", "party"] <- "Republican"
filter(reps, is.na(gender))
filter(reps, legislator == "Grant, A. S.")
Assume male from later session:
reps[reps$legislator == "Grant, A. S.", "gender"] <- "Male"
reps <- reps %>% arrange(session_year, regular, session_name, district) %>% select(session_name, legislator, district, everything())
write_csv(reps, here("data-raw", "chronology-patched.csv"))
retrieved <- here("data-raw", "chronology-page.html") %>% read_lines(n_max = 1) %>% str_replace("<!-- Retrieved ", "") %>% lubridate::ymd_hms() attr(reps, "retrieved") <- retrieved house_reps <- reps usethis::use_data(house_reps, overwrite = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.