@@ -153,14 +153,20 @@ shinyApp(
153
153
# Normalize by baseline scores. This is not relevant for coverage, which is compared
154
154
# to the nominal confidence level.
155
155
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")
157
158
merge_keys <- c(" forecast_date" , " target_end_date" , " ahead" , " issue" , " geo_value" )
159
+ # Load selected baseline
158
160
baseline_scores <- load_forecast_data(input $ baseline )[, c(merge_keys , input $ selected_metric )]
159
161
160
162
baseline_scores $ score_baseline <- baseline_scores [[input $ selected_metric ]]
161
163
baseline_scores [[input $ selected_metric ]] <- NULL
162
164
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.
164
170
input_df <- inner_join(
165
171
input_df , baseline_scores ,
166
172
by = merge_keys , suffix = c(" " , " " )
0 commit comments