LimnoDataScience / plume_bloom_drivers

Using classified raster images and meteo drivers to try to better understand what is causing sediment plumes and blooms in Lake Superior
1 stars 1 forks source link

Add St. Louis watershed & commit `run_pipeline.R` #9

Closed lindsayplatt closed 1 year ago

lindsayplatt commented 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.

Maps of the new watershed & updated view of p4_prism_summary_boxes target.

image

image

image

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") ```
lindsayplatt commented 1 year ago

Merging! Only making PRs as a way to track progress but I am working solo on this repo for now.