Closed lindsayplatt closed 1 year ago
Simple adjustment, though the prism data had to rebuild which was fairly lengthy. Sped up by using the tar_make_clustermq() function.
tar_make_clustermq()
Maps of the new watershed & updated view of p4_prism_summary_boxes target.
p4_prism_summary_boxes
Merging! Only making PRs as a way to track progress but I am working solo on this repo for now.
Simple adjustment, though the prism data had to rebuild which was fairly lengthy. Sped up by using the
tar_make_clustermq()
function.Maps of the new watershed & updated view of
p4_prism_summary_boxes
target.Code to recreate maps
```r library(targets) library(tidyverse) library(sf) crs_to_map <- st_crs(tar_read(p2_lake_superior_watershed_dissolved)) # Creating grids and determining which to use ggplot() + geom_sf(data = tar_read(p2_lake_superior_watershed_dissolved), fill=NA, lwd=1) + geom_sf(data = st_transform(tar_read(p1_huc10_nwis_sites), crs = crs_to_map), fill="grey", color=NA) + geom_sf(data = tar_read(p2_lake_superior_watershed_grid_all), fill=NA) + geom_sf(data = tar_read(p2_lake_superior_watershed_grid_sf), aes(color = huc), fill=NA, lwd=1) + theme(panel.background = element_rect(fill='white')) + coord_sf() + ggtitle('Grid cells over Lake Superior AOI', subtitle = 'Cells that overlap with the 4 HUCs are highlighted') # Calculating precip per HUC ggplot() + geom_sf(data = tar_read(p2_lake_superior_watershed_grid_sf), alpha = 0.5, lwd=1, aes(fill=huc_frac, color=huc)) + geom_sf(data = st_transform(tar_read(p1_huc10_nwis_sites), crs=st_crs(tar_read(p2_lake_superior_watershed_dissolved))), aes(group = huc10), fill=NA, color="black", lwd=1) + scico::scale_fill_scico(begin=0.25) + theme_bw() + ggtitle("Fraction of cell overlapping with the watershed", subtitle="Fraction x Precip of each grid cell = amount of precip added to get HUC total") ```