plot.pandemicData: Plot pandemic data

View source: R/plot.PandemicData.R

plot.pandemicDataR Documentation

Plot pandemic data

Description

S3 method that plots the predicted data into an interactive graphic.

Usage

## S3 method for class 'pandemicData'
plot(x, y, cases = "new", color = TRUE, ...)

Arguments

x

Output of function load_covid.

y

This parameter does nothing

cases

A string which indicates whether new cases, cumulative cases or both plots should be generated. The argument must be a string being either 'new', 'cumulative' or 'both'.

color

A string which indicates whether the plot should be colorful or in gray scales. The argument must be a string being either TRUE or FALSE.

...

Currently unused.

Value

A list containing two objects, new and cumulative "new" shows the plot for the new cases/deaths and "cumulative" shows the plot for the cumulative cases/deaths. If any of them did not get plotted due to lack of prediction or due to the cases argument, its value will return NULL.

By default, only the plot with new cases is generated. This is changed with the cases argument.

new

The plotted new cases/deaths. The plots are for daily new confirmed cases and daily new deaths.

cumulative

The plotted cumulative cases/deaths. The plots are for daily cumulative cases or daily cumulative deaths.

References

CovidLP Team, 2020. CovidLP: Short and Long-term Prediction for COVID-19. Departamento de Estatistica. UFMG, Brazil. URL: http://est.ufmg.br/covidlp/home/en/

See Also

load_covid.

Examples

## Not run: 
dataMG = load_covid(country_name="Brazil",state_name = "MG",last_date="2020-10-01")
plot(dataMG)
dataJapan = load_covid(country_name="Japan",last_date="2020-10-01")
plot(dataJapan)

## End(Not run)

PandemicLP documentation built on March 18, 2022, 6:22 p.m.