knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

canadacovidmetricsR

R-CMD-check codecov

canadacovidmetricsR provides key metrics regarding COVID-19 situation in Canada across provinces using the OpenCovid API.

Summary

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.

Functions

There are 4 functions in this package:

Installation

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("UBC-MDS/canadacovidmetricsR")

Usage and Example

Obtain the total number of cases till date using get_cases():

library(canadacovidmetricsR)
get_cases(loc = "BC", date = "2021-03-31")

Obtain the total number of deaths till date using get_deaths():

get_deaths(loc = "BC", date = "2021-03-31")

Obtain the total number of recoveries till date using get_recoveries():

get_recoveries(loc = "BC", date = "2021-03-31")

Obtain the total vaccinations using the get_vaccinations():

get_vaccinations(loc = "BC", date = "2021-03-31")

R ecosystem

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.

Contributors

We welcome and recognize all contributions. Please find the guide for contribution in Contributing Document.

License

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.



UBC-MDS/canadacovidmetricsR documentation built on Feb. 6, 2022, 7 a.m.