oscn_scrape: Scrape case data from Oklahoma State Courts Network

Description Usage Arguments Value See Also Examples

View source: R/oscn_scrape.R

Description

Scrapes data stored in HTML tables on OSCN.net, returns several dataframes, and (optionally) updates the OJO database with newly scraped data.

Usage

1
2
3
4
5
6
7
8
oscn_scrape(
  courts,
  casetypes,
  years,
  case_seqs,
  updatedb = TRUE,
  update_freq = 20
)

Arguments

courts

A character vector of the courts to scrape, for example, "TULSA" or c("TULSA", "ROGERS")

casetypes

A character vector of the case types to scrape, for example, "CF" or c("CF", "CM")

years

A numeric vector of years to scrape, for example, 2016 or 2015:2017

case_seqs

Sequential case numbers to scrape (i.e., the "45" in "CF-2015-45"), for example, 1 or 1:7000

updatedb

Logical, whether to upload data to the OJO database

update_freq

Integer, how many cases to scrape before updating the database and clearing local data.

Value

Several tables with data from scraped cases, depending on the type of case and availability of data

See Also

oscn_scrape_all(), oscn_scrape_remaining()

Examples

1
2
3
4
5
## Not run: 
oscn_scrape("TULSA", "CF", 2020, 1)
oscn_scrape(oscn_counties, c("CF", "CM"), 2008:2015, 1:1000, updatedb = TRUE, update_freq = 100)

## End(Not run)

openjusticeok/ojo documentation built on Feb. 2, 2021, 5:47 a.m.