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:
01-scrape.Rmd
02-parse.Rmd
03-clean.Rmd
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
.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.