csse_data: CSSE data storage and handling class An R6 class allowing to...

Description Format Value Methods

Description

CSSE data storage and handling class An R6 class allowing to store, manipulate and retrieve CSSE data in a systematized way

CSSE data storage and handling class An R6 class allowing to store, manipulate and retrieve CSSE data in a systematized way

Format

An R6Class generator object for CSSE data

Value

Object of R6Class with methods for manipulate CSSE data

Methods

Public methods


Method new()

Usage
csse_data$new(case_type, iso3c_country_code, case_date, case_value)
Arguments
case_type

a character string. Possible values : "confirmed", "deaths", "recovered"

iso3c_country_code

a vector of iso3c codes

case_date

a vector of dates

case_value

a table with values by iso3c code (rows) and dates (cols) data retrieval function


Method get_data()

Usage
csse_data$get_data(
  iso3c_country_code = NA,
  start_date = NA,
  end_date = NA,
  data_type = "cumulative",
  by_p100000_incidence = FALSE,
  add_suppl_info = FALSE
)
Arguments
iso3c_country_code

a vector of iso3c codes

start_date

start date of data

end_date

end date of data

data_type

data type : "cumulative" or "daily"

by_p100000_incidence

a logical value

add_suppl_info

a logical value: indicates whether the results are reported in frequency or incidence Function for calculating the doubling time of cases (at a given date)


Method doubling_time()

Usage
csse_data$doubling_time(iso3c_country_code = NA, n_days = 7, min_cases = 100)
Arguments
iso3c_country_code

a vector of iso3c codes

n_days

the number of days used to calculate the growth rate

min_cases

minimum number of cases to calculate the doubling time Sum or moving average function


Method rolling_data()

Usage
csse_data$rolling_data(
  iso3c_country_code = NA,
  n_days = 7,
  rolling_function = "mean",
  by_p100000_incidence = FALSE
)
Arguments
iso3c_country_code

a vector of iso3c codes

n_days

size of the sliding window in days

rolling_function

a character string indicating whether the average or the sum is to be calculated

by_p100000_incidence

a logical value Extract de main epidemiological indicators


Method main_indicators()

Usage
csse_data$main_indicators(iso3c_country_code = NA, as_of = NA)
Arguments
iso3c_country_code

a vector of iso3c codes

as_of

a cut-off date

Returns

a table with the main epidemiological indicators


Method clone()

The objects of this class are cloneable with this method.

Usage
csse_data$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


supertux83/rccs documentation built on Aug. 1, 2020, 11:53 p.m.