knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
canadacovidmetricsR provides key metrics regarding COVID-19 situation in Canada across provinces using the OpenCovid API.
This package allows users to obtain key metrics on COVID-19 situation in Canada at national or provincial level for a specific time period. The 4 functions will return key metrics, including total cumulative cases, total cumulative deaths, total cumulative recovered cases and total cumulative vaccine completion, using data from OpenCovid API. The users may use the key metrics to conduct further analyses on COVID-19 situation in Canada.
There are 4 functions in this package:
get_cases
Query total cumulative cases with ability to specify province and date range of returned data.
get_deaths
Query total cumulative deaths with ability to specify province and date range of returned data.
get_recoveries
Query total cumulative recovered cases with ability to specify province and date range of returned data.
get_vaccinations
Query total cumulative vaccine completion with ability to specify province and date range of returned data.
You can install the development version from GitHub with:
# install.packages("devtools") devtools::install_github("UBC-MDS/canadacovidmetricsR")
get_cases
Query total cumulative cases with ability to specify
province and date range of returned data.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.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.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.get_vaccinations(loc = "BC", date = "2021-03-31")
There are several packages for easy access to COVID-19 key metrics or data using different APIs, examples include
To our knowledge, there is no similar package using OpenCovid API in the R ecosystem.
We welcome and recognize all contributions. Please find the guide for contribution in Contributing Document.
canadacovidmetrics
was created by the Contributors. The dependant API from the COVID-19 Canada Open Data Working Group dataset project has adopted the Creative Commons Attribution 4.0 International license, which allows freedom of two primary contributions:
Sharing — copy and redistribute the material in any medium or format Adapting — remix, transform, and build upon the material for any purpose, even commercially.
As contributors to this community, our package has adopted the same creative commons license, in order to enable anyone to share or adapt the Canada Covid Metrics package in R or Python subject to the license.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.