tots.per.location {covid19.analytics}R Documentation

function to compute totals per location

Description

function to compute totals per location

Usage

tots.per.location(
  data,
  geo.loc = NULL,
  confBnd = FALSE,
  nbr.plts = 1,
  info = ""
)

Arguments

data

data.frame with *time series* data from covid19

geo.loc

list of locations

confBnd

flag to activate/deactivate drawing of confidence bands base on a moving average window

nbr.plts

parameter to control the number of plots to display per figure

info

additional info to display in plots' titles

Value

a list or dataframe with totals per specified locations and type of case

Examples


# read data for confirmed cases
data <- covid19.data("ts-confirmed")
# compute totals per location for all the countries

tots.per.location(data)

# compute totals per location for 'Italy'
tots.per.location(data,geo.loc="Italy")
# compute totals per location for 'Italy' and 'Germany'
tots.per.location(data,geo.loc=c("Italy","Germany"))


[Package covid19.analytics version 2.1.3.3 Index]