From bb9fc68aea7a6eeadd412747439ebf5d4b8e8b4a Mon Sep 17 00:00:00 2001 From: holysheets <47127171+holysheets@users.noreply.github.com> Date: Sat, 21 Mar 2020 20:01:08 -0600 Subject: [PATCH] implimented potential SK simulation fix --- scenarios/NPI_Scenario3_SouthKorea.R | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/scenarios/NPI_Scenario3_SouthKorea.R b/scenarios/NPI_Scenario3_SouthKorea.R index edd8ea5..d393d01 100644 --- a/scenarios/NPI_Scenario3_SouthKorea.R +++ b/scenarios/NPI_Scenario3_SouthKorea.R @@ -1,16 +1,12 @@ ## create matrix for counties starting social distancing based on South Korea R0 reductions +##we're actually hardcoding this, but here's a dummy file. ## R0 in SK .6-1.3, mid 2-3 - library(dplyr) +# West coast county.status <- read.csv(paste0(foldername,'geodata.csv')) dates <- seq.Date(as.Date(ti_str), as.Date(tf_str), 1) NPI <- as.data.frame(matrix(0, dim(county.status)[1],length(dates))) colnames(NPI) <- as.Date(dates) rownames(NPI) <- county.status$geoid - -## Introducing NPI: randomly assign a pc value to each county based on Bootsma paper values -NPI[ , colnames(NPI) >= as.Date("2020/03/19") & colnames(NPI) <= as.Date("2020/05/14") ] <- 1 -county.status$pc <- replicate(dim(county.status)[1], runif(dim(county.status)[1], 1.4, 1.7)) -NPI <- NPI * county.status$pc