generated from Covid19R/covid19_package_template
/
refresh_CanadaC19.R
33 lines (30 loc) · 1.33 KB
/
refresh_CanadaC19.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#' Refresh the Canadian COVID-19 Data.
#'
#' @description Updates the Canadian COVID-19 cases.
#'
#' @details This package scrapes Canadian reported cases from a repository that collects publically available data on cases across Canada.
#'
#' @param verbose Should messages be displayed?
#'
#' @source \href{https://github.com/ishaberry/Covid19Canada}{Covid19Canada}
#' @source \href{https://github.com/Covid19R/documentation}{covid19R documentation}
#'
#' @return A tibble object
#' * date - The date in YYYY-MM-DD form
#' * location - The name of the location as provided by the data source. XXXXX
#' * location_type - The type of location using the covid19R controlled vocabulary. SAY MORE ABOUT THIS
#' * location_code - A standardized location code using a national or international standard. ADD MORE
#' * location_code_type The type of standardized location code being used according to the covid19R controlled vocabulary. Here we use `XXXX`
#' * data_type - the type of data in that given row using the covid19R controlled vocabulary. Includes WHAT DATA TYPES ARE HERE?
#' * value - number of cases of each data type
#' @export
#'
#' @examples
#' \dontrun{
#' refresh_CanadaC19_cases()
#' }
refresh_CanadaC19_cases <- function(verbose = TRUE) {
if (verbose) message(glue::glue("Downloading raw data from {url}."))
read_data() %>%
clean_data()
}