Downloads detailed COVID-19 case data from default BCCDC webpage URL (passed in as string) as a .csv file to default relative path directory (also passed in as string).
get_data(
url = paste0("http://www.bccdc.ca/Health-Info-Site/",
"Documents/BCCDC_COVID19_Dashboard_Case_Details.csv"),
out_folder = "data"
)
string A webpage from which .csv file is downloaded to relative data folder directory, provided wit ha default value.
string A relative path directory comprising two folder separated by a forward slash ("/"), provided with a default value.
A data.frame containing downloaded detailed case data.
get_data()
#> # A tibble: 330,638 x 5
#> Reported_Date HA Sex Age_Group Classification_Reported
#> <date> <chr> <chr> <chr> <chr>
#> 1 2020-01-29 Out of Canada M 40-49 Lab-diagnosed
#> 2 2020-02-06 Vancouver Coastal F 50-59 Lab-diagnosed
#> 3 2020-02-10 Out of Canada F 20-29 Lab-diagnosed
#> 4 2020-02-10 Out of Canada M 30-39 Lab-diagnosed
#> 5 2020-02-18 Interior F 30-39 Lab-diagnosed
#> 6 2020-02-24 Fraser M 40-49 Lab-diagnosed
#> 7 2020-02-24 Fraser F 30-39 Lab-diagnosed
#> 8 2020-03-03 Fraser M 50-59 Lab-diagnosed
#> 9 2020-03-03 Vancouver Coastal F 60-69 Lab-diagnosed
#> 10 2020-03-03 Vancouver Coastal F 30-39 Lab-diagnosed
#> # ... with 330,628 more rows
get_data(
url = paste0("http://www.bccdc.ca/Health-Info-Site/",
"Documents/BCCDC_COVID19_Dashboard_Case_Details.csv"),
out = "data")
#> # A tibble: 330,638 x 5
#> Reported_Date HA Sex Age_Group Classification_Reported
#> <date> <chr> <chr> <chr> <chr>
#> 1 2020-01-29 Out of Canada M 40-49 Lab-diagnosed
#> 2 2020-02-06 Vancouver Coastal F 50-59 Lab-diagnosed
#> 3 2020-02-10 Out of Canada F 20-29 Lab-diagnosed
#> 4 2020-02-10 Out of Canada M 30-39 Lab-diagnosed
#> 5 2020-02-18 Interior F 30-39 Lab-diagnosed
#> 6 2020-02-24 Fraser M 40-49 Lab-diagnosed
#> 7 2020-02-24 Fraser F 30-39 Lab-diagnosed
#> 8 2020-03-03 Fraser M 50-59 Lab-diagnosed
#> 9 2020-03-03 Vancouver Coastal F 60-69 Lab-diagnosed
#> 10 2020-03-03 Vancouver Coastal F 30-39 Lab-diagnosed
#> # ... with 330,628 more rows