Skip to content

Forecasters with multiple forecasts for same target date with same score failing on tsibble key/index selection #157

Open
@kateharwood

Description

@kateharwood

Forecasters may have multiple forecasts for the same week end date with the same score, and tsibbles need unique keys/indexes. Simply removing dups before setting the tsibble (something like this: filteredScoreDf = filteredScoreDf[!duplicated(filteredScoreDf[c("Week_End_Date" , "Forecaster")]), ]) will mess up how the faceted plots work.

Right now this is only happening with the CU-select forecaster. It doesn't show a plot for US deaths bc it contains week end date / score dups.

Tsibble code:

    # Fill gaps so there are line breaks on weeks without data
    filteredScoreDf = filteredScoreDf %>%
      as_tsibble(key = c(Forecaster, ahead), index = Week_End_Date) %>%
      group_by(Forecaster, Forecast_Date, ahead) %>%
      fill_gaps(.full = TRUE)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions