cmu-delphi / cmu-delphi/forecast-eval
Data downloading fails if score type is coverage or if summarizing across multiple locations
- Dominant language
- R
- Stars
- 6
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
We see this error
```
Warning: Error in filter: Problem while computing `..1 = !is.na(Score) | target_end_date >= filterDate`.
Caused by error in `mask$eval_all_filter()`:
! argument "filterDate" is missing, with no default
```
[`filterOverAllLocations` requires a `filterDate` arg](https://github.com/cmu-delphi/forecast-eval/blob/dev/app/R/data_manipulation.R#L16), but when totaling across locations or looking at coverage scores, we [don't pass `filterOverAllLocations` a `filterDate`](https://github.com/cmu-delphi/forecast-eval/blob/dev/app/R/exportScores.R#L24).
[`createExportScoreDataFrame` will need to be passed](https://github.com/cmu-delphi/forecast-eval/blob/dev/app/server.R#L925-L928) at least a date to use in the filter. The value should be `dataCreationDate` to match other score-generating logic.
Consider passing `input$asOf` as well and adding as-of data onto the exported dataframe, to more closely match what we're using in the plots.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in app/R/data_manipulation.R at filterOverAllLocations and app/R/exportScores.R at its call sites, then inspect server.R around lines 925-928 for createExportScoreDataFrame. Reproduce the coverage or multi-location export failure and trace how dataCreationDate and input$asOf are handled by related score-generating logic. Done means both export cases complete without the missing filterDate error and the resulting data includes the agreed date fields.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100