View source: R/vaccine-age-groups.R
get_vaccine_age_groups | R Documentation |
Runs a GET request of vaccination data by age groups from the COVID-19
tracker API, and returns parsed data.
Via the split
argument, data may be "overall" (all provinces/territories
combined), or by "province".
Alternatively, provide one or more two-letter codes (e.g. "AB") to province
to return reports for specific provinces.
get_vaccine_age_groups( split = c("overall", "province"), province = NULL, group = NULL, before = NULL, after = NULL )
split |
One of "overall", or "province" to specify how the data is split. An "overall" report gives cumulative numbers across Canada. Splitting by "province" returns all reports for all provinces/territories. |
province |
One or more province/territory codes ("AB", "BC", "MB", "NB", "NL", "NS", "NT", "NU", "ON", "PE", "QC", "SK", "YT") to get reports. Upper, lower and mixed case strings are accepted. |
group |
A specific age group to return, for example: "0-4", "05-11", "30-39", "80+", "not_reported" |
before |
Returns reports from only on or before the specified date, in YYYY-MM-DD format. |
after |
Returns reports from only on or after the specified date, in YYYY-MM-DD format. |
A data frame with, one row per age group per date. Includes
a province
variable if data is split by province.
get_vaccine_age_groups() get_vaccine_age_groups(split = "province") get_vaccine_age_groups(province = c("AB", "SK")) get_vaccine_age_groups(province = "NS", group = "18-29") get_vaccine_age_groups(group = "80+", after = "2021-12-01")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.