Skip to contents

All functions

AFSCforeign_hauls
Example data for AFSCforeign_hauls
Biomass.fn()
Calculates design based estimates from survey data for West Coast surveys.
CheckStrata.fn()
Calculate the number of observations by year and strata
CreateStrataDF.fn()
Create strata data frame using StrataAreas.fn
Format.AKSlope.fn()
Rename AFSC slope survey columns from data pulled before 2017
GetN.fn()
Calculate input sample sizes
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 designed based biomass estimates with confidence intervals
PlotBioStrata.fn()
Plots the design-based biomass estimates by strata with confidence intervals
PlotFreqData.fn()
Plot length or age compositions by year in bubble plots
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()
Cleans triennial survey data by year and area
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

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 need the file called foreign_hauls.csv

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()
Create marginal age composition data
SurveyAgeAtLen.fn()
Calculates conditional age-at-length composition data
SurveyLFs.fn()
Expands the lengths up to the total stratum area then sums over strata for each year
UnexpandedAFs.fn()
Creates a matrix of unexpanded age compositions
UnexpandedLFs.fn()
Creates a matrix of unexpanded length composition data
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_strata()
Calculate the number of observations by year and strata
check_survey()
Check and create survey string
codify_sex() codify_sex_SS3()
Code sexes into standardized strings
combine_tows()
Combine data with multiple records for unique tows
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
est_vbgrowth()
Estimate length-at-age using the von Bertanlaffy parametization
estimate_weight_length()
Calculate weight-length relationship parameters
filter_pull()
Filter data pulls
fit_vbgrowth()
Estimate von Bertanlaffy growth parameters from lengths and ages
get_design_based()
Calculates design based estimates from survey data for West Coast surveys.
get_expanded_comps()
Calculate expanded composition data for lengths and marginal ages
get_input_n()
Calculate input sample sizes
get_json()
Get json content from a URL
get_raw_comps()
Calculate unexpanded/raw length or marginal age compositions
get_species_info()
Get Species Information
get_url()
Function to create url to pull data from the data warehouse
label_tow_expansion()
Label tow expanded compositions
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_index()
Plots the design based biomass estimates with confidence intervals
plot_length_age()
Plots the length-at-age data and estimates
plot_proportion()
Plot proportions of factor levels (y axis) by bins (x axis)
plot_varlenage()
Plot variability of length at age
plot_weight_length()
Plots the weight-at-length data and estimates
plot_westcoast()
Plot the United States west coast using ggplot2
pull_bio()
Pull biological data (age, length, weight) from the NWFSC data warehouse
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
pull_haul()
Pull haul data from the NWFSC data warehouse.
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