cumulative_events_ejhu: constructor for covid_events

Description Usage Arguments Examples

View source: R/ejhu_appsupp.R

Description

constructor for covid_events

Usage

1
2
3
4
5
6
cumulative_events_ejhu(
  src,
  eventtype = "confirmed",
  alpha3 = "USA",
  ProvinceStateName = NULL
)

Arguments

src

as retrieved with enhanced_jhu_data

eventtype

character(1) 'confirmed' or 'deaths'

alpha3

character(1) code for country

ProvinceStateName

character(1) for province, default to NULL; use NA for multiregion like GBR

Examples

1
2
3
4
5
dat = enriched_jhu_data()
cchn = cumulative_events_ejhu(dat, alpha3="CHN", ProvinceStateName="Hubei")
ichn = form_incident_events(cchn)
plot(cchn$count[-1], ichn$count, log="xy", xlab="cumulative", ylab="new", 
 main="Hubei province") # like https://youtu.be/54XLXg4fYsc

vjcitn/sars2app documentation built on Jan. 3, 2022, 12:19 a.m.