Created
January 28, 2025 17:02
-
-
Save USMortality/723d6ec0c133c78b919208d65471634f to your computer and use it in GitHub Desktop.
Data: Deutschland ARE/ILI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(readr) | |
library(dplyr) | |
library(tidyr) | |
df <- read_tsv( | |
paste0( | |
"https://raw.githubusercontent.com/robert-koch-institut/", | |
"GrippeWeb_Daten_des_Wochenberichts/main/", | |
"GrippeWeb_Daten_des_Wochenberichts.tsv" | |
) | |
) |> | |
filter( | |
Erkrankung %in% c("ARE", "ILI"), | |
Altersgruppe == "00+", | |
Region == "Bundesweit" | |
) |> | |
mutate( | |
Saison = Saison, | |
Jahr = as.integer(substr(Kalenderwoche, 1, 4)), | |
Woche = as.integer(substr(Kalenderwoche, 7, 8)), | |
Typ = Erkrankung, | |
Inzidenz = as.integer(Inzidenz) | |
) |> | |
select(Jahr, Woche, Saison, Typ, Inzidenz) |> | |
pivot_wider(names_from = Typ, values_from = Inzidenz) | |
write.csv(df, "deutschland_are_ili.csv", row.names = FALSE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment