Skip to content

Commit

Permalink
Censor seemingly erroneous BC hosp/ICU occupancy data
Browse files Browse the repository at this point in the history
- ccodwg/CovidTimelineCanada#82
- Censor BC hosp/ICU occupancy data on the following dates: 2021-04-01, 2021-05-05, 2022-04-28, 2022-08-18
  • Loading branch information
jeanpaulrsoucy committed Oct 31, 2023
1 parent d51b72b commit 04833eb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions R/assemble_final_datasets.R
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,9 @@ assemble_final_datasets <- function() {
read_d("raw_data/reports/bc/bc_monthly_report.csv") |>
report_pluck("hospitalizations", "active_hospitalizations", "value", "pt")
)
# remove seemingly erroneous data (unexplained spikes)
hospitalizations_bc <- hospitalizations_bc[
!hospitalizations_bc$date %in% as.Date(c("2021-04-01", "2021-05-05", "2022-04-28", "2022-08-18")), ]

## mb
hospitalizations_mb <- dplyr::bind_rows(
Expand Down Expand Up @@ -576,12 +579,16 @@ assemble_final_datasets <- function() {
## bc
icu_bc <- dplyr::bind_rows(
# daily news release has an ICU case on 2020-03-10, but this value is not regularly reported until later
# so it is excluded here
get_covid19tracker_d("icu", "BC", from = "2020-03-17", to = "2021-03-12"),
read_d("raw_data/static/bc/bc_icu_hr_ts.csv") |>
agg2pt(raw = TRUE),
read_d("raw_data/reports/bc/bc_monthly_report.csv") |>
report_pluck("icu", "active_icu", "value", "pt")
)
# remove seemingly erroneous data (unexplained spikes)
icu_bc <- icu_bc[
!icu_bc$date %in% as.Date(c("2021-04-01", "2021-05-05", "2022-04-28", "2022-08-18")), ]

## mb
icu_mb <- dplyr::bind_rows(
Expand Down

0 comments on commit 04833eb

Please sign in to comment.