The default behavior in the input$scoreTypeobserver is to reuse the existing truth plot. This is valid as long as the locations reported by each score type are the same. Most of the time, that's true; WIS, absolute error, and sharpness/spread all use the selected location.
However, regardless of which location is selected, coverage aggregates scores over states that have forecasts reported by all selected forecasters. This means that when changing to or from "coverage" and any single state or "US" is selected as the location (that is, we are not aggregating over shared locations), the displayed truth data will be incorrect if we just show the pre-existing plot. So we want to regenerate the truth plot by setting the flag that controls that behavior, USE_CURR_TRUTH, to FALSE in this case.
The old code was calling updateAsOfData() in some cases (only when the selected location was "US" -- what about other single locations?). We do need to do that to make sure the truth data is relevant, either invalidating cached as-of truth data or fetching new as-of truth data.
Somehow by selecting a few teams... I reached a mode where switching from WIS to coverage would not plot on the main tab, but I could switch back to WIS and it would again show the WIS plot, and I could switch to the archive tab, switch to coverage, switch back to main tab, and coverage plots would show. And the same thing going from coverage to WIS plots.
...
If you have US selected then that triggers the non-plotting behavior
Description
The default behavior in the
input$scoreType
observer
is to reuse the existing truth plot. This is valid as long as the locations reported by each score type are the same. Most of the time, that's true; WIS, absolute error, and sharpness/spread all use the selected location.However, regardless of which location is selected, coverage aggregates scores over states that have forecasts reported by all selected forecasters. This means that when changing to or from "coverage" and any single state or "US" is selected as the location (that is, we are not aggregating over shared locations), the displayed truth data will be incorrect if we just show the pre-existing plot. So we want to regenerate the truth plot by setting the flag that controls that behavior,
USE_CURR_TRUTH
, toFALSE
in this case.The old code was calling
updateAsOfData()
in some cases (only when the selected location was "US" -- what about other single locations?). We do need to do that to make sure the truth data is relevant, either invalidating cached as-of truth data or fetching new as-of truth data.However, when we're not requesting as-of truth data,
updateAsOfData()
also setsRE_RENDER_TRUTH
toTRUE
. This flag causessummaryPlot()
to not generate a new main plot showing forecaster scores. We need to resetRE_RENDER_TRUTH
toFALSE
.Fixes
Logan described the following issue on Slack: