data(COVID19Cases_geoRegion)
# Get Swiss COVID19 cases at NUTS 3 level
data(Oesterreich_Faelle)
# Get Austrian COVID19 cases at NUTS 3 level
# (first wave, same final date as in Swiss data: 2020-05-31)
COVID19Cases_geoRegion <-
COVID19Cases_geoRegion[!COVID19Cases_geoRegion$geoRegion %in% c("CH", "CHFL"),]
# Exclude CH = Switzerland total and CHFL = Switzerland and Liechtenstein total
COVID19Cases_geoRegion <-
COVID19Cases_geoRegion[COVID19Cases_geoRegion$datum <= "2020-05-31",]
# Extract first COVID-19 wave
CH_covidwave1 <-
swash (
data = COVID19Cases_geoRegion,
col_cases = "entries",
col_date = "datum",
col_region = "geoRegion"
)
# Swash-Backwash Model for Swiss COVID19 cases
# Spatial aggregate: NUTS 3 (cantons)
AT_covidwave1 <-
swash (
data = Oesterreich_Faelle,
col_cases = "Faelle",
col_date = "Datum",
col_region = "NUTS3"
)
# Swash-Backwash Model for Austrian COVID19 cases
# Spatial aggregate: NUTS 3
AT_vs_CH <-
compare_countries(
CH_covidwave1,
AT_covidwave1,
country_names = c("Switzerland", "Austria"))
# Country comparison Switzerland vs. Austria
# default config: 100 iterations, alpha = 0.05, sample ratio = 80%,
# indicator: R_0A
summary(AT_vs_CH)
# Summary of country comparison
plot(AT_vs_CH)
# Plot of country comparison
Run the code above in your browser using DataLab