plot2: Make a plot of positives, active and recovered versus time

Description Usage Arguments Examples

View source: R/plot2.R

Description

Makes a plot of positives, active and recovered versus time. New cases per day is added as a line. If decorate, then mitigations will be shown (if available). Plot is shown for a specific region (state, country, province, etc). Use regions() to see what locations are available. See ?getdatajhu, ?getdataitaly, ?getdatastates to see the data sources.

Usage

1
plot2(x, region = NULL, decorate = FALSE)

Arguments

region

Name of a region in the region (location) column of the dataset (dataset$region). If it is not passed in, all regions will be shown. Might be country, state, or province. Use regions() to see what is available. You can pass in multiple regions.

decorate

Mitigation times are shown if available in the mitigations data.

data

Name of a data set. states, world or italy. You can pass in merged or subsetted versions of these too.

Examples

1
2
plot2(italy, region="Lombardia", decorate=FALSE)
plot2(states, region=c("NY","WA"))

eeholmes/CoV19 documentation built on Oct. 19, 2021, 10:59 a.m.