knitr::opts_chunk$set( collapse = TRUE, comment = "#>", warning = FALSE, message = FALSE )
library(canadacovidmetricsR)
This package is designed to provide key metrics regarding COVID-19 situation in Canada at province level using the data from OpenCovid API.
The canadacovidmetricsR
package helps obtain national or provincial level information on covid cases for a specific time period. There are 4 functions which will return key metrics, including total cumulative cases,
total cumulative deaths, total cumulative recovered cases and total
cumulative vaccine completion. This data is returned as an R Dataframe which can be used directly for further analysis, plotting or applying statistical models.
get_cases
Query total cumulative cases with ability to specify
province and date range of returned data.
Example usage:
```r library(canadacovidmetricsR)
get_cases(loc = "BC", date = "2021-03-31") ```
get_deaths
Query total cumulative deaths with ability to specify
province and date range of returned data.
Example usage:
```r
get_deaths(loc = "BC", date = "2021-03-31") ```
get_recoveries
Query total cumulative recovered cases with ability
to specify province and date range of returned data.
Example usage:
```r
get_recoveries(loc = "BC", date = "2021-03-31") ```
get_vaccinations
Query total cumulative vaccine completion with
ability to specify province and date range of returned data.
Example usage:
```r
get_vaccinations(loc = "BC", date = "2021-03-31") ```
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.