From e07eab0dccbf9083f9529c44a5f3a0ce4327f27b Mon Sep 17 00:00:00 2001 From: Damon Bayer Date: Mon, 6 Jan 2025 20:36:39 -0600 Subject: [PATCH] Remove time column from output (#276) --- hewr/R/process_state_forecast.R | 1 - hewr/tests/testthat/test_process_state_forecast.R | 1 - pipelines/diagnostic_report/template.qmd | 5 +++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hewr/R/process_state_forecast.R b/hewr/R/process_state_forecast.R index 174e0d3b..527d035e 100644 --- a/hewr/R/process_state_forecast.R +++ b/hewr/R/process_state_forecast.R @@ -45,7 +45,6 @@ combine_training_and_eval_data <- function(train_dat, ) |> with_prop_disease_ed_visits() |> dplyr::select(-"Total") |> - dplyr::mutate(time = dplyr::dense_rank(.data$date)) |> tidyr::pivot_longer( c("Disease", "Other", "prop_disease_ed_visits"), names_to = "disease", diff --git a/hewr/tests/testthat/test_process_state_forecast.R b/hewr/tests/testthat/test_process_state_forecast.R index 282741fd..b717df6e 100644 --- a/hewr/tests/testthat/test_process_state_forecast.R +++ b/hewr/tests/testthat/test_process_state_forecast.R @@ -47,7 +47,6 @@ test_that("combine_training_and_eval_data works as expected", { checkmate::assert_names(names(result), permutation.of = c( - "time", "date", "data_type", "disease", diff --git a/pipelines/diagnostic_report/template.qmd b/pipelines/diagnostic_report/template.qmd index edc63aa6..ac1caa3e 100644 --- a/pipelines/diagnostic_report/template.qmd +++ b/pipelines/diagnostic_report/template.qmd @@ -7,7 +7,7 @@ format: - custom.scss embed-resources: false params: - model_dir_raw: "/home/xum8/pyrenew-hew/private_data/pyrenew-test-output/covid-19_r_2024-11-22_f_2024-08-19_t_2024-11-16/model_runs/MN/" # pragma: allowlist-secret + model_dir_raw: "/Users/damon/Documents/GitHub/pyrenew-hew/pipelines/tests/private_data/covid-19_r_2024-12-21_f_2024-10-22_t_2024-12-20/model_runs/CA" # pragma: allowlist-secret --- @@ -184,7 +184,8 @@ figure_save_tbl |> ```{r Rt Plot} #| title: Posterior Rt date_time_map <- combined_dat |> - distinct(time, date) + distinct(date) |> + mutate(time = dense_rank(date) - 1) last_training_date <- combined_dat |> dplyr::filter(data_type == "train") |>