View source: R/viz_structures.R
viz_structures | R Documentation |
Visualize impacts on structures from bathtub inundation modeling
viz_structures( model_output, model, elev, type_column = NULL, filter_value = NULL, type = "plot", hide_labels = F, simplify_labels = T, label_size = 2, xmin = -3, xmax = 4, filename = NULL, workspace, ... )
model_output |
A 'bathtub' model output item |
model |
A 'bathtub' model item |
elev |
The DEM used in modeling inundation created by 'setup_DEM' |
type_column |
Column in model item that indicates the type of structures. Default is NULL |
filter_value |
Type of structure (as string) to select from 'type_column'. Multiple values should be put in vector (i.e., using c() ). Default is NULL |
type |
Static "plot" or "interactive_map" |
hide_labels |
Hide labels of column values? T or F, default is F |
simplify_labels |
Simplify labels of column values? T or F, default is T |
label_size |
Size of labels, default is 2 |
xmin |
Set the minimum value of the x axis |
xmax |
Set the maximum value of x axis |
filename |
Name of the plot. Will be stored in the 'bathtub_output/figures/ |
workspace |
Path to bathtub output folder |
A ggplot
plot (type = "plot") or mapview
map (type = "interactive_map") of structures impacted during inundation modeling
bft_plot <- viz_structures(model_output = bft_model_output, model = bft_model_1D, elev = raster::raster(bft_elev), type_column = "Code", filter_value = c("D_I", "C_B"), type = "plot", hide_labels = T, simplify_labels = T, label_size = 2, filename = "bft_structures_impact_plot.png", workspace = workspace, panel.grid = element_blank())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.