Skip to content

Commit

Permalink
implimented potential SK simulation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
holysheets authored Mar 22, 2020
1 parent da22e11 commit bb9fc68
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions scenarios/NPI_Scenario3_SouthKorea.R
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit bb9fc68

Please sign in to comment.