Skip to content

Commit 3ba7ea6

Browse files
committed
comment forecaster dropping and merge keys
1 parent 9d942ba commit 3ba7ea6

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

app.R

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,20 @@ shinyApp(
153153
# Normalize by baseline scores. This is not relevant for coverage, which is compared
154154
# to the nominal confidence level.
155155
if (input$scale_by_baseline && input$selected_metric != "ic80") {
156-
# Load selected baseline
156+
# These merge keys are overkill; this should be fully specified by
157+
# c("forecast_date", "target_end_date", "geo_value")
157158
merge_keys <- c("forecast_date", "target_end_date", "ahead", "issue", "geo_value")
159+
# Load selected baseline
158160
baseline_scores <- load_forecast_data(input$baseline)[, c(merge_keys, input$selected_metric)]
159161

160162
baseline_scores$score_baseline <- baseline_scores[[input$selected_metric]]
161163
baseline_scores[[input$selected_metric]] <- NULL
162164

163-
# Add on reference scores from baseline forecaster
165+
# Add on reference scores from baseline forecaster.
166+
# Note that this drops any scores where there isn't a corresponding
167+
# baseline value. If a forecaster and a baseline cover
168+
# non-overlapping dates or use different aheads, the forecaster will
169+
# not be shown.
164170
input_df <- inner_join(
165171
input_df, baseline_scores,
166172
by = merge_keys, suffix = c("", "")

0 commit comments

Comments
 (0)