Skip to content

Commit

Permalink
work on empty scores
Browse files Browse the repository at this point in the history
  • Loading branch information
sbfnk committed Mar 29, 2023
1 parent a830a8d commit 18d0edf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions R/summarise_scores.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,16 @@ summarise_scores <- function(scores, report_date, restrict_weeks = 0L) {
select(-continuous_weeks)
}

if (nrow(score_df) == 0) {
return(tibble(
model = character(0),
target_variable = character(0),
horizon = integer(0),
location = character(0),
location_name = character(0)
))
}

## number of forecasts
num_fc <- score_df %>%
count(model, target_variable, horizon, location)
Expand Down

0 comments on commit 18d0edf

Please sign in to comment.