plotCSSS: Create tables and maps of discontinuous hydroperiod (focus on...

View source: R/plotCSSS.R

plotCSSSR Documentation

Create tables and maps of discontinuous hydroperiod (focus on Cape Sable Seaside Sparrow criteria)

Description

Calculates discontinuous hydroperiod for cells within a polygon and creates figures showing discontinuous hydroperiod (days dry) for the time period covered by the input EDEN dataset.

Usage

plotCSSS(
  areaOfInterest,
  EDEN_data,
  elevation_offset = 0,
  plotOutput = NULL,
  plotTitle = NULL,
  categoryColors = c("#eff3ff", "#9ecae1", "#3182bd")
)

Arguments

areaOfInterest

SpatialPolygonDataFrame for population of interest. CSSS habitat shapefiles are available from the RSM package (https://github.com/troyhill/RSM). See usage example below.

EDEN_data

EDEN water depth data (units = cm w.r.t. soil surface), downloaded using fireHydro package (https://github.com/troyhill/fireHydro). See usage example below. This input is used in its entirety; no subsetting is done in the function.

elevation_offset

Elevation offset for determining inundation (units = cm). To quantify hydroperiod at ground surface + 17 cm, use 'elevation_offset = 17'.

plotOutput

If the categorical plot should be saved, use this argument to set the filename (include any extension, e.g. "plot.png").

plotTitle

Optional title for plot. If NULL, title is produced automatically and includes the date range in the EDEN data

categoryColors

colors to be used for the discontinuous hydroperiod categories (corresponding to this order: 0 days dry, 1-89 days, 90-210 days, and >210 days)

Value

list plotCSS returns a list with the calculated discontinuous hydroperiods, both raw and binned into the categories noted above (0 days dry, 1-89 days, 90-210 days, and >210 days), and a table with the days dry in each category.

Examples

## Not run: 
### CSSS population shapefiles are available in RSM package
### EDEN API available from fireHydro package

csss    <- vect(system.file("extdata/gis/misc", package = "RSM"), layer = "CSSS")
subpopA <- csss[6, ]
eden_input <- fireHydro::getAnnualEDEN(2021)
plotFileName  <- "subA_discontinuous_calendar_2021.png"

plotCSSS(areaOfInterest = subpopA, 
   EDEN_data = eden_input, 
   plotTitle = plotFileName)



## End(Not run)



troyhill/EvergladesEBM documentation built on Nov. 19, 2023, 8:39 a.m.