Skip to contents

This function takes an sfnetwork or sf shape, a set of surveys, and optionally a set of georeferenced redds observations, and returns a data set with the effort assigned to each reach and the count types associated with that observation date.

Usage

AssembleReddData(
  shape,
  georedds = NA,
  georedds.type = NA,
  georedds.coords = NA,
  reddcrs = "wgs84",
  tolerance.redds = 250,
  tolerance.surveys = 10,
  surveys,
  survey.redds = NA,
  dist.units
)

Arguments

shape

A sf object with LINESTRING geometries, or a sfnetwork

georedds

An optional dataframe with coordinates for each redd observation

georedds.type

An optional name for the column with classification of redds

georedds.coords

A character vector with the column names for lon/lat in georedds

reddcrs

A crs for the coordinates in georedds

tolerance.redds

A maximum distance for snapping redds to the shape

tolerance.surveys

A maximum distance for snapping surveys to the shape (should be small)

surveys

A sf object with LINESTRINGs representing surveys

survey.redds

optional name of a column with survey counts

dist.units

a character string for the units

Value

a dataframe with dates, counts, and effort for each surveyed location

Details

Error Note: can cause reach numbers to be misassigned under some circumstances Need to investigate further and then fix. In meantime, always be sure to check outputs.