View source: R/read_scrape_data.R
read_scrape_data | R Documentation |
Reads either time series or latest data from the web scraper runs.
read_scrape_data( all_dates = FALSE, date_cutoff = DATE_CUTOFF, window = 31, window_pop = 90, coalesce_func = sum_na_rm, drop_noncovid_obs = TRUE, debug = FALSE, state = NULL, wide_data = TRUE )
all_dates |
logical, get all data from all dates recorded by webscraper |
date_cutoff |
date, the earliest date of acceptable data to pull from if all_dates is FALSE for .Confirmed and .Deaths variables |
window |
integer, the day range of acceptable data to pull from if all_dates is FALSE for all variables EXCEPT .Confirmed and .Deaths |
window_pop |
int, how far to go back (in days) to look for values from a given facility to populate NAs in Residents.Population |
coalesce_func |
function, how to combine redundant rows |
drop_noncovid_obs |
logical, drop rows missing all COVID variables |
debug |
logical, print debug statements on number of rows maintained in |
state |
character vector, states to limit data to |
wide_data |
logical, return wide data as opposed to long |
dataframe with scraped data
## Not run: read_scrape_data(all_dates = FALSE) ## End(Not run) read_scrape_data(all_dates = TRUE, state = "Wyoming")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.