knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
CovidTrackerR provides basic data cleaning, wrangling and plotting of Covid tracking data in Canada.
The CovidTrackerR package is designed for the easy retrieval and analysis of data pertaining to Covid trends in Canada, including information about cases, vaccinations and testing. The package serves as a wrapper for the opencovid.ca API, and provides additional helper functions for visualising the data, either as a time series or in the form of a map.
get_covid_data()
Retrieve cleaned and formatted data of specified type and within (optionally) provided time ranges and locations
plot_time_series()
Function for plotting time series trends in Covid data, including options for trendlines and smoothing
calculate_stat_summary()
Function for returning key statistical information about Covid data, such as long run trends and comparisons between provinces<br>
plot_geographical()
Function for plotting choropleth maps with Covid data
You can install the development version of CovidTrackerR from GitHub with:
# install.packages("devtools") devtools::install_github("UBC-MDS/Group28-CovidTracker-R")
A vignette with full usage demonstration and function documentation can be found here https://ubc-mds.github.io/Group28-CovidTracker-R/
CovidTrackerR
can be used to acquire covid data, generate choropleth maps and time series plots, and compute summary statistics as follows:
library(CovidTrackerR)
covid_data <- get_covid_data('active', 'BC') head(covid_data)
covid_df <- get_covid_data() plot_geographical(covid_df, cases)
plot_timeseries(covid_df,cases)
calculate_stat_summary(covid_df,'cases')
There are several R packges which have some overlapping functionality as our package, but none which perform all the data acquisition, analysis and graphing tasks which CovidTracker encompasses. The packages designed for covid data retrieval also do not use the same data source as CovidTracker and do not provide the same level of granularity. Some examples of related R packages useful for Covid data retrieval and data visualizations include:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.