diff --git a/R/data_prem_contact_matrices.R b/R/data_prem_contact_matrices.R index 61472ff..b01032e 100644 --- a/R/data_prem_contact_matrices.R +++ b/R/data_prem_contact_matrices.R @@ -1,7 +1,7 @@ #' Contact matrices as calculated by Prem. et al. #' -#' Contact matrices as calculated by Prem. et al. PLoS Computational Biology. -#' DOI: 10.1371/journal.pcbi.1005697 +#' Contact matrices as calculated by Prem. et al. (2021) PLoS Computational Biology. Updated to use the latest corrected matrices from their 2021 publication. +#' DOI: 10.1371/journal.pcbi.1009098 #' #' @format A list with 5 elements: #' \describe{ @@ -13,8 +13,11 @@ #' year age group} #' \item{other}{A 16x16 matrix containing the number of other contacts, by 5 #' year age group} +#' \item{all}{A 16x16 matrix containing the number of all contacts, by 5 +#' year age group} #' } #' All age groups are 5 year age bands, from 0 to 80. #' -#' @source \url{https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1005697} +#' @source \url{https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1009098} +#' @source \url{https://github.com/kieshaprem/synthetic-contact-matrices} "prem_germany_contact_matrices" diff --git a/data-raw/prem/MUestimates_home_1.xlsx b/data-raw/prem/MUestimates_home_1.xlsx deleted file mode 100644 index 9c31a3e..0000000 Binary files a/data-raw/prem/MUestimates_home_1.xlsx and /dev/null differ diff --git a/data-raw/prem/MUestimates_other_locations_1.xlsx b/data-raw/prem/MUestimates_other_locations_1.xlsx deleted file mode 100644 index d102ae1..0000000 Binary files a/data-raw/prem/MUestimates_other_locations_1.xlsx and /dev/null differ diff --git a/data-raw/prem/MUestimates_school_1.xlsx b/data-raw/prem/MUestimates_school_1.xlsx deleted file mode 100644 index 638188e..0000000 Binary files a/data-raw/prem/MUestimates_school_1.xlsx and /dev/null differ diff --git a/data-raw/prem/MUestimates_work_1.xlsx b/data-raw/prem/MUestimates_work_1.xlsx deleted file mode 100644 index 94f6727..0000000 Binary files a/data-raw/prem/MUestimates_work_1.xlsx and /dev/null differ diff --git a/data-raw/prem/contact_all.rdata b/data-raw/prem/contact_all.rdata new file mode 100644 index 0000000..8042dec Binary files /dev/null and b/data-raw/prem/contact_all.rdata differ diff --git a/data-raw/prem/contact_home.rdata b/data-raw/prem/contact_home.rdata new file mode 100644 index 0000000..843de1c Binary files /dev/null and b/data-raw/prem/contact_home.rdata differ diff --git a/data-raw/prem/contact_others.rdata b/data-raw/prem/contact_others.rdata new file mode 100644 index 0000000..7dd7732 Binary files /dev/null and b/data-raw/prem/contact_others.rdata differ diff --git a/data-raw/prem/contact_school.rdata b/data-raw/prem/contact_school.rdata new file mode 100644 index 0000000..087f520 Binary files /dev/null and b/data-raw/prem/contact_school.rdata differ diff --git a/data-raw/prem/contact_work.rdata b/data-raw/prem/contact_work.rdata new file mode 100644 index 0000000..1b920f2 Binary files /dev/null and b/data-raw/prem/contact_work.rdata differ diff --git a/data-raw/prem/rural/contact_all_rural.rdata b/data-raw/prem/rural/contact_all_rural.rdata new file mode 100644 index 0000000..9384b30 Binary files /dev/null and b/data-raw/prem/rural/contact_all_rural.rdata differ diff --git a/data-raw/prem/rural/contact_home_rural.rdata b/data-raw/prem/rural/contact_home_rural.rdata new file mode 100644 index 0000000..4f7dfa1 Binary files /dev/null and b/data-raw/prem/rural/contact_home_rural.rdata differ diff --git a/data-raw/prem/rural/contact_others_rural.rdata b/data-raw/prem/rural/contact_others_rural.rdata new file mode 100644 index 0000000..a318166 Binary files /dev/null and b/data-raw/prem/rural/contact_others_rural.rdata differ diff --git a/data-raw/prem/rural/contact_school_rural.rdata b/data-raw/prem/rural/contact_school_rural.rdata new file mode 100644 index 0000000..33aaf4b Binary files /dev/null and b/data-raw/prem/rural/contact_school_rural.rdata differ diff --git a/data-raw/prem/rural/contact_work_rural.rdata b/data-raw/prem/rural/contact_work_rural.rdata new file mode 100644 index 0000000..e831faa Binary files /dev/null and b/data-raw/prem/rural/contact_work_rural.rdata differ diff --git a/data-raw/prem/urban/contact_all_urban.rdata b/data-raw/prem/urban/contact_all_urban.rdata new file mode 100644 index 0000000..a345fb9 Binary files /dev/null and b/data-raw/prem/urban/contact_all_urban.rdata differ diff --git a/data-raw/prem/urban/contact_home_urban.rdata b/data-raw/prem/urban/contact_home_urban.rdata new file mode 100644 index 0000000..07bc8d0 Binary files /dev/null and b/data-raw/prem/urban/contact_home_urban.rdata differ diff --git a/data-raw/prem/urban/contact_others_urban.rdata b/data-raw/prem/urban/contact_others_urban.rdata new file mode 100644 index 0000000..82d2966 Binary files /dev/null and b/data-raw/prem/urban/contact_others_urban.rdata differ diff --git a/data-raw/prem/urban/contact_school_urban.rdata b/data-raw/prem/urban/contact_school_urban.rdata new file mode 100644 index 0000000..9da7e11 Binary files /dev/null and b/data-raw/prem/urban/contact_school_urban.rdata differ diff --git a/data-raw/prem/urban/contact_work_urban.rdata b/data-raw/prem/urban/contact_work_urban.rdata new file mode 100644 index 0000000..6de30db Binary files /dev/null and b/data-raw/prem/urban/contact_work_urban.rdata differ diff --git a/data-raw/prem_germany_contact_matrices.R b/data-raw/prem_germany_contact_matrices.R index 14a990f..fd0b2a6 100644 --- a/data-raw/prem_germany_contact_matrices.R +++ b/data-raw/prem_germany_contact_matrices.R @@ -1,19 +1,26 @@ -# 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( @@ -21,7 +28,7 @@ prem_germany_contact_matrices <- list( "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)