Skip to content

Commit

Permalink
filtering reference_datetime in dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
rqthomas committed Aug 31, 2024
1 parent cd651dd commit 12faa1c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dashboard/stage_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ cutoff <- Sys.Date() - lubridate::days(2)

reference_datetimes_P1D <- s3_summaries_P1D |>
select(reference_datetime, variable) |>
filter(reference_datetime < cutoff) |>
summarize(reference_datetime = max(reference_datetime), .by = "variable")

df_P1D <- s3_summaries_P1D |>
Expand All @@ -28,6 +29,7 @@ s3_summaries_P1W <- open_dataset(paste0("s3://", config$forecasts_bucket,"/bundl

reference_datetimes_P1W <- s3_summaries_P1W |>
select(reference_datetime, variable) |>
filter(reference_datetime < cutoff) |>
summarize(reference_datetime = max(reference_datetime), .by = "variable")

s3_summaries_P1W |>
Expand Down

0 comments on commit 12faa1c

Please sign in to comment.