Skip to content

Commit 43977eb

Browse files
committed
add latest reviewer comments
1 parent 0f03a31 commit 43977eb

File tree

5 files changed

+12
-14
lines changed

5 files changed

+12
-14
lines changed

NAMESPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ export(generate_hub_ensemble)
88
export(generate_oracle_output)
99
export(generate_webtext_block)
1010
export(get_hub_name)
11-
export(get_webtext)
1211
export(included_locations)
1312
export(summarize_ref_date_forecasts)
1413
export(update_authorized_users)
1514
export(update_hub_target_data)
1615
export(write_ref_date_summary)
1716
export(write_ref_date_summary_all)
1817
export(write_ref_date_summary_ens)
18+
export(write_webtext)
1919
importFrom(rlang,":=")
2020
importFrom(rlang,.data)

R/get_webtext.R renamed to R/write_webtext.R

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,24 +83,22 @@ check_hospital_reporting_latency <- function(
8383
!.data$report_above_80_lgl
8484
)
8585

86-
reporting_rate_flag <- if (
87-
length(latest_reporting_below80$location_name) > 0
88-
) {
86+
any_locations_flagged <- nrow(latest_reporting_below80) > 0
87+
if (any_locations_flagged) {
8988
location_list <- cli::ansi_collapse(
9089
latest_reporting_below80$location_name,
9190
sep = ", ",
9291
last = ", and "
9392
)
94-
95-
glue::glue(
93+
reporting_rate_flag <- glue::glue(
9694
"The following jurisdictions had <80% of hospitals reporting for ",
9795
"the most recent week: {location_list}. ",
9896
"Lower reporting rates could impact forecast validity. Percent ",
9997
"of hospitals reporting is calculated based on the number of active ",
10098
"hospitals reporting complete data to NHSN for a given reporting week.\n\n"
10199
)
102100
} else {
103-
""
101+
reporting_rate_flag <- ""
104102
}
105103

106104
return(reporting_rate_flag)
@@ -315,7 +313,7 @@ generate_webtext_block <- function(
315313
#' character(0).
316314
#'
317315
#' @export
318-
get_webtext <- function(
316+
write_webtext <- function(
319317
reference_date,
320318
disease,
321319
base_hub_path,

man/check_hospital_reporting_latency.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/generate_webtext_block.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)