Skip to content

Commit 4607b5c

Browse files
committed
reuse review from prev pr review
1 parent a6c39bf commit 4607b5c

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

R/get_webtext.R

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#' Generate text content for forecast hub visualization
2-
#' webpage.
1+
#' Generate text content for forecast hub visualization webpage.
32
#'
43
#' This function generates formatted text summaries for the
54
#' forecast hub visualization webpage. It processes
@@ -10,23 +9,23 @@
109
#'
1110
#' @param reference_date character, the reference date for
1211
#' the forecast in YYYY-MM-DD format (ISO-8601).
12+
#' @param disease character, disease name ("covid" or
13+
#' "rsv"). Used to derive hub name, file prefix, and
14+
#' disease display name.
1315
#' @param base_hub_path character, path to the forecast hub
1416
#' directory. Default: "."
1517
#' @param hub_reports_path character, path to forecast hub
1618
#' reports directory. Default: "../covidhub-reports"
17-
#' @param disease character, disease name ("covid" or
18-
#' "rsv"). Used to derive hub name, file prefix, and
19-
#' disease display name.
2019
#' @param excluded_territories character vector of location
2120
#' codes to exclude from reporting calculations. Default:
2221
#' character(0).
2322
#'
2423
#' @export
2524
get_webtext <- function(
2625
reference_date,
26+
disease,
2727
base_hub_path = ".",
2828
hub_reports_path = "../covidhub-reports",
29-
disease,
3029
excluded_territories = character(0)
3130
) {
3231
checkmate::assert_choice(disease, choices = c("covid", "rsv"))
@@ -47,6 +46,7 @@ get_webtext <- function(
4746
reference_date
4847
)
4948

49+
# could possibly use write_ref_date_summary_ensemble() or summarize_ref_date_forecasts()
5050
ensemble_us_1wk_ahead <- forecasttools::read_tabular(
5151
fs::path(
5252
weekly_data_path,
@@ -270,4 +270,6 @@ get_webtext <- function(
270270
} else {
271271
cli::cli_abort("File already exists: {output_filepath}")
272272
}
273+
274+
return(invisible())
273275
}

0 commit comments

Comments
 (0)