knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.width=6, fig.height=4
)

Introduction to CovidTrackerR

CovidTrackerR is a R package for basic data cleaning, wrangling and plotting of Covid tracking data in Canada. The package will allow you to pull data from the opencovid.ca API, visualize Covid related trends as a timeseries or a map, and calculate summary statistics of the Covid data.

Installation

To use this package, follow the installation guide on README and install this package. Then, import the package.

library(CovidTrackerR)

Functions

Retrieve data using get_covid_data:

covid_data_spec <- get_covid_data('active', 'BC', '13-01-2021')
covid_data_spec
covid_data <- get_covid_data()
head(covid_data)

Geographical visualization with plot_geographical:

covid_df <- CovidTrackerR::get_covid_data()
plot_geographical(covid_df, cases)

Time series visualization with plot_timeseries:

df <- get_covid_data()
plot_timeseries(df,cases)

Calculate statistical summaries with calculate_stat_summary:

covid_df <- get_covid_data()
calculate_stat_summary(covid_df,'cases')


UBC-MDS/Group28-CovidTracker-R documentation built on Feb. 6, 2022, 7 a.m.