Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Report/predictions.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ library(dplyr)

# TODO: Use `get_covidhub_forecaster_names()` instead of listing forecasters
create_prediction_cards = function(){
start_date = today() - 12 * 7 # last 12 weeks
start_date = today() - 100 * 7 # last 12 weeks

forecasters = get_covidhub_forecaster_names()

Expand Down Expand Up @@ -79,7 +79,8 @@ create_prediction_cards = function(){
predictions_cards = predictions_cards_new
}
predictions_cards = predictions_cards %>%
filter(forecast_date >= start_date)
filter(forecast_date >= start_date) %>%
filter(!is.na(predictions_cards$target_end_date))

# Hack: must change the response data source to be USAFacts, as JHU-CSSE data is
# currently unstable. **TODO**: we shouldn't require `evaluate_predictions()` to
Expand Down
Binary file modified Report/predictions_cards.rds
Binary file not shown.
3 changes: 1 addition & 2 deletions Report/score.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ library("dplyr")
library("lubridate")

create_score_cards = function(geo_type, signal_name = NULL, output_file_name = NULL){
start_date = today() - 12 * 7 # last 12 weeks
if (!exists("predictions_cards")){
predictions_cards = readRDS("predictions_cards.rds")
}
Expand Down Expand Up @@ -80,7 +79,7 @@ create_score_cards = function(geo_type, signal_name = NULL, output_file_name = N
} else {
score_cards = score_cards_new
}
score_cards = score_cards %>% filter(forecast_date >= start_date)
# score_cards = score_cards %>% filter(forecast_date >= start_date)

saveRDS(score_cards,
file = output_file_name,
Expand Down
Binary file modified Report/score_cards_state_cases.rds
Binary file not shown.
Binary file modified Report/score_cards_state_deaths.rds
Binary file not shown.