Main function to query the survey database

get_data(
  common = NULL,
  scientific = NULL,
  itis_id = NULL,
  regions = NULL,
  surveys = NULL,
  years = NULL
)

Arguments

common

A string, or vector of strings of common names for species. This is NULL by default, so that all species are returned.

scientific

A string, or vector of strings of scientific names for species. This is NULL by default, so that all species are returned.

itis_id

An integer or vector of integers corresponding to ITIS identifiers. This is NULL by default, so that all species are returned.

regions

A string, or vector of strings of common names for regions. May be one or more of "afsc", "nwfsc", "pbs". Surveys are nested within region, so returning data from a region will return more than one survey. This is NULL by default, so that all surveys are returned.

surveys

A string, or vector of strings of common names for surveys. May be one or more of "Aleutian Islands Bottom Trawl Survey", "Eastern Bering Sea Crab/Groundfish Bottom Trawl Survey", "Eastern Bering Sea Slope Bottom Trawl Survey", "Gulf of Alaska Bottom Trawl Survey", "Northern Bering Sea Crab/Groundfish Survey - Eastern Bering Sea Shelf Survey Extension", "NWFSC.Combo", "NWFSC.Shelf", "NWFSC.Hypoxia", "Triennial", "SYN QCS", "SYN HS", "SYN WCVI", "SYN WCHG". If NULL, all are returned.

years

a vector of years, e.g. year = 2013:2018. If NULL, all are returned.

Value

a dataframe of joined haul and catch data

  • event_id: Unique haul identifier.

  • itis: ITIS identifier for species.

  • catch_numbers: Numbers of fish for this haul - species.

  • catch_weight: Weight (kg) of fish for this haul - species.

  • region: Region this survey originated in ("pbs", "nwfsc", "afsc").

  • scientific_name: Scientific name for this species.

  • common_name: Common name for this species.

  • survey_name: Name of the survey this haul is part of.

  • date: String representation of the date, format YYYY-MM-DD.

  • pass: Optional pass identifier (1 or 2), only used for NWFSC surveys.

  • vessel: Optional unique vessel identifier, not included in all surveys.

  • lat_start: Starting latitude of haul, decimal degrees.

  • lon_start: Starting longitude of haul, decimal degrees.

  • lat_end: Ending latitude of haul, decimal degrees.

  • lon_end: Ending longitude of haul, decimal degrees.

  • depth_m: Haul bottom depth (meters).

  • effort: Amount of units corresponding to this haul.

  • effort_units: Units of effort.

  • performance: Optional performance indicator for each haul, not used for all surveys. If not indicated, assume performance is satisfactory

  • bottom_temp_c: Bottom temperature recorded at the gear, in degrees Celsius.

  • year: Calendar year corresponding to the haul.

Examples

if (FALSE) {
d <- get_data()
}