spatialIMD_map: Map the spatial distribution of IMD for a life stage

View source: R/spatialIMD_map.R

spatialIMD_mapR Documentation

Map the spatial distribution of IMD for a life stage

Description

Map the spatial distribution of IMD for a life stage based on temperature from ROMS model output

Usage

spatialIMD_map(
  sf_imd,
  subtitle = "",
  scale_type_imd = "b",
  breaks_imd = ggplot2::waiver(),
  limits_imd = NULL,
  scale_type_temp = "c",
  breaks_temp = ggplot2::waiver(),
  limits_temp = NULL,
  bbx = wtsGIS::getStandardBBox("EBS"),
  land = wtsGIS::getPackagedLayer("Alaska"),
  bath = wtsGIS::getPackagedLayer("ShelfBathymetry"),
  doHist = TRUE,
  doTemp = TRUE,
  horiz = TRUE
)

Arguments

sf_imd

- sf dataframe with IMD info (i.e., from [spatialIMD_calc])

subtitle

- subtitle for map

scale_type_imd

- fill scale type ("d","c","b") for IMD (default is "b"–binned)

breaks_imd

- vector of values to use as breaks in scale for IMDs

limits_imd

- limits to use when plotting IMD values

scale_type_temp

- fill scale type ("d","c","b") for temperatures (default is "c"–continuous)

breaks_temp

- vector of values to use as breaks in scale for temperatures

limits_temp

- limits to use when plotting temperature values

bbx

- sf-style bounding box

doHist

- include histogram of IMD values as inset on IMD map

doTemp

- add map of temperatures

horiz

- flag (TRUE/FALSE) to arrange temperature, IMD maps horizontally

Details

If an input limit (limit_imd, limit_temp) is NULL, the resulting scale limit is: 1) based on the range of the data if the corresponding breaks is set to ggplot2::waiver() or 2) equal to c(min(breaks),max(breaks)) if breaks is a numeric vector.

Value

ggplot2 map object or gg list object


wStockhausen/rIBMS_SnowCrab documentation built on March 30, 2022, 2:54 p.m.