stecf_plot: STECF Landings over time by country, guild, or species

Description Usage Arguments Value Note Author(s) Examples

View source: R/plot_functions.R

Description

The stecf_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
stecf_plot(ecoregion, metric = c("EFFORT", "LANDINGS")[1], type = c("GEAR",
  "COUNTRY")[1], line_count = 4, plot_type = c("line", "area")[1],
  data_caption = TRUE, file_name = NULL, save_plot = FALSE,
  output_path = NULL, 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

metric

the value to plot e.g., EFFORT or LANDINGS

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.

file_name

name for the output.

save_plot

logical to save plot.

output_path

path for output to live.

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

Some considerable errors have been identified in the STECF data. Finland and Estonia effort data are not reliable, and Germany recorded an erroneous haul in 2013. These values have been removed.

Author(s)

Scott Large

Examples

1
2
3
4
## Not run: 
stecf_plot("Greater North Sea Ecoregion", metric = "EFFORT", type = "GEAR", return_plot = TRUE, line_count = 4)

## End(Not run)

slarge/fisheryO documentation built on May 30, 2019, 3:04 a.m.