rkiToBabsimData {babsim.hospital}R Documentation

rkiToBabsimData

Description

Transforms the freshly downloaded rki data into the babsim data frame. Also imputes mising dates as zero frequency in the data.

Usage

rkiToBabsimData(rki = babsim.hospital::rkidata)

Arguments

rki

data.frame of downloaded rki data before preprocessing

Value

a data.frame of aggregated data

Day

Date, format: '2020-01-01' '2020-01-02' '2020-01-03' '2020-01-04' ...

Infected

Infiziert: num 1 0 0 0 0 0 0 0 0 0 ...

Weiblich

Geschlecht weiblich: int 0 0 0 0 0 0 0 0 0 0 ...

Maennlich

Geschlecht maennlich: int 1 0 0 0 0 0 0 0 0 0 ...

GUnbekannt

Geschlecht unbekannt: int 0 0 0 0 0 0 0 0 0 0 ...

Examples


data <- rkiToBabsimData(rkidata[1:100, ])
plot(data$Day, data$Infected, type = "o")
#
max(data$Day) - min(data$Day)

[Package babsim.hospital version 11.8.4 Index]