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
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
2524get_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