Skip to content

Conversation

nmdefries
Copy link
Collaborator

Description

Allow users to request and see predictions for future dates made by selected forecasters.

Changes

  • Makefile: pull_data target to pull new saved datetime.
  • app/R/data.R: data loader to get cached datetime in addition to scores.
  • app.ui.R: enable "show forecasts" button for all as-of dates by default.
  • app/R/data_manipulation.R: filterOverAllLocations() to take new filterDate arg. filterDate is used to remove predictions that are in the past (relative to when the data was generated) but don't have scores despite having truth data available. This lets us keep predictions that are in the future and don't have scores (because truth data wasn't available).
  • app/server.R:
    • Get new cached datetime.
    • Explicitly set summary plot and truth plot x-axis ranges to be the same when predictions are shown on the truth plot. Since predictions are shown only on the truth plot and can appear in the future, axis auto-scaling can extend the max date past what is displayed in the summary plot and make it hard to compare between the plots.
    • Patch the truth plot legend parsing. The plotly package seems to have changed handling of ggplot legends so that we see duplicate entries for a given forecaster.
    • Change filterScoreDf() logic to match `filterOverAllLocations()
    • Generalize filterForecastData() to work with (past as-of dates) or without (most recent as-of date) as-of data.
    • Remove blocks to show or hide the "show forecasts" button, since we want to show it for all as-of dates now.

Fixes

Closes #203

Copy link
Contributor

@krivard krivard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic questions

@nmdefries nmdefries requested a review from krivard March 2, 2022 17:36
@nmdefries nmdefries requested a review from krivard March 4, 2022 18:02
Copy link
Contributor

@krivard krivard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nmdefries nmdefries merged commit 1d50018 into dev Mar 7, 2022
@nmdefries nmdefries deleted the ndefries/display-future-predictions branch March 7, 2022 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show forecasts for all as-of dates
3 participants