Patch House of Representatives chronology

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

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)

1965 Roberts, Betty R.

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)

Jones, Benjamin F.

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"

Grant, A. S.

filter(reps, is.na(gender))
filter(reps, legislator == "Grant, A. S.")

Assume male from later session:

reps[reps$legislator == "Grant, A. S.", "gender"] <- "Male"

Output

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)


or-house-vis/history documentation built on May 15, 2019, 1:11 p.m.