Load data

by_age <- read.csv(file.path(getwd(), "../inst/extdata/Ontario_COVID_Data.csv"))
fig_config <- read.csv(file.path(getwd(), "../inst/extdata/ontario_fig_config.csv"))

# filter on first 9 rows == 80+ years

Select figure from configuration file.

Configuration file tells what data needed for the plot.


# get configurations (title, labels, etc.)
plot_config <- fig_config

# plot data
plot_data <- get_plot_data(by_age, plot_config)
infect_plot(plot_data)
#> Warning: `arrange_()` is deprecated as of dplyr 0.7.0.
#> Please use `arrange()` instead.
#> See vignette('programming') for more help
#> This warning is displayed once every 8 hours.
#> Call `lifecycle::last_warnings()` to see where this warning was generated.