ices_catch_plot: Landings over time by country, guild, or species

Description Usage Arguments Value Note Author(s) Examples

View source: R/plot_functions.R

Description

The ices_catch_plot function returns an area or line plot of landings (historic and official catch) for an ecoregion by country, guild, or species.

Usage

1
2
3
4
5
ices_catch_plot(ecoregion, type = c("COMMON_NAME", "COUNTRY", "GUILD")[1],
  line_count = 4, plot_type = c("line", "area")[1], data_caption = TRUE,
  output_path = NULL, file_name = "figure2", save_plot = FALSE,
  return_plot = TRUE, return_data = FALSE, fig.width = 174,
  fig.height = 68, text.size = 9)

Arguments

ecoregion

ecoregion name, e.g. Greater North Sea Ecoregion

type

the variable that will be used to group and display data: COMMON_NAME, GUILD, or COUNTRY

line_count

number of lines to display

plot_type

area or line plot

data_caption

print the data source as a caption, boolean.

output_path

path for output to live.

file_name

name for the output.

save_plot

logical to save plot.

return_plot

logical to return plot to current environment.

return_data

logical on returning a .csv of plotted data

fig.width

width pf combined set of plots

fig.height

height of combined set of plots

text.size

= size of text in plots

Value

A ggplot2 object when return_plot is TRUE or .png when save_plot is TRUE. Output is saved as file_name in output_path. When file_name is NULL, the file name is the ecoregion. When output_path is NULL, the file is saved to "~/".

Note

Historic and official nominal catch are actually only the landings and do not account for discards, misreporting, or other potential issues.

Author(s)

Scott Large

Examples

1
2
3
4
## Not run: 
ices_catch_plot("Greater North Sea Ecoregion", type = "COMMON_NAME", return_plot = TRUE, line_count = 4)

## End(Not run)

ices-tools-prod/fisheryO documentation built on May 19, 2019, 8:22 a.m.