Skip to content

Commit

Permalink
fix country reports (#2956)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbfnk authored Mar 29, 2023
1 parent 30907cb commit 55febf8
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 237,293 deletions.
16 changes: 10 additions & 6 deletions code/evaluation/aggregate_scores.r
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,16 @@ for (chr_report_date in as.character(report_dates)) {
)
}

combined_table <- bind_rows(tables, .id = "weeks_included") %>%
mutate(weeks_included = recode(weeks_included, `Inf` = "All"))
eval_filename <-
here::here(subdir, "evaluation", "weekly-summary",
paste0("evaluation-", report_date, ".csv"))
combined_table <- bind_rows(tables, .id = "weeks_included")
if (nrow(combined_table) > 0) {
combined_table <- combined_table |>
mutate(weeks_included = recode(weeks_included, `Inf` = "All"))
}

eval_filename <- here::here(
subdir, "evaluation", "weekly-summary",
paste0("evaluation-", report_date, ".csv")
)

write_csv(combined_table, eval_filename)
}

2 changes: 1 addition & 1 deletion code/reports/rmdchunks/plot-forecasts.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ for (fcast_date in as.character(forecast_dates)) {
plot_data <- scaled_data |>
filter(
target_variable == target_variables[[target]],
is.na(model) | model == compare_model,
model == compare_model,
target_end_date >= fcast_date - weeks(10),
target_end_date < fcast_date + weeks(4)
) |>
Expand Down
Loading

0 comments on commit 55febf8

Please sign in to comment.