Suitable Habitat Functions

Main functions for accessing habitat suitability estimates (model outputs) for a particular reach/mainstem/watershed

habitat_predict()

Predict Habitat Area using a Flow-to-Suitable-Area Curve

habitat_fsa()

Create Flow-To-Suitable-Area Curve for Reach, Mainstem, or Watershed

habitat_fsa_reach()

Create Flow-To-Suitable-Area-Curve for Individual Reach (unscaled)

habitat_fsa_reach_scaled()

Create Flow-To-Suitable-Area Curve for Individual Reach (scaled by multiplier)

habitat_drc()

Create Duration Suitability Rating Curve for a streamgage

habitat_drc_weighted()

Create Duration Suitability Rating Curve for a streamgage (scaled to prediction point by drainage area and precipitation)

habitat_fsa_duration()

Create Flow-To-Suitable-Area Curve (with Duration HSI applied) for Reach, Mainstem, or Watershed

habitat_fsa_duration_reach()

Create Flow-To-Suitable-Area Curve (with Duration HSI applied) for Reach

Datasets

Packaged datasets including geometries, attributes, and habitat suitability estimates (model outputs) for all reaches/mainstems/watersheds

flowline_attr

NHD Flowline (ComID) Attributes

flowline_geom

NHD Flowline (ComID) Geometries

flowline_geom_proj

NHD Flowline (ComID) Geometries - Projected

flowline_spawning_attr

NHD Flowline (ComID) Spawning Suitability Flags

wua_hydraulic

Suitable Habitat Area per Linear Ft by ComID by Flow (training dataset)

wua_hydraulic_interp

Suitable Habitat Area per Linear Ft by ComID by Flow (training dataset, interpolated)

wua_predicted

Suitable Habitat Area per Linear Ft by ComID by Flow (predicted by statistical model)

wua_predicted_cv_mainstems

Suitable Habitat Area per Linear Ft by CV Mainstem by Flow (predicted by statistical model)

wua_predicted_cv_watersheds

Suitable Habitat Area/LF by CV Watershed by Flow (predicted by statistical model)

cv_mainstems

CVPIA Mainstems (geometry)

cv_mainstems_flow_xw

Flow Area Crosswalk for CV Mainstems

cv_watersheds

CVPIA Watersheds (geometry)

cv_watersheds_flow_xw

Flow Area Crosswalk for CV Watersheds

hqt

HQT Valley Lowland Polygon

streamgage_attr

CDEC Mainstem Streamgage Attributes

streamgage_da_attr

CDEC Mainstem Streamgage Drainage Area Attributes

streamgage_duration_rating_curves

CDEC Mainstem Streamgage Duration Rating Curves

streamgage_geom

CDEC Mainstem Streamgage Point Geometries

Suitability Criteria Functions

Supporting functions for assembling the training dataset and calculating depth/velocity suitability criteria

vector_calculate_hsi()

Calculate HSI for each row of SRH-2D results

vector_dvhsi_hqt()

Vector Habitat Suitability Index (HSI) function: HQT

vector_dvhsi_lyr()

Vector Habitat Suitability Index (HSI) function: LYR

vector_dvhsi_spawning()

Vector Habitat Suitability Index (HSI) function: Fall-Run Chinook Spawning

vector_import_srh2d()

Import tabular SRH-2D results

vector_prep_mesh()

Prep SRH-2D mesh, assigning groups and calculating areas

vector_summarize_hsi()

Summarize habitat suitability for SRH-2D results

raster_dvhsi_hqt()

Raster Habitat Suitability Index (HSI) function: HQT

raster_dvhsi_lyr()

Raster Habitat Suitability Index (HSI) function: LYR

raster_dvhsi_spawning()

Raster Habitat Suitability Index (HSI) function: Fall-Run Chinook Spawning

raster_first_inundating_flow()

Calculate First Inundating Flow

raster_prep_grid()

Prep depth and velocity raster stacks

raster_summarize_hsi()

Calculate HSI based on HEC-RAS 2D rasters

suitability_hsi_vel_spawning

Velocity suitability criteria for spawning by run

suitability_measure_flowline_lengths()

Flowline length helper function: Extract NHD flowlines that correspond to groups and calculate length

suitability_postprocess()

Postprocessor for both SRH-2D and HEC-RAS results, applying linear ft normalization by group

Duration Time Series Functions

Supporting functions for processing time series data and calculating/applying duration suitability criteria

duration_apply_dhsi_to_fsa_curve()

Apply Duration HSI to Flow-to-Suitable-Area Curve

duration_calc_days_inundated()

Calculate Days Inundated

duration_hsi_rearing_vf()

Rearing Duration HSI for Valley Foothill

duration_hsi_rearing_vl()

Rearing Duration HSI for Valley Lowland

duration_hsi_spawning()

Spawning Duration HSI

flow_threshold_remove_baseflow()

Remove Baseflow via Flow Threshold (Single)

flow_threshold_remove_baseflow_apply()

Remove Baseflow via Flow Threshold (Multiple)

flow_threshold_split()

Split Flow-to-Suitable-Area Curve at Flow Threshold (Helper Function)

flow_threshold_split_apply()

Split Flow-to-Suitable-Area Curve at Flow Threshold

Utilities

Supporting functions for data analysis and spatial processing

linterp()

Simple Linear Interpolation

pinterp()

Simple Power Series Interpolation

glimpse_plot()

Glimpse plot

drive_file_by_id()

Download Data from Google Drive

cdec_csv_parse()

Parse CDEC CSV

cdec_csv_retrieve()

Retrieve CDEC CSV

st_coalesce()

Spatial coalesce

st_identity()

Spatial identity

st_morph_close()

Morphological closing for vector polygon geometry (eliminate scraps)

st_morph_open()

Morphological opening for vector polygon geometry (eliminate holes)

perpendicular_transect()

Perpendicular Transect (helper function for perpendicular_transects)

perpendicular_transects()

Create Perpendicular Transects from Line

Constants

Constants used across the package back-end

const_proj_crs()

Project CRS