Open glenncampagna opened 1 year ago
I had success producing this image (code used is here: https://github.com/HARPgroup/vahydro/issues/941#issuecomment-1843225038)
Dataframe_Generator.Rmd
:
rmarkdown::render("C:/aa_HARP/aa_GitHub/HARParchive/HARP-2023-Summer/Mapping/Dataframe_Generator.Rmd",
params = list(
origin = "BigSandy_UpperTennessee_1",
origin_type = "region",
featr_type = "facility",
metric_mod = "wd_mgd",
model_version = "vahydro-1.0",
metric_feat = "wsp2020_2040_mgy",
rivseg_metric = c("l30_Qout", "7q10", "Smin_L30_mg"),
runid_list = c("runid_11", "runid_13", "runid_17"),
crs_default = 4326,
limit_featrs_to_origin = FALSE,
overwrite_files = TRUE,
base_layer_data = FALSE))
WSP_RegionalSummaries.Rmd
:
rmarkdown::render("C:/aa_HARP/aa_GitHub/HARParchive/HARP-2023-Summer/Mapping/WSP_Regional_Summaries.Rmd",
output_file = "C:/aa_HARP/Exports/bigsandy_ut_postorganize",
output_format = "word_document",
params = list(
origin = "BigSandy_UpperTennessee_1",
origin_type = "region",
featr_type = "facility",
featrs_file = "C:/aa_HARP/Exports/BigSandy_UpperTennessee_1_featrs_sf.csv",
featrs_file_map_bubble_column = "wsp2020_2040_mgy",
featrs_file_table_column = c("runid_11_wd_mgd","runid_13_wd_mgd","five_yr_avg","wsp2020_2040_mgy"),
rsegs_file = "C:/aa_HARP/Exports/BigSandy_UpperTennessee_1_rsegs_sf.csv",
run_set = "wsp_2020_2040",
runid_list = c("runid_11", "runid_13"),
crs_default = 4326,
map_style = "custom",
bbox_type = "auto",
show_map = TRUE))
Successful runs with new runset addition:
Using the following general renders (Ella):
rmarkdown::render("C:/HARP//HARParchive/HARP-2023-Summer/Mapping/Dataframe_Generator.Rmd",
params = list(
origin = "JL6_7430_7320",
origin_type = "basin",
featr_type = "facility",
metric_mod = "wd_mgd",
model_version = "vahydro-1.0",
metric_feat = "wsp2020_2040_mgy",
rivseg_metric = c("l30_Qout", "7q10", "Smin_L30_mg"),
runid_list = c("runid_11", "runid_13", "runid_17", "runid_19"),
crs_default = 4326,
limit_featrs_to_origin = FALSE,
overwrite_files = TRUE,
base_layer_data = FALSE))
rmarkdown::render("C:/HARP/HARParchive/HARP-2023-Summer/Mapping/WSP_Regional_Summaries.Rmd",
output_file = "C:/HARP/Exports/Shenandoah_1test",
output_format = "word_document",
params = list(
origin = "Shenandoah_1",
origin_type = "region",
featr_type = "facility",
featrs_file = "C:/HARP/Exports/Shenandoah_1_featrs_sf.csv",
featrs_file_map_bubble_column = "wsp2020_2040_mgy",
featrs_file_table_column = c("runid_11_wd_mgd","runid_13_wd_mgd","five_yr_avg","wsp2020_2040_mgy"),
rsegs_file = "C:/HARP/Exports/Shenandoah_1_rsegs_sf.csv",
run_set = "wsp_2020_2040",
runid_list = c("runid_11", "runid_13", "runid_17" ,"runid_19"),
crs_default = 4326,
map_style = "custom",
bbox_type = "auto",
show_map = TRUE))
rmarkdown::render(paste0(foundation_location,"\\OWS\\WSPA\\10_Yr Resubmission_2023\\WSP_Regional_Summaries.Rmd"),
output_file = paste0(export_path, "/JL6_7430_7320test"),
output_format = "word_document",
params = list(
origin = "JL6_7430_7320",
origin_type = "basin",
featr_type = "facility",
featrs_file = paste0(export_path, "/JL6_7430_7320_featrs_sf.csv"),
featrs_file_map_bubble_column = "wsp2020_2040_mgy",
featrs_file_table_column = c("runid_11_wd_mgd","runid_13_wd_mgd","five_yr_avg","wsp2020_2040_mgy"),
rsegs_file = paste0(export_path,"/JL6_7430_7320_rsegs_sf.csv"),
run_set = "wsp_2020_2040",
runid_list = c("runid_11", "runid_13", "runid_17" ,"runid_19"),
crs_default = 4326,
map_style = "custom",
bbox_type = "auto",
show_map = TRUE))
```)
Testing a county/locality.
Generate dataset:
rmarkdown::render(paste0(github_location,"/HARParchive/HARP-2023-Summer/Mapping/Dataframe_Generator.Rmd"),
params = list(
origin = "51073",
origin_type = "locality",
featr_type = "facility",
metric_mod = "wd_mgd",
model_version = "vahydro-1.0",
metric_feat = "wsp2020_2040_mgy",
rivseg_metric = c("l30_Qout", "7q10", "Smin_L30_mg"),
runid_list = c("runid_11", "runid_13", "runid_17"),
crs_default = 4326,
limit_featrs_to_origin = FALSE,
overwrite_files = TRUE,
base_layer_data = FALSE
)
)
Generate markdown:
rmarkdown::render(paste0(github_location,"/HARParchive/HARP-2023-Summer/Mapping/WSP_Regional_Summaries.Rmd"),
output_file = paste0(export_path, "51073_wsp"),
output_format = "word_document",
params = list(
origin = "51073",
origin_type = "locality",
featr_type = "facility",
featrs_file = paste0(export_path, "/51073_featrs_sf.csv"),
featrs_file_map_bubble_column = "wsp2020_2040_mgy",
featrs_file_table_column = c("runid_11_wd_mgd","runid_13_wd_mgd","five_yr_avg","wsp2020_2040_mgy"),
rsegs_file = paste0(export_path, "/51073_rsegs_sf.csv"),
run_set = "wsp_2020_2040",
runid_list = c("runid_11", "runid_13", "runid_17" ,"runid_19"),
crs_default = 4326,
map_style = "custom",
bbox_type = "auto",
show_map = TRUE))
rmarkdown::render(paste0(foundation_location,"\\OWS\\WSPA\\10_Yr Resubmission_2023\\WSP_Regional_Summaries.Rmd"),
output_file = paste0(export_path, "51073_wsp"),
output_format = "word_document",
params = list(
origin = "51073",
origin_type = "locality",
featr_type = "facility",
featrs_file = paste0(export_path, "/51073_featrs_sf.csv"),
featrs_file_map_bubble_column = "wsp2020_2040_mgy",
featrs_file_table_column = c("runid_11_wd_mgd","runid_13_wd_mgd","five_yr_avg","wsp2020_2040_mgy"),
rsegs_file = paste0(export_path, "/51073_rsegs_sf.csv"),
run_set = "wsp_2020_2040",
runid_list = c("runid_11", "runid_13", "runid_17" ,"runid_19"),
crs_default = 4326,
map_style = "custom",
bbox_type = "auto",
show_map = TRUE))
Using foundation_location and SharePoint: ( @ Planners )
Run this once per time you open R:
basepath='/var/www/R'
source('/var/www/R/config.R')
Df Generator Planners edit origin and origin_type
rmarkdown::render(paste0(onedrive_location,"\\OWS\\WSPA\\10_Yr Resubmission_2023\\Dataframe_Generator.Rmd"),
params = list(
origin = "51073",
origin_type = "locality",
featr_type = "facility",
metric_mod = "wd_mgd",
model_version = "vahydro-1.0",
metric_feat = "wsp2020_2040_mgy",
rivseg_metric = c("l90_Qout", "l30_Qout", "7q10", "Smin_L30_mg"),
runid_list = c("runid_11", "runid_13", "runid_17"),
crs_default = 4326,
limit_featrs_to_origin = FALSE,
overwrite_files = TRUE,
base_layer_data = FALSE
)
)
WSP Regional Summary Planners - edit output_file, origin, origin_type, featrs_file, and rsegs_file to match Df generator render
rmarkdown::render(paste0(onedrive_location,"\\OWS\\WSPA\\10_Yr Resubmission_2023\\WSP_Regional_Summaries.Rmd"),
output_file = paste0(export_path, "51073_wsp"),
output_format = "word_document",
params = list(
origin = "51073",
origin_type = "locality",
featr_type = "facility",
featrs_file = paste0(export_path, "/51073_featrs_sf.csv"),
featrs_file_map_bubble_column = "wsp2020_2040_mgy",
featrs_file_table_column = c("runid_11_wd_mgd","runid_13_wd_mgd","five_yr_avg","wsp2020_2040_mgy"),
rsegs_file = paste0(export_path, "/51073_rsegs_sf.csv"),
run_set = "wsp_2020_2040",
runid_list = c("runid_11", "runid_13", "runid_17" ,"runid_19"),
crs_default = 4326,
map_style = "custom",
bbox_type = "auto",
show_map = TRUE))
Modelers - can use github_location (see comment below) instead of onedrive_location for active testing
Generating Shenandoah for CIA exempt examination: (@EllaF21 see below for how to ask DataFRame Generator to get unmet30_mgd for facility models)
rmarkdown::render(paste0(github_location,"/HARParchive/HARP-2023-Summer/Mapping/Dataframe_Generator.Rmd"),
params = list(
origin = "Shenandoah_1",
origin_type = "region",
featr_type = "facility",
metric_mod = c("wd_mgd", "unmet1_mgd", "unmet7_mgd", "unmet30_mgd"),
model_version = "vahydro-1.0",
metric_feat = "wsp2020_2040_mgy",
rivseg_metric = c("l30_Qout", "7q10", "Smin_L30_mg"),
runid_list = c("runid_11", "runid_13", "runid_17", "runid_18"),
crs_default = 4326,
limit_featrs_to_origin = FALSE,
overwrite_files = TRUE,
base_layer_data = FALSE
)
)
rmarkdown::render(paste0(github_location,"/HARParchive/HARP-2023-Summer/Mapping/WSP_Regional_Summaries.Rmd"),
output_file = paste0(export_path, "Shenandoah_1_wsp"),
output_format = "word_document",
params = list(
origin = "Shenandoah_1",
origin_type = "region",
featr_type = "facility",
featrs_file = paste0(export_path, "/Shenandoah_1_featrs_sf.csv"),
featrs_file_map_bubble_column = "wsp2020_2040_mgy",
featrs_file_table_column = c("runid_11_wd_mgd","runid_13_wd_mgd","five_yr_avg","wsp2020_2040_mgy"),
rsegs_file = paste0(export_path, "/Shenandoah_1_rsegs_sf.csv"),
run_set = "wsp_2020_2040",
runid_list = c("runid_11", "runid_13", "runid_17" ,"runid_19"),
crs_default = 4326,
map_style = "custom",
bbox_type = "auto",
show_map = TRUE))
rmarkdown::render(paste0(github_location,"/HARParchive/HARP-2023-Summer/Mapping/Dataframe_Generator.Rmd"),
params = list(
origin = "Chowan_1",
origin_type = "region",
featr_type = "facility",
metric_mod = c("wd_mgd", "unmet1_mgd", "unmet7_mgd", "unmet30_mgd"),
model_version = "vahydro-1.0",
metric_feat = "wsp2020_2040_mgy",
rivseg_metric = c("l90_Qout", "l30_Qout", "7q10", "Smin_L30_mg"),
runid_list = c("runid_11", "runid_13", "runid_17"),
crs_default = 4326,
limit_featrs_to_origin = FALSE,
overwrite_files = TRUE,
base_layer_data = FALSE
)
)
rmarkdown::render(paste0(github_location,"/HARParchive/HARP-2023-Summer/Mapping/WSP_Regional_Summaries.Rmd"),
output_file = paste0(export_path, "Chowan_1_wsp"),
output_format = "word_document",
params = list(
origin = "Chowan_1",
origin_type = "region",
featr_type = "facility",
featrs_file = paste0(export_path, "/Chowan_1_featrs_sf.csv"),
featrs_file_map_bubble_column = "wsp2020_2040_mgy",
featrs_file_table_column = c("runid_11_wd_mgd","runid_13_wd_mgd","five_yr_avg","wsp2020_2040_mgy"),
rsegs_file = paste0(export_path, "/Chowan_1_rsegs_sf.csv"),
run_set = "wsp_2020_2040",
runid_list = c("runid_11", "runid_13", "runid_17"),
crs_default = 4326,
map_style = "custom",
bbox_type = "auto",
show_map = TRUE))
rmarkdown::render(paste0(github_location,"/HARParchive/HARP-2023-Summer/Mapping/Dataframe_Generator.Rmd"),
params = list(
origin = "Shenandoah_1",
origin_type = "region",
featr_type = "facility",
metric_mod = c("wd_mgd", "unmet1_mgd", "unmet7_mgd", "unmet30_mgd"),
model_version = "vahydro-1.0",
metric_feat = "wsp2020_2040_mgy",
rivseg_metric = c("l90_Qout", "l30_Qout", "7q10", "Smin_L30_mg"),
runid_list = c("runid_11", "runid_13", "runid_17"),
crs_default = 4326,
limit_featrs_to_origin = FALSE,
overwrite_files = TRUE,
base_layer_data = FALSE
)
)
Render:
rmarkdown::render(paste0(github_location,"/HARParchive/HARP-2023-Summer/Mapping/WSP_Regional_Summaries.Rmd"),
output_file = paste0(export_path, "Shenandoah_1_wsp"),
output_format = "word_document",
params = list(
origin = "Shenandoah_1",
origin_type = "region",
featr_type = "facility",
featrs_file = paste0(export_path, "/Shenandoah_1_featrs_sf.csv"),
featrs_file_map_bubble_column = "wsp2020_2040_mgy",
featrs_file_table_column = c("runid_11_wd_mgd","runid_13_wd_mgd","five_yr_avg","wsp2020_2040_mgy"),
rsegs_file = paste0(export_path, "/Shenandoah_1_rsegs_sf.csv"),
run_set = "wsp_2020_2040",
runid_list = c("runid_11", "runid_13", "runid_17"),
crs_default = 4326,
map_style = "custom",
bbox_type = "auto",
show_map = TRUE))
Big Sandy
rmarkdown::render(paste0(github_location,"/HARParchive/HARP-2023-Summer/Mapping/Dataframe_Generator.Rmd"),
params = list(
origin = "BigSandy_UpperTennessee_1",
origin_type = "region",
featr_type = "facility",
metric_mod = c("wd_mgd", "unmet1_mgd", "unmet7_mgd", "unmet30_mgd"),
model_version = "vahydro-1.0",
metric_feat = "wsp2020_2040_mgy",
rivseg_metric = c("l90_Qout", "l30_Qout", "7q10", "Smin_L30_mg"),
runid_list = c("runid_11", "runid_13", "runid_17"),
crs_default = 4326,
limit_featrs_to_origin = FALSE,
overwrite_files = TRUE,
base_layer_data = FALSE
)
)
Render
rmarkdown::render(paste0(github_location,"/HARParchive/HARP-2023-Summer/Mapping/WSP_Regional_Summaries.Rmd"),
output_file = paste0(export_path, "BigSandy_UpperTennessee_1"),
output_format = "word_document",
params = list(
origin = "BigSandy_UpperTennessee_1",
origin_type = "region",
featr_type = "facility",
featrs_file = paste0(export_path, "/BigSandy_UpperTennessee_1_featrs_sf.csv"),
featrs_file_map_bubble_column = "wsp2020_2040_mgy",
featrs_file_table_column = c("runid_11_wd_mgd","runid_13_wd_mgd","five_yr_avg","wsp2020_2040_mgy"),
rsegs_file = paste0(export_path, "/BigSandy_UpperTennessee_1_rsegs_sf.csv"),
run_set = "wsp_2020_2040",
runid_list = c("runid_11", "runid_13", "runid_17"),
crs_default = 4326,
map_style = "custom",
bbox_type = "auto",
show_map = TRUE))
Testing in NOVA origin_name <- "NorthernPiedmont_1"
rmarkdown::render(paste0(github_location,"/HARParchive/HARP-2023-Summer/Mapping/Dataframe_Generator.Rmd"),
params = list(
origin = "NorthernPiedmont_1",
origin_type = "region",
featr_type = "facility",
metric_mod = c("wd_mgd", "unmet1_mgd", "unmet7_mgd", "unmet30_mgd"),
model_version = "vahydro-1.0",
metric_feat = "wsp2020_2040_mgy",
rivseg_metric = c("l90_Qout", "l30_Qout", "7q10", "Qout", "Smin_L30_mg"),
runid_list = c("runid_11", "runid_13", "runid_17"),
baseline_runid_list = c("runid_1000", "runid_11"),
crs_default = 4326,
limit_featrs_to_origin = FALSE,
overwrite_files = TRUE,
base_layer_data = FALSE
)
)
rmarkdown::render(paste0(github_location,"/HARParchive/HARP-2023-Summer/Mapping/WSP_Regional_Summaries.Rmd"),
output_file = paste0(export_path, origin_name, "_wsp"),
# output_format = "word_document",
params = list(
origin = "NorthernPiedmont_1",
origin_type = "locality",
featr_type = "facility",
featrs_file = paste0(export_path, "/", origin_name, "_featrs_sf.csv"),
featrs_file_map_bubble_column = "wsp2020_2040_mgy",
featrs_file_table_column = c("Use_Type","runid_11_wd_mgd","runid_13_wd_mgd","wsp2020_2040_mgy"),
rsegs_file = paste0(export_path, "/", origin_name,"_rsegs_sf.csv"),
run_set = "wsp_2020_2040",
runid_list = c("runid_11", "runid_13", "runid_17", "runid_0"),
crs_default = 4326,
map_style = "custom",
bbox_type = "custom",
show_map = TRUE,
suppress_errors = TRUE
)
)
Occoquan (Northern Virginia)
rmarkdown::render(paste0(github_location,"/HARParchive/HARP-2023-Summer/Mapping/Dataframe_Generator.Rmd"),
params = list(
origin = "NorthernVirginia",
origin_type = "region",
featr_type = "facility",
metric_mod = c("wd_mgd", "unmet1_mgd", "unmet7_mgd", "unmet30_mgd"),
model_version = "vahydro-1.0",
metric_feat = "wsp2020_2040_mgy",
rivseg_metric = c("l90_Qout", "l30_Qout", "7q10", "Qout", "Smin_L30_mg"),
runid_list = c("runid_11", "runid_13", "runid_17"),
baseline_runid_list = c("runid_1000", "runid_11"),
crs_default = 4326,
limit_featrs_to_origin = FALSE,
overwrite_files = TRUE,
base_layer_data = FALSE
)
)
rmarkdown::render(paste0(github_location,"/HARParchive/HARP-2023-Summer/Mapping/WSP_Regional_Summaries.Rmd"),
output_file = paste0(export_path, origin_name, "_wsp"),
# output_format = "word_document",
params = list(
origin = "NorthernVirginia",
origin_type = "locality",
featr_type = "facility",
featrs_file = paste0(export_path, "/", origin_name, "_featrs_sf.csv"),
featrs_file_map_bubble_column = "wsp2020_2040_mgy",
featrs_file_table_column = c("Use_Type","runid_11_wd_mgd","runid_13_wd_mgd","wsp2020_2040_mgy"),
rsegs_file = paste0(export_path, "/", origin_name,"_rsegs_sf.csv"),
run_set = "wsp_2020_2040",
runid_list = c("runid_11", "runid_13", "runid_17", "runid_0"),
crs_default = 4326,
map_style = "custom",
bbox_type = "custom",
show_map = TRUE,
suppress_errors = TRUE
)
)
PL3_5250_0001
rmarkdown::render(paste0(github_location,"/HARParchive/HARP-2023-Summer/Mapping/Dataframe_Generator.Rmd"),
params = list(
origin = "PL3_5250_0001",
origin_type = "basin",
featr_type = "facility",
metric_mod = c("wd_mgd", "unmet1_mgd", "unmet7_mgd", "unmet30_mgd"),
model_version = "vahydro-1.0",
metric_feat = "wsp2020_2040_mgy",
rivseg_metric = c("l90_Qout", "l30_Qout", "7q10", "Qout", "Smin_L30_mg"),
runid_list = c("runid_11", "runid_13", "runid_17"),
baseline_runid_list = c("runid_1000", "runid_11"),
crs_default = 4326,
limit_featrs_to_origin = FALSE,
overwrite_files = TRUE,
base_layer_data = FALSE
)
)
origin_name = "PL3_5250_0001"
rmarkdown::render(paste0(github_location,"/HARParchive/HARP-2023-Summer/Mapping/WSP_Regional_Summaries.Rmd"),
output_file = paste0(export_path, origin_name, "_wsp"),
# output_format = "word_document",
params = list(
origin = "PL3_5250_0001",
origin_type = "basin",
featr_type = "facility",
featrs_file = paste0(export_path, "/", origin_name, "_featrs_sf.csv"),
featrs_file_map_bubble_column = "wsp2020_2040_mgy",
featrs_file_table_column = c("Use_Type","runid_11_wd_mgd","runid_13_wd_mgd","wsp2020_2040_mgy"),
rsegs_file = paste0(export_path, "/", origin_name,"_rsegs_sf.csv"),
run_set = "wsp_2020_2040",
runid_list = c("runid_11", "runid_13", "runid_17", "runid_0"),
crs_default = 4326,
map_style = "custom",
bbox_type = "auto",
show_map = TRUE,
suppress_errors = TRUE
)
)
Scripts:
Examples
Current Dataframe Generator for WSP Planners (updated 5/28/2024) - Regional Df
Current WSP Regional Summaries Render for WSP Planners (updated 5/28/24) - Regional
Current Dataframe Generator for WSP Planners (updated 5/28/2024) - Local Df
Basin examples: JL7_7070_0001 & JL6_7430_7320
Dataframe_Generator.Rmd
:WSP_RegionalSummaries.Rmd
:Region examples:
Dataframe_Generator.Rmd
:WSP_RegionalSummaries.Rmd
Locality examples:
Tables (Maps not working for localities):
Dataframe_Generator.Rmd
:WSP_RegionalSummaries.Rmd
:Using
run_set
:Dataframe_Generator.Rmd
:WSP_RegionalSummaries.Rmd
: