iphc_get_calc_plot_area: Get data, do calculations and plot longest series for the...

View source: R/calc-iphc-ser-area.R

iphc_get_calc_plot_areaR Documentation

Get data, do calculations and plot longest series for the IPHC survey restricted to a specified area

Description

Get data, do calculations and plot longest series for the IPHC survey for a given species restricted to a given area. Will take a while if queries GFbio (for which need to be on DFO network), else can use cached data (species-name.rds is always the full data for the species, before any calculations). If data are for combined species, as cached with get_combined_species(), then the column N_it_sum etc. column names are used for N_it etc.

Usage

iphc_get_calc_plot_area(
  sp,
  area = HG_herring_pred_area,
  cached_data = TRUE,
  cached_results = FALSE,
  verbose = FALSE,
  print_sp_name = TRUE,
  path_data = ".",
  path_results = NULL
)

Arguments

sp

Species name (as used in gfdata and gfplot). Or something like "skates combined" – see vignette.

area

data.frame of (PBSmapping) class PolySet with column names PID, SID, POS, X, Y,

cached_data

if TRUE then use cached data (path_data/sp-name.rds)

cached_results

if TRUE then use cached results (path_results/sp-name-results.rds), else do calculations here and save results

verbose

if TRUE then print out some of the data (useful in vignette loops)

print_sp_name

if TRUE then print out species name (useful in vignette loops)

path_data

path to save or load the cached data

path_results

path to save or load the cached data

Value

For the given species, list containing

sp_set_counts_with_area: tibble returned from add_in_area() of set counts of the species with with extra logical column in_area to say whether or not each set is within area.

ser_E_and_F: list of class IPHC_ser_E_and_F containing two tibbles, one for each series (ser_E and ser_F), as output from calc_iphc_ser_E_and_F().

series_longest: list containing ser_longest, the longest possible time series from Series E and F, and other objects, as output form calc_iphc_ser_EF().

Author(s)

Andrew Edwards

Examples

## Not run: 
iphc_get_calc_plot_area("yelloweye rockfish")
##' # Gives a warning about hole vertices, can ignore.

## End(Not run)

pbs-assess/gfiphc documentation built on July 4, 2023, 1:13 p.m.