-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #176 from chitrams/update-prem-174
Update Prem's Germany contact matrices 174
- Loading branch information
Showing
21 changed files
with
23 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,34 @@ | ||
# Loads in the Prem matrices for Germany, taken from the 2015 paper. | ||
# Loads in the Prem matrices for Germany, taken from the 2021 paper. | ||
|
||
prem_home <- readxl::read_xlsx("data-raw/prem/MUestimates_home_1.xlsx", sheet = "Germany") %>% | ||
as.matrix() %>% | ||
load("data-raw/prem/contact_home.rdata") | ||
load("data-raw/prem/contact_work.rdata") | ||
load("data-raw/prem/contact_school.rdata") | ||
load("data-raw/prem/contact_others.rdata") | ||
load("data-raw/prem/contact_all.rdata") | ||
|
||
# ISO3 code for Germany is DEU | ||
|
||
prem_home <- contact_home[["DEU"]] %>% | ||
t() | ||
|
||
prem_work <- contact_work[["DEU"]] %>% | ||
t() | ||
|
||
prem_school <- readxl::read_xlsx("data-raw/prem/MUestimates_school_1.xlsx", sheet = "Germany") %>% | ||
as.matrix() %>% | ||
prem_school <- contact_school[["DEU"]] %>% | ||
t() | ||
|
||
prem_work <- readxl::read_xlsx("data-raw/prem/MUestimates_work_1.xlsx", sheet = "Germany") %>% | ||
as.matrix() %>% | ||
prem_other <- contact_others[["DEU"]] %>% | ||
t() | ||
|
||
prem_other <- readxl::read_xlsx("data-raw/prem/MUestimates_other_locations_1.xlsx", sheet = "Germany") %>% | ||
as.matrix() %>% | ||
prem_all <- contact_all[["DEU"]] %>% | ||
t() | ||
|
||
prem_germany_contact_matrices <- list( | ||
"home" = prem_home, | ||
"work" = prem_work, | ||
"school" = prem_school, | ||
"other" = prem_other, | ||
"all" = prem_home + prem_work + prem_school + prem_other | ||
"all" = prem_all | ||
) | ||
|
||
usethis::use_data(prem_germany_contact_matrices, overwrite = TRUE) |