Skip to content

Commit 5178747

Browse files
authored
Merge pull request #271 from cmu-delphi/ndefries/update-truth-on-forecaster-change
regenerate truth plot if aggregating over shared states
2 parents 49896af + 3f42eda commit 5178747

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

app/server.R

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,15 @@ server <- function(input, output, session) {
809809
updateLocationChoices(session, df, input$targetVariable, input$forecasters, input$location)
810810
updateCoverageChoices(session, df, input$targetVariable, input$forecasters, input$coverageInterval, output)
811811
USE_CURR_TRUTH <<- TRUE
812+
813+
# When aggregating over shared locations (i.e. either when coverage is
814+
# selected or when the "Total over states" location option is selected),
815+
# we need to regenerate the truth plot when any new forecaster is added
816+
# in case it changes the common location set.
817+
if (SUMMARIZING_OVER_ALL_LOCATIONS()) {
818+
# Need to create new truth plot.
819+
USE_CURR_TRUTH <<- FALSE
820+
}
812821
})
813822

814823
observeEvent(input$scaleByBaseline, {

0 commit comments

Comments
 (0)