@@ -321,16 +321,15 @@ server <- function(input, output, session) {
321
321
322
322
# Get most recent target end date
323
323
# Prev Saturday for Cases and Deaths, prev Wednesday for Hospitalizations
324
- # Since we don't upload new observed data until Monday:
325
- # Use 8 and 2 for Cases and Deaths so that Sundays will not use the Saturday directly beforehand
326
- # since we don't have data for it yet.
327
- # Use 5 and 11 for Hospitalizations since Thurs-Sun should also not use the Wednesday directly beforehand.
328
- # (This means that on Mondays until the afternoon when pipeline completes, the "as of" will show
329
- # most recent Saturday / Wednesday date even though the actual updated data won't be there yet)
330
- prevWeek <- seq(Sys.Date()- 8 ,Sys.Date()- 2 ,by = ' day' )
324
+ # Since we don't upload new observed data until Sunday:
325
+ # Use 7 and 1 for Cases and Deaths so that Sundays will use the Saturday directly beforehand.
326
+ # Use 4 and 10 for Hospitalizations since Thurs-Sat should not use the Wednesday directly beforehand.
327
+ # (This means that on Sundays until the afternoon when the pipeline completes, the "as of" will show
328
+ # the most recent Saturday / Wednesday date even though the actual updated data won't be there yet)
329
+ prevWeek <- seq(Sys.Date()- 7 ,Sys.Date()- 1 ,by = ' day' )
331
330
CASES_DEATHS_CURRENT = prevWeek [weekdays(prevWeek )== ' Saturday' ]
332
331
CURRENT_WEEK_END_DATE = reactiveVal(CASES_DEATHS_CURRENT )
333
- prevHospWeek <- seq(Sys.Date()- 11 ,Sys.Date()- 5 ,by = ' day' )
332
+ prevHospWeek <- seq(Sys.Date()- 10 ,Sys.Date()- 4 ,by = ' day' )
334
333
HOSP_CURRENT = prevHospWeek [weekdays(prevHospWeek )== ' Wednesday' ]
335
334
336
335
# Get scores
0 commit comments