plot_survey_index: Plot survey relative biomass mass index

View source: R/survey-index.R

plot_survey_indexR Documentation

Plot survey relative biomass mass index

Description

Plot survey relative biomass mass index

Usage

tidy_survey_index(
  dat,
  survey = c("SYN WCHG", "SYN HS", "SYN QCS", "SYN WCVI", "HBLL OUT N", "HBLL OUT S",
    "HBLL INS N", "HBLL INS S", "OTHER HS MSA", "IPHC FISS"),
  min_years = 3,
  year_range = NULL
)

plot_survey_index(
  dat,
  col = brewer.pal(9, "Greys")[c(3, 7)],
  max_cv = 0.4,
  max_set_fraction = 0.05,
  xlim = NULL,
  survey_cols = NULL,
  scale = TRUE,
  scale_type = c("max-CI", "geometric-mean"),
  geo_upper_limit_mult = 1.1,
  geo_upper_limit_max = 4,
  geo_scale_years = seq(2000, as.integer(format(Sys.Date(), "%Y"))),
  year_increment = 5,
  french = FALSE,
  pjs_mode = FALSE,
  hide_y_axis = FALSE
)

Arguments

dat

For tidy_survey_index(), data from gfdata::get_survey_index(). For plot_survey_index(), data from tidy_survey_index().

survey

A character vector of survey abbreviations to include.

min_years

The minimum number of years for a survey before it is included.

year_range

If not NULL, a numeric vector of length 2 giving the range of years to plot.

col

A vector of two colours for the lines and shading.

max_cv

A coefficient of variation above which a panel will be shaded as more uncertain.

max_set_fraction

A fraction of positive sets above which a panel will be shaded as more uncertain.

xlim

If not NULL, the x axis limits.

survey_cols

If not NULL, a named character vector of colors for the various surveys.

scale

Logical: scale the biomass by the maximum?

scale_type

Scaling type. Scale by max CI or geometric mean?

geo_upper_limit_mult

If geometric mean scaling, upper y-lim is geo_upper_limit_mult times the largest scaled geometric mean value (unless larger than geo_upper_limit_max).

geo_upper_limit_max

If geometric mean scaling, max ylim.

geo_scale_years

Years for geometric mean scaling.

year_increment

Increment for the year x axis.

french

Logical for French or English.

pjs_mode

PJS mode = dots and line segments.

hide_y_axis

Logical: hide the y axis ticks and labels?

Examples

## Not run: 
gfdata::get_survey_index("lingcod") %>%
  tidy_survey_index() %>%
  plot_survey_index()

## End(Not run)

pbs-assess/gfplot documentation built on April 3, 2024, 2:10 p.m.