federal_scraperR Documentation

Scraper class for general federal COVID data

Description

Federal data comes from an api that reports information for official federal prisons, private facilities contracted out by federal government, and rrc facilities i.e. recovery rehabilitation centers. RRC data does not have detailed facility data only a city location. Not mentioned here is the location data that is available for all facilities including information on the kind of facility like max or min security and sex of residents. At present we know that residents.confirmed is consistently lower than residents.recovered this is because federal only reports confirmed for the current inmate population.

id

The facility id

staffPositiveAmt

staff active cases

staffRecoveries

staff recoveries

staffDeathAmt

staff deaths

inmatePositiveAmt

Residents active cases

inmateDeathAmt

residents deaths

inmateRecoveries

cumulative residents recovered

inmateCompletedTest

Tests adminstered, I think not individuals tested

inmatePendTest

Current Pending Cases

inmatePosTest

Cumulative Positive Cases

Details

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

Super class

R_GlobalEnv::generic_scraper -> federal_scraper

Methods

Public methods

Inherited methods

Method new()

Usage
federal_scraper$new(
  log,
  url = "https://www.bop.gov/coronavirus/",
  id = "federal",
  type = "json",
  state = "federal",
  jurisdiction = "federal",
  pull_func = federal_pull,
  restruct_func = federal_restruct,
  extract_func = federal_extract
)

Method clone()

The objects of this class are cloneable with this method.

Usage
federal_scraper$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.