From 3e58bec25154f6c564c6148e06477f2b8fa1b3a6 Mon Sep 17 00:00:00 2001 From: "George G. Vega Yon" Date: Wed, 30 Oct 2024 14:42:57 -0600 Subject: [PATCH 1/3] [Hot fix] test when pop size is not constant was failing (#235) * Hot fix! * There was probably a single site! * Correcting site name * fix cbind, dont want duplicat column names, use seq_len but differently * Update NEWS.md Co-authored-by: Dylan H. Morris --------- Co-authored-by: Kaitlyn Johnson Co-authored-by: Kaitlyn Johnson <94390107+kaitejohnson@users.noreply.github.com> Co-authored-by: Dylan H. Morris --- NEWS.md | 2 +- tests/testthat/test_preprocess_ww_data.R | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/NEWS.md b/NEWS.md index c0ebcea6..5adf1ca4 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,7 +2,7 @@ ## User-visible changes -- `wwinference` now checks whether `site_pop` is unique per site (see issue [#223](https://github.com/CDCgov/ww-inference-model/issues/226) and reported by [@akeyel](https://github.com/akeyel)). +- `wwinference` now checks whether `site_pop` is fixed per site (see issue [#223](https://github.com/CDCgov/ww-inference-model/issues/226) reported by [@akeyel](https://github.com/akeyel)). ## Internal changes diff --git a/tests/testthat/test_preprocess_ww_data.R b/tests/testthat/test_preprocess_ww_data.R index 4c7ea160..6b4e668e 100644 --- a/tests/testthat/test_preprocess_ww_data.R +++ b/tests/testthat/test_preprocess_ww_data.R @@ -382,11 +382,12 @@ test_that("Function handles LOD values equal to concentration values", { test_that("Constant population per site", { wrong_pop <- ww_data - ww_data$site_pop <- sample(ww_data$site_pop) + + wrong_pop$site_pop <- 1e6 + seq_len(nrow(ww_data)) expect_error( preprocess_ww_data( - ww_data, + wrong_pop, conc_col_name = "conc", lod_col_name = "lod" ), From 3ff2d1ea7ef84264a6cb1075c2b17d67998c65c1 Mon Sep 17 00:00:00 2001 From: Kaitlyn Johnson <94390107+kaitejohnson@users.noreply.github.com> Date: Thu, 31 Oct 2024 09:38:35 -0400 Subject: [PATCH 2/3] Issue 184: Add outputs to `generate_simulated_data()` fxn and package data (#220) --- NEWS.md | 4 +- R/data.R | 116 ++++++++++++++++++++++++++++- R/generate_simulated_data.R | 131 +++++++++++++++++++++++++++++++-- R/model_component_fwd_sim.R | 46 ++++++++++++ data-raw/vignette_data.R | 17 ++--- data/hosp_data.rda | Bin 607 -> 612 bytes data/hosp_data_eval.rda | Bin 655 -> 644 bytes data/subpop_hosp_data.rda | Bin 0 -> 1122 bytes data/subpop_hosp_data_eval.rda | Bin 0 -> 1349 bytes data/true_global_rt.rda | Bin 2169 -> 2182 bytes data/ww_data.rda | Bin 1657 -> 1577 bytes data/ww_data_eval.rda | Bin 0 -> 1925 bytes man/format_subpop_hosp_data.Rd | 31 ++++++++ man/generate_simulated_data.Rd | 5 ++ man/hosp_data.Rd | 4 +- man/subpop_hosp_data.Rd | 46 ++++++++++++ man/subpop_hosp_data_eval.Rd | 48 ++++++++++++ man/ww_data_eval.Rd | 55 ++++++++++++++ scratch/sim_data_script.R | 1 + 19 files changed, 482 insertions(+), 22 deletions(-) create mode 100644 data/subpop_hosp_data.rda create mode 100644 data/subpop_hosp_data_eval.rda create mode 100644 data/ww_data_eval.rda create mode 100644 man/format_subpop_hosp_data.Rd create mode 100644 man/subpop_hosp_data.Rd create mode 100644 man/subpop_hosp_data_eval.Rd create mode 100644 man/ww_data_eval.Rd diff --git a/NEWS.md b/NEWS.md index 5adf1ca4..eec35d5c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,11 +1,11 @@ # wwinference 0.1.0.99 (dev) ## User-visible changes - +- Add wastewater data into the forecast period to output in `generate_simulated_data()` function and as package data. Also adds subpopulation-level +hospital admissions to output of function and package data. ([#184](https://github.com/CDCgov/ww-inference-model/issues/184)) - `wwinference` now checks whether `site_pop` is fixed per site (see issue [#223](https://github.com/CDCgov/ww-inference-model/issues/226) reported by [@akeyel](https://github.com/akeyel)). ## Internal changes - - Updated the workflow for posting the pages artifact to PRs (issue [#229](https://github.com/CDCgov/ww-inference-model/issues/229)). - Modify `plot_forecasted_counts()` so that it does not require an evaluation dataset ([#218](https://github.com/CDCgov/ww-inference-model/pull/218)) diff --git a/R/data.R b/R/data.R index b196dcf6..3baeeff7 100644 --- a/R/data.R +++ b/R/data.R @@ -39,6 +39,47 @@ #' @source vignette_data.R "ww_data" +#' Example evaluation wastewater dataset. +#' +#' A dataset containing the simulated retrospective wastewater concentrations +#' (labeled here as `log_genome_copies_per_ml_eval`) by sample collection date +#' (`date`), the site where the sample was collected (`site`) and the lab +#' where the samples were processed (`lab`). Additional columns that are +#' required attributes needed for the model are the limit of detection for +#' that lab on each day (labeled here as `log_lod`) and the population size of +#' the wastewater catchment area represented by the wastewater concentrations +#' in each `site`. +#' +#' This data is generated via the default values in the +#' `generate_simulated_data()` function. They represent the bare minumum +#' required fields needed to pass to the model, and we recommend that users +#' try to format their own data to match this format. +#' +#' The variables are as follows: +#' +#' @format ## ww_data_eval +#' A tibble with 126 rows and 6 columns +#' \describe{ +#' \item{date}{Sample collection date, formatted in ISO8601 standards as +#' YYYY-MM-DD} +#' \item{site}{The wastewater treatment plant where the sample was collected} +#' \item{lab}{The lab where the sample was processed} +#' \item{log_genome_copies_per_ml_eval}{The natural log of the wastewater +#' concentration measured on the date specified, collected in the site +#' specified, and processed in the lab specified. The package expects +#' this quantity in units of log estimated genome copies per mL.} +#' \item{log_lod}{The log of the limit of detection in the site and lab on a +#' particular day of the quantification device (e.g. PCR). This should be in +#' units of log estimated genome copies per mL.} +#' \item{site_pop}{The population size of the wastewater catchment area +#' represented by the site variable} +#' \item{location}{ A string indicating the location that all of the +#' data is coming from. This is not a necessary column, but instead is +#' included to more realistically mirror a typical workflow} +#' } +#' @source vignette_data.R +"ww_data_eval" + @@ -57,9 +98,9 @@ #' to match this format. #' #' This data is generated via the default values in the -#' `generate_simulated_data()` function. They represent the bare minumum +#' `generate_simulated_data()` function. They represent the bare minimum #' required fields needed to pass to the model, and we recommend that users -#' try to format their own data to match this formate. +#' try to format their own data to match this format. #' #' The variables are as follows: #' \describe{ @@ -132,6 +173,77 @@ #' @source vignette_data.R "hosp_data_eval" + + + +#' Example subpopulation level hospital admissions dataset +#' +#' A dataset containing the simulated daily hospital admissions +#' (labeled here as `daily_hosp_admits`) by date of admission (`date`) in +#' each subpopulation. +#' Additional columns that are the population size of the +#' population contributing to the hospital admissions. In this instance, +#' the subpopulations here are each of the wastewater catchment areas plus +#' an additional subpopulation for the portion of the population not captured +#' by wastewater surveillance. The data generated are daily hospital +#' admissions but they could be any other epidemiological count dataset e.g. +#' cases. This data should only contain hospital admissions that would have +#' been available as of the date that the forecast was made. +#' +#' This data is generated via the default values in the +#' `generate_simulated_data()` function. +#' +#' The variables are as follows: +#' \describe{ +#' \item{date}{Date the hospital admissions occurred, formatted in ISO8601 +#' standards as YYYY-MM-DD} +#' \item{subpop_name}{A string indicating the subpopulation the hospital +#' admissiosn corresponds to. This is either a wastewater site, or the +#' remainder of the population} +#' \item{daily_hosp_admits}{The number of individuals admitted to the +#' hospital on that date, available as of the forecast date} +#' \item{subpop_pop}{The number of people contributing to the daily hospital +#' admissions in each subpopulation} +#' } +#' @source vignette_data.R +"subpop_hosp_data" + + +#' Example subpopulation level retrospective hospital admissions dataset +#' +#' A dataset containing the simulated daily hospital admissions +#' (labeled here as `daily_hosp_admits`) by date of admission (`date`) in +#' each subpopulation observed retrospectively. +#' Additional columns that are required are the population size of the +#' population contributing to the hospital admissions. In this instance, +#' the subpopulations here are each of the wastewater catchment areas plus +#' an additional subpopulation for the portion of the population not captured +#' by wastewater surveillance. The data generated are daily hospital +#' admissions but they could be any other epidemiological count dataset e.g. +#' cases.This data should contain hospital admissions retrospectively beyond +#' the forecast date in order to evaluate the forecasts. +#' +#' This data is generated via the default values in the +#' `generate_simulated_data()` function. They represent the bare minimumum +#' required fields needed to pass to the model, and we recommend that users +#' try to format their own data to match this format. +#' +#' The variables are as follows: +#' \describe{ +#' \item{date}{Date the hospital admissions occurred, formatted in ISO8601 +#' standards as YYYY-MM-DD} +#' \item{subpop_name}{A string indicating the subpopulation the hospital +#' admissions corresponds to. This is either a wastewater site, or the +#' remainder of the population} +#' \item{daily_hosp_admits_for_eval}{The number of individuals admitted to the +#' hospital on that date, available as of the forecast date} +#' \item{subpop_pop}{The number of people contributing to the daily hospital +#' admissions in each subpopulation} +#' } +#' @source vignette_data.R +"subpop_hosp_data_eval" + + #' COVID-19 post-Omicron generation interval probability mass function #' #' \describe{ diff --git a/R/generate_simulated_data.R b/R/generate_simulated_data.R index c3582bd5..df74cfd5 100644 --- a/R/generate_simulated_data.R +++ b/R/generate_simulated_data.R @@ -59,6 +59,9 @@ #' infection feedback into the infection process, default is `FALSE`, which #' sets the strength of the infection feedback to 0. #' If `TRUE`, this will apply an infection feedback drawn from the prior. +#' @param subpop_phi Vector of numeric values indicating the overdispersion +#' parameter phi in the hospital admissions observation process in each +#' subpopulation #' @param input_params_path path to the toml file with the parameters to use #' to generate the simulated data #' @@ -121,6 +124,7 @@ generate_simulated_data <- function(r_in_weeks = # nolint sigma_eps = 0.05, sd_i0_over_n = 0.5, if_feedback = FALSE, + subpop_phi = c(25, 50, 70, 40, 100), input_params_path = fs::path_package("extdata", "example_params.toml", @@ -322,12 +326,35 @@ generate_simulated_data <- function(r_in_weeks = # nolint ) ## Latent per capita admissions-------------------------------------------- + # This won't be used other than for the unit test model_hosp_over_n <- model$functions$convolve_dot_product( p_hosp_days * new_i_over_n, # individuals who will be hospitalized rev(inf_to_hosp), uot + ot + ht )[(uot + 1):(uot + ot + ht)] + # Also compute per capita hosps for each subpopulation + model_hosp_subpop_over_n <- matrix( + nrow = n_subpops, + ncol = (ot + ht) + ) + for (i in 1:n_subpops) { + model_hosp_subpop_over_n[i, ] <- model$functions$convolve_dot_product( + p_hosp_days * new_i_over_n_site[i, ], + rev(inf_to_hosp), + uot + ot + ht + )[(uot + 1):(uot + ot + ht)] + } + + # unit test to make sure these are equivalent + if (!all.equal( + colSums(model_hosp_subpop_over_n * pop_fraction), + model_hosp_over_n, + tolerance = 1e-8 + )) { + cli::cli_abort("Sum of convolutions not equal to convolution of sums") + } + ## Add weekday effect on hospital admissions------------------------------- pred_hosp <- pop_size * model$functions$day_of_week_effect( @@ -335,12 +362,36 @@ generate_simulated_data <- function(r_in_weeks = # nolint day_of_week_vector, hosp_wday_effect ) + + pred_hosp_subpop <- matrix( + nrow = n_subpops, + ncol = (ot + ht) + ) + for (i in 1:n_subpops) { + pred_hosp_subpop[i, ] <- pop_fraction[i] * pop_size * + model$functions$day_of_week_effect( + model_hosp_subpop_over_n[i, ], + day_of_week_vector, + hosp_wday_effect + ) + } + + ## Add observation error--------------------------------------------------- - # This is negative binomial but could swap out for a different obs error - pred_obs_hosp <- rnbinom( - n = length(pred_hosp), mu = pred_hosp, - size = 1 / ((params$inv_sqrt_phi_prior_mean)^2) + # Use negative binomial but could swap out for a different obs error. + # Each subpopulation has its own dispersion parameter, then we sum + # the observations to get the population total + pred_obs_hosp_subpop <- matrix( + nrow = n_subpops, + ncol = (ot + ht) ) + for (i in 1:n_subpops) { + pred_obs_hosp_subpop[i, ] <- rnbinom( + n = length(pred_hosp_subpop[i, ]), mu = pred_hosp_subpop[i, ], + size = subpop_phi[i] + ) + } + pred_obs_hosp <- colSums(pred_obs_hosp_subpop) @@ -381,6 +432,18 @@ generate_simulated_data <- function(r_in_weeks = # nolint lab_site_reporting_latency = lab_site_reporting_latency ) + # Create evaluation data with same reporting freq but go through the entire + # time period + log_obs_conc_lab_site_eval <- downsample_ww_obs( + log_conc_lab_site = log_conc_lab_site, + n_lab_sites = n_lab_sites, + ot = ot + ht, + ht = 0, + nt = 0, + lab_site_reporting_freq = lab_site_reporting_freq, + lab_site_reporting_latency = rep(0, n_lab_sites) + ) + # Global adjusted R(t) -------------------------------------------------- @@ -406,6 +469,18 @@ generate_simulated_data <- function(r_in_weeks = # nolint lod_lab_site = lod_lab_site ) + ww_data_eval <- format_ww_data( + log_obs_conc_lab_site = log_obs_conc_lab_site_eval, + ot = ot + ht, + ht = 0, + date_df = date_df, + site_lab_map = site_lab_map, + lod_lab_site = lod_lab_site + ) |> + dplyr::rename( + "log_genome_copies_per_ml_eval" = "log_genome_copies_per_ml" + ) + # Artificially add values below the LOD---------------------------------- # Replace it with an NA, will be used as an example of how to format data # properly. @@ -419,16 +494,27 @@ generate_simulated_data <- function(r_in_weeks = # nolint TRUE ~ .data$log_genome_copies_per_ml ) ) + ww_data_eval <- ww_data_eval |> + dplyr::mutate( + "log_genome_copies_per_ml_eval" = + dplyr::case_when( + .data$log_genome_copies_per_ml_eval == + !!min_ww_val ~ 0.5 * .data$log_lod, + TRUE ~ .data$log_genome_copies_per_ml_eval + ) + ) # Make a hospital admissions dataframe for model calibration - hosp_data <- format_hosp_data(pred_obs_hosp, + hosp_data <- format_hosp_data( + pred_obs_hosp = pred_obs_hosp, dur_obs = ot, pop_size = pop_size, date_df = date_df ) - hosp_data_eval <- format_hosp_data(pred_obs_hosp, + hosp_data_eval <- format_hosp_data( + pred_obs_hosp = pred_obs_hosp, dur_obs = (ot + ht), pop_size = pop_size, date_df = date_df @@ -437,6 +523,36 @@ generate_simulated_data <- function(r_in_weeks = # nolint "daily_hosp_admits_for_eval" = "daily_hosp_admits" ) + # Make a subpopulation level hospital admissions data + # For now this will only be used for evaluation, eventually, can add + # feature to use this in calibration + subpop_map <- tibble::tibble( + subpop_index = as.character(1:n_subpops), + subpop_pop = pop_size * pop_fraction, + subpop_name = c(1:n_sites, NA) + ) |> + dplyr::mutate(subpop_name = ifelse(!is.na(subpop_name), + glue::glue("Site: {subpop_name}"), + "remainder of population" + )) + + subpop_hosp_data <- format_subpop_hosp_data( + pred_obs_hosp_subpop = pred_obs_hosp_subpop, + dur_obs = ot, + subpop_map = subpop_map, + date_df = date_df + ) + + subpop_hosp_data_eval <- format_subpop_hosp_data( + pred_obs_hosp_subpop = pred_obs_hosp_subpop, + dur_obs = (ot + ht), + subpop_map = subpop_map, + date_df = date_df + ) |> + dplyr::rename( + "daily_hosp_admits_for_eval" = "daily_hosp_admits" + ) + # Global R(t) true_rt <- tibble::tibble( unadj_rt_daily = as.numeric(unadj_r_daily), @@ -453,8 +569,11 @@ generate_simulated_data <- function(r_in_weeks = # nolint example_data <- list( ww_data = ww_data, + ww_data_eval = ww_data_eval, hosp_data = hosp_data, hosp_data_eval = hosp_data_eval, + subpop_hosp_data = subpop_hosp_data, + subpop_hosp_data_eval = subpop_hosp_data_eval, true_global_rt = true_rt ) diff --git a/R/model_component_fwd_sim.R b/R/model_component_fwd_sim.R index b5449646..956e574d 100644 --- a/R/model_component_fwd_sim.R +++ b/R/model_component_fwd_sim.R @@ -422,6 +422,52 @@ format_hosp_data <- function(pred_obs_hosp, return(hosp_data) } + +#' Format the subpopulation-level hospital admissions data into a tidy +#' dataframe +#' +#' @param pred_obs_hosp_subpop matrix of non-negative integers indicating the +#' number of hospital admissions on each day in each subpopulation. Rows are +#' subpopulations, columns are time points +#' @param dur_obs integer indicating the number of days we want the +#' observations for +#' @param subpop_map tibble mapping the numbered subpopulations to the +#' wastewater sites, must contain columns "subpop_index" and "subpop_name" +#' @param date_df tibble of columns `date` and `t` that map time in days to +#' dates +#' +#' @return a tidy dataframe containing counts of admissions by date alongside +#' population size for each subpopulation +format_subpop_hosp_data <- function(pred_obs_hosp_subpop, + dur_obs, + subpop_map, + date_df) { + subpop_hosp_data <- as.data.frame(t(pred_obs_hosp_subpop)) |> + dplyr::mutate(t = seq_len(ncol(pred_obs_hosp_subpop))) |> + dplyr::filter(t <= dur_obs) |> + tidyr::pivot_longer(!t, + names_to = "subpop_index", + names_prefix = "V", + values_to = "daily_hosp_admits" + ) |> + dplyr::left_join( + date_df, + by = "t" + ) |> + dplyr::left_join( + subpop_map, + by = "subpop_index" + ) |> + dplyr::select( + "date", + "subpop_name", + "daily_hosp_admits", + "subpop_pop" + ) + return(subpop_hosp_data) +} + + #' Back- calculate R(t) from incident infections and the generation interval #' #' @description diff --git a/data-raw/vignette_data.R b/data-raw/vignette_data.R index 38c61081..8f4c2dbd 100644 --- a/data-raw/vignette_data.R +++ b/data-raw/vignette_data.R @@ -1,22 +1,19 @@ set.seed(1) simulated_data <- wwinference::generate_simulated_data() hosp_data_from_sim <- simulated_data$hosp_data -ww_data_from_sim <- simulated_data$ww_data -# Add some columns and reorder sites to ensure package works as expected -# even if sites are not in order -ww_data <- ww_data_from_sim |> - dplyr::mutate( - "location" = "example state", - "site" = .data$site + 1 - ) |> - dplyr::ungroup() |> - dplyr::arrange(desc(.data$site)) +ww_data <- simulated_data$ww_data +ww_data_eval <- simulated_data$ww_data_eval hosp_data <- hosp_data_from_sim |> dplyr::mutate("location" = "example state") hosp_data_eval <- simulated_data$hosp_data_eval +subpop_hosp_data <- simulated_data$subpop_hosp_data +subpop_hosp_data_eval <- simulated_data$subpop_hosp_data_eval true_global_rt <- simulated_data$true_global_rt usethis::use_data(hosp_data, overwrite = TRUE) usethis::use_data(hosp_data_eval, overwrite = TRUE) usethis::use_data(ww_data, overwrite = TRUE) +usethis::use_data(ww_data_eval, overwrite = TRUE) +usethis::use_data(subpop_hosp_data, overwrite = TRUE) +usethis::use_data(subpop_hosp_data_eval, overwrite = TRUE) usethis::use_data(true_global_rt, overwrite = TRUE) diff --git a/data/hosp_data.rda b/data/hosp_data.rda index 7595c3bb63da37ec0c78e995b9ea137bb3e08967..83e0eeb833d8928bc8825143775be9bd48780ed4 100644 GIT binary patch delta 601 zcmcc5@`OdsDJsL#&@oaiIC5`Y&2I+Qef8J>7iTcI{|AGKauW56R=!HsxGW%La)GV? zZ>Wjf0+S5pzai`)M)$ax*^d{WcJyJK z#1d?>wo8-MX}$AT^{z*Yp1WE6bPlQ8v1Aozh}ItI@PzXZC(fVrsh+EL(T2xP*E9@P zaB{}9L@9N!N;)Zh{=Lc7d-kSOK|_%2H6Qre}6CMJbm%vv4>wFgP(TaA@q17HDHo;bLd2Zb&%T%*G>O zfJBMZi+HlCu(M}5?opb+knLoa=aqQhv^Z&ttFfg0%r&}#UN4Q8DNX9x5S`|Iqta+o z*`cm@L63>Ml%{|5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&?){_QtfHTSZwHW^K4W-K%){nJHT|{gvN1G%YcbJ-Aiz!pHa9!rq?ki8A_Ix;Zv` z2JfxS>Dl?!vzK-C?ftMY6xGT)DZ|G3bJ^0!xDji~8-~UNMb23swlR zC^#{=ajXk*1;L_4TDuSKoH={r8q=_Bser4Sxs9E#i|$x-=IhJqy~gu*%)I<-^O{L4 z5=k>Ax;9Pa6jNbwP;zMG=m=<3ahb7UVq57!ub?SQHBpEq$6MAIp3dE|@m5EtlGfgR zUhcA?37s!GUe{>-e17p?*6o$8p}Cg!5#G9<`YK!d&Pi`x;;=ckGca()uiJ6uZXx?- z7@GF)?{{A;yO@<=qIAW`}M(l1^_{uAeR6D diff --git a/data/subpop_hosp_data.rda b/data/subpop_hosp_data.rda new file mode 100644 index 0000000000000000000000000000000000000000..29de916840b52c20232fad3acc5bd125460e1fad GIT binary patch literal 1122 zcmZ>Y%CIzaj8qGb6f`V7#~`g+fBgUNnk(V|f#CcfhyCUE7C1NrFmNz1I5;?7VBKT$ z@STO$SvCW?+{0SSS8j2eG0Wsc=464(3~fHMQZ6o=$^SRhkeP!=z(i@DbFf43SC+ql zvlJIQFi7&+Dm%Vn00O4qOPwB74g3Le8YYYjfC9D-KtfQ|6-@sRWnj1f0|zhb#HtI~n3;o_@|zrj}+j7&1l`UlUNpYli5YpPbr%AlpBQfvBI zg2jB4ZG3lLoHympT+NqfgO^)PUTt-Gy{+es*_*G5!$ zuU{wfz5ml{j;?mn>CH1%AW$9Bfy4-rzEzjC!bHjnY#XLoa@xwMuVM+1{z4|2FP#)%2GZSiJj7#^LNN%|~~=N-oVUS$4dB z;ra8@oxbK1TfH(v!n6dAT%MwJUh>fjNrSGrBC}umtm^u^!EFw&eAuBir)?x%Tb7A# zm~!gGydP6Os9L`Cd9KW-ppwAJ!Q{p{!&PBzlIEs=VUiDK?B?|8oODuixly{YSAe%m zP*Vh_f{F*%*$9rM8jUk~3)cj@x+!V6D4Vxz>P(xW;_2=5*fY^X;Kjvxy;{Z>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cz8zICMZRmrctEIZwGE!tMC_IknG^&q~j z;oE`l3yLhaK3SQ%DsolSTD=Ani>Rfm_4)go)&&Qh`jt@V-CDq2JykDwf=tlE12RF6 zu54YIx-vKD?i6;B9apw3-Kx7X>+sp7)3{AUI-CSlJgz9&?A*3>smlVxfP5+;lr zr50)ha=Dm_`>s{n$s06p$x@R^Q$DC_KJ*ISGi}nLC~wWz{z=)(4h79zxoKX>E#DijLBQzZ4l`cuPSxj{ z9NfoM@(xdx_H+z5)y3K3BFd??!c*XaA}14zg7b#A0TWkpYFyS#%)WIevQI2T%jM9M zW4GMY%x7>htuzqoJEGgG9hI_GM)c9%fEh7f3~K~gJQ6INUhj@9uNAzu;WQ8NXiEm4 z_pAqec^R?`iq|C=J->8Tcj;OU0gv+29Sn2%CWJDq?^H58e*1das&y0W-!fi)%6tO|PqF*= z=c~_QpMH&b-fnA#&(${nCfF7j$n&h)pFi#M@A*>ajW^z5o*?_dJiLQHefH`ax$f;p zzwVJ)?|d}iAZzHt(2TtWpBl2_P`_k`NXk{AB&CeNDeiU%ks@dLEKsyFc~QkH>e#i(D-N ICV+}f0BMI-kN^Mx literal 0 HcmV?d00001 diff --git a/data/true_global_rt.rda b/data/true_global_rt.rda index 399520388d6873a1278e61be94909519651c969b..c1a6d882047826236a0403955ff3e97b28ea2134 100644 GIT binary patch literal 2182 zcmah@c{J1u8~%+M%P_+rOp7&ks6>{KYD6;Du}=)fzJ^Mu zkgUtf*008I* z-~!=z>b?@70f06caUiG29E}DmLz5|LJlsJHrXAn`@@%Rs4i9@=f&t@Yf19arp#OIV zEx`dX8=&eyBJ`y|xG`HG!8VsI3k za5(1RK@4b#x*snKcrFQ+tPSt4;(mL7KSV`S2iPGrs!&j`x|vGS|0!Iy^%d0*PA4es zsowRyuLsRZ<(|Z!&j-Jw)Z;JeN0;v(d=ASeDA53oc(S7a%Rd~=$V)_~!M*0@Ad&C3 zG=(!}6C`!^T0Kcg$&p^;wha|EZ|IMYXFYS{R7DW}6U_j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+{DFp!Vj@tSBh*91H)s?` zURj5c9ttr}V%#rd7+Vn0QmS~Odlb2Dzg)0uJOV5UH6oOrhx$YU1&eu1tY;<(q=cR^ zLnpIuof&Pw+ZmEGM_-!b^Cx4A$>FTB3K0UOc>sqoQb026g}}xLOT<*5S||XUp;V=N zYf9?FN2S7W`CII#qd4gOB&-poxgsN6R{j%OGo+ws*7H$TW^1I*<>kZPr)t_|{gTV3 zkm(AeGlH*xpmm92Rjk28Mm?<`<mN_IAnH!l6tX{p~X<_n$0j)zTE9pcny2zyk~< zf4$@BUPn&s-L$g_#rBm|i5o|zbL=!%^TK+I zCJpyWJUt#SH;MX;9t%Q!Y6CaAQl%&m9oG?{n8&T}$C2*lm2KKtH+8ADjSxUCi2xR7 z`DX_kAV>h}rf<^px82Cwd+?u4A6aD`T2()_Z~$*mHWd?3uUcqv9~EfM*0E3$%!JGJ7ORr=!atwC51zg6YAt23$p8RS4nP1~2sm%l3Ds2e-F^gE?MaZ;$^nKyYp z3j4Eid;Y0mr$|R}B!$^W-yEqsU3tUN+rE^G#j%)jh!$53mq$qQ*fRe3=(7`CKE~MD zJK|fkz#|H~r;_sU)9n8UfC{DY_o-m44HlPU0V2Ot&M%B008u7#WV&4HhR27~7>Bv- z-l9YyKH+!EPkLQ5pnPuI0OBf>HUXMo0#UtSw|2#~&-0`}+`iY>>D}4vAQ65S_<5<1 zm;`+*3tmoVI{X4q;TtlgcX&WLaTYhoIm7}cXTVsMA*+gxtVFmBf5qI9P81{;g%vo! DlbG>! diff --git a/data/ww_data_eval.rda b/data/ww_data_eval.rda new file mode 100644 index 0000000000000000000000000000000000000000..176a52b471dbadb3a38f39b5d9c98f9beb7ba6ef GIT binary patch literal 1925 zcmV;02YUEIT4*^jL0KkKS%_c%%m4`zfB*mg{r~^}|NsC0|NsC0|G)qL|NsC0|G)qL z|Nr0r|LxEPT<`*vd%4-#&t}(1LXk9@Jx@uKPbfT-YBcp8lha7VdY+@j0py!V4@v3` zGzNgvN2#MmY79o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=htAP2_Gn> z%ZSD2P{TWcLqN8${6lb&KDz^7ID;iTvFcd%t)Wn=HSa^LsVn%x8sH@@Wu%y^nkd8J zjh&ghz>usM(!R@1BetuRXHPCv(=%p?NItw*fezK93)Len{ha)M}{+?x~g?sE34M;tY-P*(5{| zqYYbc4+(muG}eaLQtRF|i!isrJcIAB0{|c-0D09U0RenZMjVaw5K*}ZB*0AzaXmGo z7?{5KC1A|zX907CZlT)A*H6S|96e;gAec5u?GPye5Jd|z9V}~SRQic01|$4vHO%9J z`KXnJh71uXY|!tFh#x1~7_>91>w`(>-@I6bO7oNZ3)Pzatu6xTRE&m33uC3+fPh4r z-5;A!WD5Wg2Z0OP)yI=)inHvQX~W{M?|JpVkPrhi5kwyFUEr#ONx?HA# zm*YpKOy}!mA1`b1pAZ0HCkXNX3lH4bt4sm|lbc?R^Q46-2H8;>GHECPfLs2|$wb*; zITSVu5IuYde-tnZpb^8=e8anK0sR1AAc+7VphX0F1Q4Zx#tT<>Bp?8TqeiyHce+Lr z*3WNQPecA_#Jov`ifil_r+v{RI067w9VI58+E_s-pR^aUSlrY8Mt00e3YCKWfnR>U zBwa*Y8d;bv@Yr0Z{qkHPDx{H2Qb2!nH`!a$YJ=!8C062?ZY%@@eE=X3_Sia|`a7+0 zOugnhD~b6gAS2c?eXc^d1OlUTntqLD$g3nk0svvb6}3J?h??9Xn7QM@%mp%R{F1VE zGI6k^?Q+t>Kv!)+1|}@EKDz4LOlg4z6?Da{omAoiMlx#3%>jSP&?r-0o Date: Mon, 4 Nov 2024 12:00:39 -0500 Subject: [PATCH 3/3] Issue 238: Fix plot bug (#239) * swap order of plotting so calib data shows up * fix plot function --- R/figures.R | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/R/figures.R b/R/figures.R index ce40b45e..03ee740d 100644 --- a/R/figures.R +++ b/R/figures.R @@ -57,7 +57,6 @@ get_plot_forecasted_counts <- function(draws, aes(x = .data$date, y = .data$pred_value, group = .data$draw), color = "red4", alpha = 0.1, linewidth = 0.2 ) + - geom_point(aes(x = .data$date, y = .data$observed_value)) + geom_vline( xintercept = lubridate::ymd(forecast_date), linetype = "dashed" @@ -91,7 +90,11 @@ get_plot_forecasted_counts <- function(draws, shape = 21, color = "black", fill = "white" ) } - return(p) + # Add calibration data as final step, this should be plotted on top of + # the eval data(if present) and draws + p_final <- p + geom_point(aes(x = .data$date, y = .data$observed_value)) + + return(p_final) } #' Get plot of fit and forecasted wastewater concentrations