Map cumulative case detections across all iterations by scenario
Create Raster Grids
Prepare to plot outbreak maps. First, get shapefile and set region boundaries. Then, create a raster grid version. Code demonstrates the workflow for the Eastern U.S. region. Outbreak maps for the Central U.S. are included below.
Region Boundaries
Get shapefile and subset to region
Code
## Get shapefile for conterminous U.S.whole_us <-vect(here("script-inputs/shapefile/Contiguous_USA_for Regional_Model.shp")) ## Boundaries for eastern U.S.eastern_us <-subset(whole_us, whole_us$SUB_REGION %in%c("East North Central", "East North Central", "East South Central", "east South Central","New England", "Middle Atlantic", "South Atlantic"))
Create Raster Grid
Create a raster grid version for each region
Code
tmp_r <-rast(ext(eastern_us), resolution =25000, # 25km gridcrs =crs(eastern_us))east_r <-rasterize(eastern_us, tmp_r)east_r[east_r ==1] <-0# set land areas to 0
Cumulative Cases
Count Cumulative Case Detections
raster_point_counts() will count the number of detection events in each 25km cell. Smoothing the raster will improve the appearance by making the cells smaller and finding averages of surrounding cells.