tmap_MapGrowthRate: Create a 'tmap'-style map of growth rates

Description Usage Arguments Details Value

View source: R/tmap_MapGrowthRate.R

Description

Function to create a tmap-style map of growth rates.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
tmap_MapGrowthRate(
  sf_dfr = NULL,
  rate_col = "growth_rate",
  label = "growth rate (1/day)",
  palette = NULL,
  basemap = NULL,
  rateFcn = postflexionLarvae_GrowthRate_WW,
  roms_grid = wtsROMS::getGrid("CGOA"),
  roms_mo = "~/Work/Projects/ROMS/CGOA/cgoa_avg_0005.nc",
  timeslice = 1,
  vertical_layer = 1
)

Arguments

sf_dfr

- sf-style dataframe with rate information (or NULL)

rate_col

- name of column with rate information (default="growth_rate")

label

- label for map legend (default = "growth rate (1/day)")

palette

- palette for growth info (default = NULL to use palette of basemap)

basemap

- tmap-style basemap to plot growth rates on top of

rateFcn

- temperature-dependent rate function to use (if sf_dfr is NULL)

roms_grid

- sf dataframe representing a ROMS grid object (if sf_dfr is NULL)

roms_mo

- sf dataframe representing a ROMS model object, or path to a ROMS model netcdf file (if sf_dfr is NULL)

timeslice

- time slice to extract (if roms_mo is a file path) (if sf_dfr is NULL)

vertical_layer

- vertical layer to extract (if roms_mo is a file path) (if sf_dfr is NULL)

Details

If sf_dfr is NULL, then spatially-explicit growth rates are calculated using the rateFcn and associated information, then mapped.

@note This function can also map other spatially-explicit values by correctly specifying the rateCol for the input sf_dfr.

Value

tmap-style map of growth rates


wStockhausen/rPacificCod documentation built on March 25, 2021, 2:39 p.m.