# NOT RUN {
# First example shows how to process the GA data
GABeds <- getRealBeds(
data = babsim.hospital::dataCovidBeds20200624,
resource = c("bed", "intensiveBed", "intensiveBedVentilation")
)
# Second example shows how to process the DIVI ICU data.
icu <- babsim.hospital::icudata
icuCov <- as.data.frame(xtabs(faelle_covid_aktuell ~ daten_stand, icu))
icuCov$daten_stand <- as.Date(icuCov$daten_stand)
icuCovBeatm <- as.data.frame(xtabs(faelle_covid_aktuell_beatmet ~ daten_stand, icu))
icuCovBeatm$daten_stand <- as.Date(icuCovBeatm$daten_stand)
Day <- as.Date(icuCovBeatm$daten_stand)
dataICUBeds20200821 <- data.frame(
bed = (icuCov$Freq - icuCovBeatm$Freq),
intensiveBedVentilation = icuCovBeatm$Freq,
Day = as.Date(icuCovBeatm$daten_stand)
)
ICUBeds <- getRealBeds(
data = dataICUBeds20200821,
resource = c("bed", "intensiveBedVentilation")
)
# }
Run the code above in your browser using DataLab