odcr_scrape_all <- function(courts, casetypes, years, reverse = FALSE) {
for (court_tmp in courts) {
for (casetype_tmp in casetypes) {
for (year_tmp in years) {
lastcase <- oscn_lastcase(court_tmp, casetype_tmp, year_tmp)
message(paste("Scraping", lastcase, casetype_tmp, "cases filed in", court_tmp, "in", year_tmp))
if (reverse == FALSE) {
odcr_scrape(court_tmp, casetype_tmp, year_tmp, 1:lastcase, update_freq = 20)
} else {
odcr_scrape(court_tmp, casetype_tmp, year_tmp, lastcase:1, update_freq = 20)
}
}
}
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.