rkiToBabsimData: rkiToBabsimData

View source: R/rkiToBabsimData.R

rkiToBabsimDataR 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)

babsim.hospital documentation built on May 30, 2022, 9:05 a.m.