viz_structures: Visualize impacts on structures from bathtub inundation...

View source: R/viz_structures.R

viz_structuresR Documentation

Visualize impacts on structures from bathtub inundation modeling

Description

Visualize impacts on structures from bathtub inundation modeling

Usage

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,
  ...
)

Arguments

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

Value

A ggplot plot (type = "plot") or mapview map (type = "interactive_map") of structures impacted during inundation modeling

Examples

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())

acgold/floodr documentation built on Aug. 30, 2022, 11:17 a.m.