Skip to content

Commit

Permalink
Censor first value of MB hosp/ICU admission dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanpaulrsoucy committed Nov 1, 2023
1 parent 594d170 commit ff43095
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions R/assemble_final_datasets.R
Original file line number Diff line number Diff line change
Expand Up @@ -743,8 +743,10 @@ assemble_final_datasets <- function() {
hosp_admissions_pt <- collate_datasets("hosp_admissions") %>%
dataset_format("pt")

## censor daily value for first date of NT
## censor daily value for first date of several PTs: MB, NT
## cumulative values are given but time series does not start at the beginning
hosp_admissions_pt[
hosp_admissions_pt$region == "MB" & hosp_admissions_pt$date == as.Date("2020-05-16"), "value_daily"] <- NA
hosp_admissions_pt[
hosp_admissions_pt$region == "NT" & hosp_admissions_pt$date == as.Date("2021-08-25"), "value_daily"] <- NA

Expand Down Expand Up @@ -787,8 +789,10 @@ assemble_final_datasets <- function() {
icu_admissions_pt <- collate_datasets("icu_admissions") %>%
dataset_format("pt")

## censor daily value for first date of NT
## censor daily value for first date of several PTs: MB, NT
## cumulative values are given but time series does not start at the beginning
icu_admissions_pt[
icu_admissions_pt$region == "MB" & icu_admissions_pt$date == as.Date("2020-05-16"), "value_daily"] <- NA
icu_admissions_pt[
icu_admissions_pt$region == "NT" & icu_admissions_pt$date == as.Date("2021-09-08"), "value_daily"] <- NA

Expand Down

0 comments on commit ff43095

Please sign in to comment.