Data scraping

house_reps

The data house_reps is a minimally processed version of that on the Chief Clerk's webpage.

To re-generate house_reps, run the scripts in order:

  1. 01-scrape.Rmd
  2. 02-parse.Rmd
  3. 03-clean.Rmd
  4. 04-patch.Rmd

house_reps_regular

house_reps_regular is a more processed data set that:

The code to generate house_reps_regular is in 05-regular.Rmd.

Patches

To see the changes made by patches:

library(daff)
library(tidyverse)
library(here)
clean_csv <- here("data-raw", "chronology-clean.csv")
patched_csv <- here("data-raw", "chronology-patched.csv")

# use same spec to read
spec <- spec_csv(clean_csv)

clean <- read_csv(clean_csv, col_types = spec)
patched <- read_csv(patched_csv, col_types = spec)

diffs <- diff_data(clean, patched, ordered = FALSE)
diff_html <- render_diff(diffs, view = FALSE, fragment = TRUE,
  summary = TRUE)
writeLines(diff_html)

In interactive use, use this for full color view:

render_diff(diffs)


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