colorado_scraperR Documentation

Scraper class for general Colorado COVID data

Description

Colorado data is pulled from a tableau app which is known to be temperamental. Sometimes code will need to be run several times in order to work as the page has variable load times and selenium can not tell when the DOM is ready. Data is downloaded through selenium in a pdf form from which OCR is run. Colorado staff numbers in the early stages puzzling but pretty clear now that positive means the total, while active is the active total, so you can take the positive active to get recoveries. It is less clear what is happening in the early days, where recoveries are dropping, but mathematically this makes the most sense since otherwise the cumulative staff positives would be highest in early May.

Facility_Name

The facility name.

Tests

Total tests administered.

Positives

Residents with psoitive tests, not neccesarily by DOC.

Active

Inidviduals with active cases.

Deaths

Symptoms or positive test, not coroners office.

Offenders Tested

Number of residents tested.

Details

The last run of the scraper was on 2021-01-11 and contained the extracted columns: Residents.Tadmin, Residents.Confirmed, Residents.Active, Residents.Deaths, Name, Residents.Recovered, State, Date, id, source, jurisdiction. We are missing the following core variables for the analysis: Staff.Confirmed, Staff.Deaths, Staff.Recovered, Staff.Tested, Residents.Tested, Staff.Negative, Residents.Negative, Staff.Pending, Residents.Pending, Staff.Quarantine, Residents.Quarantine, Residents.Population

Super class

R_GlobalEnv::generic_scraper -> colorado_scraper

Methods

Public methods

Inherited methods

Method new()

Usage
colorado_scraper$new(
  log,
  url = "https://www.colorado.gov/pacific/cdoc/covid-19-faq-and-updates",
  id = "colorado",
  type = "pdf",
  state = "CO",
  jurisdiction = "state",
  pull_func = colorado_pull,
  restruct_func = colorado_restruct,
  extract_func = colorado_extract
)

Method clone()

The objects of this class are cloneable with this method.

Usage
colorado_scraper$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.