Function reference
-
AFSCforeign_hauls
- Example data for AFSCforeign_hauls
-
Biomass.fn()
- Calculates design based estimates from survey data for West Coast surveys. The design based index is calculated based on the area of the strata and the mean catch by strata. See: Gunderson, D.R. and Sample, T.M. 1980. Distribution and abundance of rockfish off Washington, Oregon, and California during 1977. Marine Fisheries Review: March - April.
-
CheckStrata.fn()
- Calculates and returns the total number of tows and positive tows conducted in each strata by year. The selected stratas are used to expand the length and marginal age compositions and to calculate a design based index using the Biomass.fn function.
-
CreateStrataDF.fn()
- Create strata data frame using
StrataAreas.fn
-
Format.AKSlope.fn()
- Rename columns in the AFSC slope survey data file received prior to the creation of the NWFSC data warehouse. This function converts the older data files to create the needed column names to work within survey package functions. Output from this function will be list of containing catch, length, and age data.
-
GetN.fn()
- Calculate effN input sample sizes
-
GetSpp.fn()
- Get Species Information
-
GetSppDefault.fn()
- Get Vector of Default Species Names for US West Coast
-
GetStrata.fn()
- Get Default Strata
-
GetSurveyAbb.fn()
- Get Survey Abbreviation
-
PlotBio.fn()
- Plots the biomass with confidence intervals
-
PlotBioStrata.fn()
- Plots the biomass with confidence intervals
-
PlotFreqData.fn()
- This function plots frequency data as bubble plots You may want to change all zeros to NA's so that those observations are not plotted. If you don't then set zero2NAs=F
-
PlotMap.fn()
- Plot two figures showing catch-per-unit-effort data
-
PlotPresenceAbsence.fn()
- Plot showing presence and absence per haul by depth, latitude, or sex bin
-
PlotSexRatio.fn()
- Function to plot sex ratio
-
PlotSexRatioStrata.fn()
- Function to plot sex ratio by strata
-
PlotVarLengthAtAge.fn()
- Plot variability of length at age
-
PullBio.fn()
- Pull biological data (age, length, weight) from the NWFSC data warehouse The website is: https://www.webapps.nwfsc.noaa.gov/data This function can be used to pull a single species or all observed species In order to pull all species leave Name = NULL and SciName = NULL
-
PullCatch.fn()
- Pull catch data from the NWFSC data warehouse
-
PullHaul.fn()
- Pull haul data from the NWFSC data warehouse The website is: https://www.webapps.nwfsc.noaa.gov/data This function can be used to pull haul data and associated covariates
-
PullSpp
- Sql pull of species names
-
PullSpp.fn()
- Pull species names from the warehouse
-
ReadInAges.fn()
- Reads in the West Coast Trienial survey data and filters the data into what is necessary It reads in data and makes sure only the species necessary are kept may want to keep NA (blank in Excel) to select the zero tows removeCAN is a flag if you want tows in Canadian waters removed
-
ReadInLengths.fn()
- Reads in the compositional survey data and filters the data into what is necessary It reads in catch and station data and makes sure only the species necessary are kept
-
SA3
- A data set for determining strata areas (hectares)
-
SA3_v2021.1
- A data set for determining strata areas (hectares)
-
SexRatio.fn()
- Assign sex to unsexed fish based on fish with similar traits
-
StrataAreas.fn()
- Calculate strata area
-
StrataFactors.fn()
- Creates a vector of strata factors by name
-
SurveyAFs.fn()
- Expands the ages up to the total stratum area then sums over strata Original Version Written by Allan Hicks 16 March 2009 Modified by Chantel Wetzel to work with the data warehouse data formatting, add additional options of when to apply the sex ratio, and correct some treatment of unsexed fish weighted by sample size and area NOTE: The age bin called F0 or M0 is retained to show proportion of ages smaller than smallest bin You will want to likely add this to your first age bin and delete this before putting in SS, or start the ageBins argument at the 2nd age bin and F0 will be all fish smaller (hence the first age bin)
-
SurveyAgeAtLen.fn()
- Calculates proportion of age at length and reformats into SS format Uses raw numbers at length, assuming that is a random sample conditioned on length and sex. To use expanded numbers (up to strata areas), set raw=F Only sex codes 1 and 2 and puts males and females on separate lines because the age@L is conditioned on sex (a sample of females of length 25cm, for example) Gender=1: females only. Male values ignored Gender=2: males only. Female values ignored. lgthBins is either the interval between length bins or the actual length bins note that 0 and Inf are tacked on the ends to account for lengths and ages outside the interval. You may want to add these in to first and last bin. I assume all fish are sexed for age data, thus do not apply sex ratios for unsexed fish
-
SurveyLFs.fn()
- Expands the lengths up to the total stratum area then sums over strata
-
UnexpandedAFs.fn()
- Creates a matrix of length or age composition data WITHOUT expantion Written by Chantel Wetzel to work with the data warehouse data formatting,
-
UnexpandedLFs.fn()
- Creates a matrix of length or age composition data WITHOUT expantion Written by Chantel Wetzel to work with the data warehouse data formatting,
-
availablecells
- Available grid cell locations for the survey
-
bio_nwfsc_combo
- Example data for NWFSC bio data
-
catch_nwfsc_combo
- Example data for NWFSC catch data
-
check_dir()
- Directory check
-
check_survey()
- Check and create survey string
-
codify_sex()
codify_sex_SS3()
- Code sexes into standardized strings
-
convert_to_hex_string()
- Utility function used throughout the package
-
createMatrix()
- Survey name matching function used when pull from the data warehouse The website is: https://www.webapp.nwfsc.noaa.gov/data
-
draw_USEEZ()
- Bounds the figure with the limits of the U.S. EEZ
-
draw_theme()
- A ggplot2 theme for drawing maps
-
est_growth()
- Estimate length-at-age using the von Bertanlaffy parametization from Stock Synthesis.
-
estimate_weight_length()
- Calculate weight-length relationship parameters
-
fit_vbgrowth()
- Estimate von Bertanlaffy growth parameters from lengths and ages
-
get_json()
- Get json content from a URL
-
get_url()
- Function to create url to pull data from the data warehouse
-
plot_age_length_sampling()
- Plot the represntativeness of age sampling based on lengths
-
plot_bio_patterns()
- This function plots length by latitude and depth
-
plot_comps()
- Plot frequency data as bubble plots
-
plot_cpue()
- This function plots cpue and length by latitude and depth
-
plot_proportion()
- Plot proportions of factor levels (y axis) by bins (x axis)
-
plot_varlenage()
- Plot variability of length at age
-
plot_westcoast()
- Plot the United States west coast using ggplot2
-
pull_bio()
- Pull biological data (age, length, weight) from the NWFSC data warehouse The website is: https://www.webapps.nwfsc.noaa.gov/data This function can be used to pull a single species or all observed species In order to pull all species leave common_name or sci_name as NULL
-
pull_biological_samples()
- Pull biological sample information from the NWFSC data warehouse for biological collections taken at sea. Generally these are samples that require lab processing. Generally, these types of biological sample are maturity, stomach, fin clips, and tissue samples. This function returns collection information for these samples include the sample numbers which allows the lab analysis to be linked back to the sampled fish. The website is: https://www.webapps.nwfsc.noaa.gov/data.
-
pull_catch()
- Pull catch data for satisfactory tows from the NWFSC data warehouse
-
pull_gemm()
- Pull gemm data from the NWFSC data warehouse The website is: https://www.webapps.nwfsc.noaa.gov/data This function can be used to pull all gemm data, a single species, or a subset of species c("Canary Rockfish", "Widow Rockfish"). Species names in the gemm are capitalized (e.g. Canary Rockfish). However, there are checks in the function to adjust input species names if the input names do not match the expected capitalization (e.g. "canary rockfish", "canary_rockfish"). The fuction also allows you to subset the data by year using the years input and to save the object if the dir function input is given.
-
pull_haul()
- Pull haul data from the NWFSC data warehouse. The website is: https://www.webapps.nwfsc.noaa.gov/data. This function can be used to pull haul data and associated covariates.
-
pull_spp()
- Pull species names from the warehouse
-
save_rdata()
- Save an object in an
.rdata
file
-
stopifnotcolumn()
- Stop if column name is not present in the data
-
wh_plot_proportion()
- Save figures of proportions by depth and latitude using warehouse data