Package 'fisheryO'

Title: Fisheries Overviews for ICES Advice
Description: Functions that work with International Council for the Exploration of the Sea (ICES) web services and databases to collate, aggregate, and plot Fisheries Overview products.
Authors: Scott Large [aut, cre]
Maintainer: Scott Large <[email protected]>
License: GPL (>= 2)
Version: 0.2
Built: 2024-12-25 03:26:55 UTC
Source: https://github.com/ices-tools-prod/fisheryO

Help Index


ICES Area and Ecoregion definitions

Description

area_definition returns list of sf dataframes with shape information of Europe, ICES Areas and ICES Ecoregions.

Usage

area_definition(ecoregion = "Greater North Sea Ecoregion")

Arguments

ecoregion

character of the ecoregion to plot. e.g., "Greater North Sea Ecoregion"

Value

list of ices_shape (data frame), eco_shape (data frame), europe_shape (data frame) and centroids (data frame)

Note

European map is from Natural Earth (scale = 10) via the rnaturalearth package

Author(s)

Scott Large

See Also

Used in area_definition_map to a map describing potential mismatches between ICES Ecoregions and ICES Areas.

Input data: ices_shape, eco_shape, and europe_shape.


ICES Area and Ecoregion map

Description

area_definition_map returns a map describing potential mismatches between ICES Ecoregions and ICES Areas

Usage

area_definition_map(ecoregion, data_caption = TRUE, save_plot = FALSE,
  return_plot = TRUE, output_path = NULL, file_name = NULL)

Arguments

ecoregion

ecoregion name, e.g. Greater North Sea Ecoregion

data_caption

print the data source as a caption, boolean.

Value

A png or ggplot plot

Author(s)

Scott Large

See Also

SAG summary table and reference points come from clean_sag. frmt_summary_table evaluates status relative to reference points and formats the table for .html.

Examples

## Not run: 
area_definition_map("Greater North Sea")

## End(Not run)

Clean SAG reference points and summary table

Description

clean_sag returns a merged and tidied SAG reference points and summary table and a formatted (.html) stock list

Usage

clean_sag(active_year = 2016)

Arguments

active_year

numeric of the stock database version. e.g., 2016

Value

list of stock_list_frmt (data frame) and sag_complete_summary (tbl_df)

Note

Periodically, ICES adds or removes stocks from the advisory process. The function returns the SAG reference points and summary table for all published (in SAG) and active stocks for a given year.

Author(s)

Scott Large

See Also

Used in stock_trends_fun to make clickable information on dynamic line plots of F and SSB relative to F<sub>MSY</sub> and MSY B<sub>trigger</sub> reference points for stocks of a fish category for an ecoregion. Also, used in frmt_summary_table.

Input data: stock_list_raw, sag_summary_raw,sag_refpts_raw, and sag_keys_raw.

Examples

head(clean_sag(active_year = 2016))

ICES Ecoregions

Description

ICES Ecoregions. Accessed 23 May 2017.

  • OBJECTIDadd text

  • Ecoregionadd text

  • Shape_Lengadd text

  • Shape_Le_1add text

  • Shape_Areaadd text

  • geometryadd text

Usage

eco_shape

Format

A sf data frame with 17 rows and 6 variables.

Source

http://gis.ices.dk/shapefiles/ICES_ecoregions.zip


Europe map

Description

ICES Ecoregions. Accessed 23 May 2017.

  • iso_a3add text

  • iso_n3add text

  • adminadd text

  • geometryadd text

Usage

europe_shape

Format

A sf data frame with 51 rows and 6 variables. From Natural Earth via the rnaturalearth package

Source

http://www.naturalearthdata.com/, https://cran.r-project.org/package=rnaturalearth


fisheryO: A "Research Compendium" for ICES Fisheries Overviews

Description

The fisheryO package is offered to provide documentation of the processes used to download, aggregate, and analyze data for ICES Fisheries Overviews. Further, the package contains R functions to facilitate the standard plotting of these data.

fisheryO plotting functions

area_definition_map stockSummaryTable_fun stockPie_fun gesPie_fun stock_trends_fun plot_kobe guild_discards_fun ices_catch_plot stecf_plot

fisheryO data cleaning functions

area_definition clean_sag frmt_summary_tbl stock_props ices_stock_props ges_stock_props clean_stock_trends stock_catch stock_status ices_catch_data stecf_data

fisheryO raw data

stock_list_raw sag_summary_raw sag_refpts_raw sag_keys_raw ices_catch_historical_raw ices_catch_official_raw species_list_raw stecf_effort_raw stecf_landings_raw ices_shape eco_shape europe_shape


Format stock summary table

Description

frmt_summary_tbl returns the stock summary table plain and formatted with html (e.g., glyphicons and italics)

Usage

frmt_summary_tbl(active_year = active_year,
  calculate_status = calculate_status, return_clean_sag = FALSE)

Arguments

active_year

numeric of the stock database version. e.g., 2016

calculate_status

logical on whether to use raw SAG output to calculate stock status or to use the hard-coded values from stock summary table

return_clean_sag

logical to return objects from clean_sag()

Value

data frame

Note

Periodically, ICES adds or removes stocks from the advisory process. The function returns the stock summary table for all published (in SAG) and active stocks for a given year. calculate_status = TRUE calculates stock status relative to published reference points. This will represent PA and SBL for ecoregions with proxy reference points. calculate_status = TRUE takes the raw icons from published advice. Note, before 2017 not all stocks status tables have been added to the SAG database and only few stocks had MSY proxy reference points.

Author(s)

Scott Large

See Also

Used in stockSummaryTable_fun to create the "Status of stock summary relative to reference points" table for all stocks for an ecoregion. Input data: SAG summary table and reference points come from clean_sag.

Examples

head(frmt_summary_tbl(active_year = 2016)$summary_table)

Proportion of stocks relative to GES reference points

Description

ges_stock_props returns a data frame of the proportion of stocks relative to GES reference points for all ecoregion.

Usage

ges_stock_props(active_year = active_year, ecoregion = ecoregion,
  calculate_status = calculate_status, fisheries_guild = fisheries_guild)

Arguments

active_year

numeric of the stock database version (year). e.g., 2016

ecoregion

vector of ecoregions to include

calculate_status

logical on whether to use raw SAG output to calculate stock status or to use the hard-coded values from stock summary table

fisheries_guild

vector of fisheries guilds to include

Value

returns a data frame of the proportion of stocks relative to ICES reference points for fish categories in ecoregions.

Note

Periodically, ICES adds or removes stocks from the advisory process. The function returns the SAG reference points and summary table for all published (in SAG) and active stocks for a given year.calculate_status = TRUE calculates stock status relative to published reference points. This will represent PA and SBL for ecoregions with proxy reference points. calculate_status = TRUE takes the raw icons from published advice. Note, before 2017 not all stocks status tables have been added to the SAG database and only few stocks had MSY proxy reference points.

Author(s)

Scott Large

See Also

Used in gesPie_fun to plot proportion of stocks relative to GES reference points for all ecoregions. Input data: From stock_props, which brings sag_complete_summary and stock_list_frmt from clean_sag.

Examples

## Not run: 
ges_stock_props(2016)

## End(Not run)

Pie chart of proportion of stocks relative to GES reference points

Description

The gesPie_fun function returns pie charts of the proportion of stocks relative to GES reference points in an ecoregion.

Usage

gesPie_fun(ecoregion, fisheries_guild = c("pelagic", "demersal", "crustacean",
  "elasmobranch", "benthic"), calculate_status = FALSE, data_caption = TRUE,
  file_name = NULL, active_year = 2016, save_plot = FALSE,
  return_plot = TRUE, return_data = FALSE, output_path = NULL)

Arguments

ecoregion

ecoregion name, e.g. Greater North Sea

fisheries_guild

fisheries guild to include in proportions

calculate_status

logical on whether to use raw SAG output to calculate stock status or to use the hard-coded values from stock summary table

data_caption

print the data source as a caption, boolean.

file_name

name for the output.

active_year

numeric of the stock database version (year). e.g., 2016

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

output_path

path for output to live.

Value

A ggplot2 object or .png saved as file_name to output_path. When file_name is NULL, the file name is the ecoregion. When output_path is NULL, the file is saved to "~/".

Note

Stocks are linked to ecoregions via the ICES Stock database. Reference points are as published in ICES Stock Assessment Graphs database. In some cases, status relative to reference points may vary from published ICES advice when reported F or SSB are very close to reference points (e.g., F = 0.201 > F<sub>MSY</sub> = 0.20). calculate_status = TRUE calculates stock status relative to published reference points. This will represent PA and SBL for ecoregions with proxy reference points. calculate_status = TRUE takes the raw icons from published advice. Note, before 2017 not all stocks status tables have been added to the SAG database and only few stocks had MSY proxy reference points.

Author(s)

Scott Large

Examples

## Not run: 
gesPie_fun("Greater North Sea Ecoregion", return_plot = TRUE)

## End(Not run)

Discard rate over time

Description

The guild_discards_fun function returns a series of plots of discard rate and landings by fish category for an ecoregion.

Usage

guild_discards_fun(ecoregion, active_year = 2016, data_caption = TRUE,
  output_path = NULL, save_plot = FALSE, return_plot = TRUE,
  return_data = FALSE, file_name = NULL)

Arguments

ecoregion

ecoregion name, e.g. Greater North Sea Ecoregion

active_year

numeric of the stock database version (year). e.g., 2016

data_caption

print the data source as a caption, boolean.

output_path

path for output to live.

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

file_name

name for the output.

Value

A ggplot2 object when return_plot is TRUE, html when dynamic is TRUE or .png when dynamic is FALSE. 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

Stocks are linked to ecoregions and fish categories via the ICES Stock database. Reference points are as published in ICES Stock Assessment Graphs database. In some cases, status relative to reference points may vary from published ICES advice when reported F or SSB are very close to reference points (e.g., F = 0.201 > F<sub>MSY</sub> = 0.20). There is an assumption that discard rates for biannual stocks and are consistent over the years that we don't provide new advice.

Author(s)

Scott Large

Examples

## Not run: 
guild_discards_fun("Greater North Sea Ecoregion", return_plot = TRUE)

## End(Not run)

ICES catch time series

Description

ices_catch_data returns a data frame of landings by country, species, and fish category

Usage

ices_catch_data()

Value

a data frame of landings by country, species, and fish category.

Author(s)

Scott Large

See Also

Used in ices_catch_plot to create an area or line plot of landings (historic and official catch) for an ecoregion by country, fish category, or species. Input data: ices_catch_official_raw, ices_catch_historical_raw, species_list_raw, and stock_list_raw.

Examples

head(ices_catch_data())

Historical Nominal Catches 1950-2010

Description

Catches in FAO area 27 by country, species, area and year as provided by the national authorities. Source: Eurostat/ICES data compilation of catch statistics - ICES 2011, Copenhagen. Version: 30-11-2011

Usage

ices_catch_historical_raw

Format

A data frame with 28582 rows and 64 variables:

Details

  • CountryAdd text

  • SpeciesAdd text

  • DivisionAdd text

  • X1950Add text ...

  • X2010Add text

Source

http://www.ices.dk/marine-data/dataset-collections/Pages/Fish-catch-and-stock-assessment.aspx


Official Nominal Catches 2006-2015

Description

Catches in FAO area 27 by country, species, area and year. Source: Eurostat/ICES database on catch statistics - ICES 2017, Copenhagen. Version 12-06-2017

  • SpeciesAdd text

  • AreaAdd text

  • UnitsAdd text

  • CountryAdd text

  • X2015Add text

  • X2014Add text

  • X2013Add text

  • X2012Add text

  • X2011Add text

  • X2010Add text

  • X2009Add text

  • X2008Add text

  • X2007Add text

  • X2006Add text

Usage

ices_catch_official_raw

Format

A data frame with 50203 rows and 14 variables:

Source

http://www.ices.dk/marine-data/dataset-collections/Pages/Fish-catch-and-stock-assessment.aspx


Landings over time by country, guild, or species

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

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

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

## End(Not run)

ICES Statistical Areas

Usage

ices_shape

Format

A sf data frame with 66 rows and 11 variables.

Source

http://gis.ices.dk/shapefiles/ICES_areas.zip


Proportion of stocks relative to ICES reference points

Description

ices_stock_props returns a data frame of the proportion of stocks relative to ICES reference points for fish categories in ecoregions.

Usage

ices_stock_props(active_year = active_year, ecoregion = ecoregion,
  calculate_status = calculate_status, fisheries_guild = fisheries_guild)

Arguments

active_year

numeric of the stock database version (year). e.g., 2016

ecoregion

vector of ecoregions to include

calculate_status

logical on whether to use raw SAG output to calculate stock status or to use the hard-coded values from stock summary table

fisheries_guild

vector of fisheries guilds to include

Value

returns a data frame of the proportion of stocks relative to ICES reference points for fish categories in ecoregions.

Note

Periodically, ICES adds or removes stocks from the advisory process. The function returns the SAG reference points and summary table for all published (in SAG) and active stocks for a given year. calculate_status = TRUE calculates stock status relative to published reference points. This will represent PA and SBL for ecoregions with proxy reference points. calculate_status = TRUE takes the raw icons from published advice. Note, before 2017 not all stocks status tables have been added to the SAG database and only few stocks had MSY proxy reference points.

Author(s)

Scott Large

See Also

Used in stockPie_fun to plot proportion of stocks relative to ICES reference points for fish categories in all ecoregions. Input data: From stock_props.

Examples

## Not run: 
ices_stock_props(2016)

## End(Not run)

Kobe plot of stock status

Description

The plot_kobe function returns a 2 plots: a scatter plot of F/F<sub>MSY</sub> and SSB/MSY B<sub>trigger</sub> by fish category and ecoregion and a "lollipop" plot of total catch (divided into discards and landings) by stock.

Usage

plot_kobe(ecoregion, guild = c("all", "benthic", "demersal", "pelagic",
  "crustacean", "elasmobranch", "large-scale stocks")[1], active_year = 2016,
  data_caption = TRUE, output_path = NULL, return_plot = TRUE,
  return_data = FALSE, save_plot = FALSE, catch_limit = 0,
  file_name = NULL, plotTitle = NULL, fig.width = 131.32,
  fig.height = 88.9, units = "mm", res = 300, dynamic = FALSE)

Arguments

ecoregion

ecoregion name, e.g. Greater North Sea Ecoregion

guild

fish category (options: "all", "benthic", "demersal", "pelagic", "crustacean", "elasmobranch", "large-scale stocks"), e.g. demersal

active_year

numeric of the stock database version (year). e.g., 2016

data_caption

print the data source as a caption, boolean.

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

save_plot

logical to save plot.

catch_limit

lower limit of catch to be included in the plot. Useful to cull the herd if there are many stocks with minimal catch.

file_name

name for the output.

fig.width

width pf combined set of plots

fig.height

height of combined set of plots,

units

defaults to "mm"

res

defaults to "300"

dynamic

logical to generate html output with dynamic features.

Value

A ggplot2 object when return_plot is TRUE, html when dynamic is TRUE or .png when dynamic is FALSE. 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

Stocks are linked to ecoregions and fish categories via the ICES Stock database. Reference points are as published in ICES Stock Assessment Graphs database. In some cases, status relative to reference points may vary from published ICES advice when reported F or SSB are very close to reference points (e.g., F = 0.201 > F<sub>MSY</sub> = 0.20).

Author(s)

Scott Large

Examples

## Not run: 
plot_kobe("Greater North Sea Ecoregion", guild = "demersal", return_plot = TRUE)

## End(Not run)

ICES Stock Assessment Graphs database - keys

Description

Data from published ICES advice from 2014-2017. Accessed Accessed 5 July 2017. “ICES Stock Assessment Database, 2017/July ICES, Copenhagen”

Usage

sag_keys_raw

Format

A data frame with 545 rows and 3 variables:

Details

  • AssessmentYearAdd text

  • AssessmentKeyAdd text

  • StockKeyLabelAdd text

Source

https://standardgraphs.ices.dk/


ICES Stock Assessment Graphs database - reference points

Description

Data from published ICES advice from 2014-2017. Accessed Accessed 5 July 2017. “ICES Stock Assessment Database, 2017/July ICES, Copenhagen”

Usage

sag_refpts_raw

Format

A data frame with 545 rows and 15 variables:

Details

  • AssessmentKeyAdd text

  • StockKeyLabelAdd text

  • StockDatabaseIDAdd text

  • StockKeyAdd text

  • AssessmentYearAdd text

  • FLimAdd text

  • FpaAdd text

  • BpaAdd text

  • BlimAdd text

  • FMSYAdd text

  • MSYBtriggerAdd text

  • FmanagementAdd text

  • BmanagementAdd text

  • RecruitmentAgeAdd text

  • RecruitmentLengthAdd text

Source

https://standardgraphs.ices.dk/


ICES Stock Assessment Graphs database - stock status output

Description

Data from published ICES advice from 2014-2017. Accessed Accessed 5 July 2017. “ICES Stock Assessment Database, 2017/July. ICES, Copenhagen”

Usage

sag_stock_status_raw

Format

A data frame with 6163 rows and 13 variables:

Details

  • AssessmentYearAdd text

  • AssessmentKeyAdd text

  • StockKeyLabelAdd text

  • yearAdd text

  • statusAdd text

  • statusiconAdd text

  • typeAdd text

  • lineNumberAdd text

  • lineDescriptionAdd text

  • fishingPressureAdd text

  • stockSizeAdd text

  • stockSizeStatusAdd text

  • fishingPressureStatusAdd text

Source

https://standardgraphs.ices.dk/


ICES Stock Assessment Graphs database - summary information from assessment output

Description

Data from published ICES advice from 2014-2017. Accessed Accessed 5 July 2017. ICES Stock Assessment Database, 2017/July ICES, Copenhagen

Usage

sag_summary_raw

Format

A data frame with 20204 rows and 23 variables:

Details

  • YearAdd text

  • recruitmentAdd text

  • high_recruitmentAdd text

  • low_recruitmentAdd text

  • low_SSBAdd text

  • SSBAdd text

  • high_SSBAdd text

  • catchesAdd text

  • landingsAdd text

  • discardsAdd text

  • low_FAdd text

  • FAdd text

  • high_FAdd text

  • StockPublishNoteAdd text

  • FageAdd text

  • fishstockAdd text

  • recruitment_ageAdd text

  • AssessmentYearAdd text

  • unitsAdd text

  • stockSizeDescriptionAdd text

  • stockSizeUnitsAdd text

  • fishingPressureDescriptionAdd text

  • fishingPressureUnitsAdd text

Source

https://standardgraphs.ices.dk/


ASFIS list of species

Description

ASFIS list of species includes 12 700 species items selected according to their interest or relation to fisheries and aquaculture. For each species item stored in a record, codes (ISSCAAP group, taxonomic and 3-alpha) and taxonomic information (scientific name, author(s), family, and higher taxonomic classification) are provided.

Usage

species_list_raw

Format

A data frame with 12700 rows and 11 variables:

Details

Version 2-2016

  • ISSCAAPAdd text

  • TAXOCODEAdd text

  • X3A_CODEAdd text

  • Scientific_nameAdd text

  • English_nameAdd text

  • French_nameAdd text

  • Spanish_nameAdd text

  • AuthorAdd text

  • FamilyAdd text

  • OrderAdd text

  • Stats_dataAdd text

Source

http://www.fao.org/fishery/collection/asfis/en


STECF catch and effort time series

Description

stecf_data returns a data frame of effort and landings by country, species, and fish category

Usage

stecf_data()

Value

a data frame of stock status relative to reference points and catch, discards, and landings by stock for the most recent assessment.

Author(s)

Scott Large

See Also

Used in stecf_plot to create an area or line plot of landings and effort for an ecoregion by country and guild. Input data: stecf_effort_raw and stecf_landings_raw.

Examples

head(stecf_data())

STECF nominal effort

Description

STECF nominal effort from the FDI data call 2016. Accessed 16 March 2017.

Usage

stecf_effort_raw

Format

A data frame with 23993 rows and 13 variables.

Details

  • measure.calculationadd text

  • annexadd text

  • countryadd text

  • fishing_activityadd text

  • fishing_capacityadd text

  • gt_days_at_seaadd text

  • no_vesselsadd text

  • nominal_effortadd text

  • regulated.areaadd text

  • regulated.gearadd text

  • speconadd text

  • vessel.lengthadd text

  • yearadd text

Source

https://stecf.jrc.ec.europa.eu/dd/effort/graphs-annex


STECF landings and discards

Usage

stecf_landings_raw

Format

A data frame with 530230 rows and 11 variables.

Source

https://stecf.jrc.ec.europa.eu/dd/effort/graphs-annex


STECF Landings over time by country, guild, or species

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

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

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

## End(Not run)

Catch, discards, and landings by stock

Description

stock_catch returns a data frame of reference points, catch, discards, and landings by stock over time.

Usage

stock_catch(active_year = 2016)

Arguments

active_year

numeric of the stock database version (year). e.g., 2016

Value

a data frame of reference points, catch, discards, and landings by stock over time.

Note

Stocks are linked to ecoregions and fish categories via the ICES Stock database. Reference points are as published in ICES Stock Assessment Graphs database. In some cases, status relative to reference points may vary from published ICES advice when reported F or SSB are very close to reference points (e.g., F = 0.201 > F<sub>MSY</sub> = 0.20).

Author(s)

Scott Large

See Also

Used in guild_discards_fun for plots of discard rate and landings by fish category for an ecoregion. Input data: From clean_sag

Examples

head(stock_catch(2016))

ICES Stock database

Description

Data describing ICES Stocks. Accessed 5 July 2017

Usage

stock_list_raw

Format

A data frame with 1296 rows and 31 variables.

Details

  • StockDatabaseIDAdd text

  • StockKeyAdd text

  • StockKeyLabelAdd text

  • StockKeyDescriptionAdd text

  • PreviousStockKeyAdd text

  • PreviousStockKeyLabelAdd text

  • ActiveYearAdd text

  • SpeciesScientificNameAdd text

  • SpeciesCommonNameAdd text

  • EcoRegionAdd text

  • ExpertGroupAdd text

  • ExpertGroupDescriptionAdd text

  • AdviceDraftingGroupAdd text

  • AdviceDraftingGroupDescriptionAdd text

  • DataCategoryAdd text

  • YearOfLastAssessmentAdd text

  • AssessmentFrequencyAdd text

  • YearOfNextAssessmentAdd text

  • AssessmentTypeAdd text

  • AdviceReleaseDateAdd text

  • AdviceCategoryAdd text

  • AdviceTypeAdd text

  • UseOfDiscardsInAdviceAdd text

  • PABufferAppliedAdd text

  • TrophicGuildAdd text

  • FisheriesGuildAdd text

  • SizeGuildAdd text

  • PublishedAdd text

  • GeneratedOnAdd text

  • SectionNumberAdd text

  • AssessmentKeyAdd text

Source

https://sd.ices.dk/


Proportion of stocks relative to reference points

Description

stock_props returns a list of the proportion of stocks relative to reference points for fish categories in ecoregions.

Usage

stock_props(active_year = active_year, ecoregion = ecoregion,
  calculate_status = calculate_status, fisheries_guild = fisheries_guild,
  return_clean_sag = FALSE)

Arguments

active_year

numeric of the stock database version (year). e.g., 2016

ecoregion

vector of ecoregions to include

calculate_status

logical on whether to use raw SAG output to calculate stock status or to use the hard-coded values from stock summary table

fisheries_guild

vector of fisheries guilds to include

return_clean_sag

logical to return objects from clean_sag()

Value

returns a list with the data frame stock_props of the proportion of stocks relative to reference points for all ecoregions. When return_clean_sag = TRUE, sag_complete_summary and stock_list_frmt are also returned from clean_sag.

Note

Periodically, ICES adds or removes stocks from the advisory process. The function returns the SAG reference points and summary table for all published (in SAG) and active stocks for a given year.calculate_status = TRUE calculates stock status relative to published reference points. This will represent PA and SBL for ecoregions with proxy reference points. calculate_status = TRUE takes the raw icons from published advice. Note, before 2017 not all stocks status tables have been added to the SAG database and only few stocks had MSY proxy reference points.

Author(s)

Scott Large

See Also

Used in ices_stock_props and ges_stock_props to evaluate stocks relative to ICES and GES reference points. Input data: SAG summary table and reference points come from clean_sag. frmt_summary_table evaluates status relative to reference points and formats the table for .html.

Examples

## Not run: 
stock_props(2016)

## End(Not run)

Stock status and catch relative to reference points

Description

stock_status returns a data frame of stock status relative to reference points and catch, discards, and landings by stock for the most recent assessment.

Usage

stock_status(active_year = 2016)

Arguments

active_year

numeric of the stock database version (year). e.g., 2016

Value

a data frame of stock status relative to reference points and catch, discards, and landings by stock for the most recent assessment.

Note

Stocks are linked to ecoregions and fish categories via the ICES Stock database. Reference points are as published in ICES Stock Assessment Graphs database. In some cases, status relative to reference points may vary from published ICES advice when reported F or SSB are very close to reference points (e.g., F = 0.201 > F<sub>MSY</sub> = 0.20).

Author(s)

Scott Large

See Also

Used in plot_kobe to plot a scatter plot of F/F<sub>MSY</sub> and SSB/MSY B<sub>trigger</sub> by fish category and ecoregion and a "lollipop" plot of total catch (divided into discards and landings) by stock. Input data: From stock_catch

Examples

head(stock_status(2016))

Pie chart of proportion of stocks relative to reference points

Description

The stockPie_fun function returns pie charts of the proportion of stocks relative to reference points for fish categories in an ecoregion.

Usage

stockPie_fun(ecoregion, fisheries_guild = c("pelagic", "demersal",
  "crustacean", "elasmobranch", "benthic"), calculate_status = FALSE,
  data_caption = TRUE, file_name, active_year = 2016, save_plot = FALSE,
  return_plot = TRUE, return_data = FALSE, output_path = NULL)

Arguments

ecoregion

ecoregion name, e.g. Greater North Sea

fisheries_guild

fisheries guild to include in proportions

calculate_status

logical on whether to use raw SAG output to calculate stock status or to use the hard-coded values from stock summary table

data_caption

print the data source as a caption, boolean.

file_name

name for the output.

active_year

numeric of the stock database version (year). e.g., 2016

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

output_path

path for output to live.

Value

A ggplot2 object or .png saved as file_name to output_path. When file_name is NULL, the file name is the ecoregion. When output_path is NULL, the file is saved to "~/".

Note

Stocks are linked to ecoregions and fish categories via the ICES Stock database. Reference points are as published in ICES Stock Assessment Graphs database. In some cases, status relative to reference points may vary from published ICES advice when reported F or SSB are very close to reference points (e.g., F = 0.201 > F<sub>MSY</sub> = 0.20). calculate_status = TRUE calculates stock status relative to published reference points. This will represent PA and SBL for ecoregions with proxy reference points. calculate_status = TRUE takes the raw icons from published advice. Note, before 2017 not all stocks status tables have been added to the SAG database and only few stocks had MSY proxy reference points.

Author(s)

Scott Large

Examples

## Not run: 
stockPie_fun("Greater North Sea Ecoregion", return_plot = TRUE)

## End(Not run)

Render html stock summary table

Description

This function returns "Status of stock summary relative to reference points" for all stocks in an ecoregion.

Usage

stockSummaryTable_fun(ecoregion, active_year = 2016,
  table_type = c("static_docx", "dynamic_html")[1], output_path = NULL,
  file_name = NULL, return_data = FALSE)

Arguments

ecoregion

ecoregion name, e.g. Greater North Sea

active_year

numeric of the stock database version (year). e.g., 2016

table_type

type of table, "dynamic_html" (using DT) and "static_docx" (using flextable and officer) .docx tables.

output_path

path for output to live.

file_name

name for the output.

return_data

logical on returning a .csv of plotted data

Value

A html file. When file_name is NULL, the file name is the ecoregion. When output_path is NULL, the file is saved to "~/". When table_type is "static" or "both", it might take a bit of time...

Note

Stocks are linked to ecoregions via the ICES Stock database. Reference points are as published in ICES Stock Assessment Graphs database. In some cases, status relative to reference points may vary from published ICES advice when reported F or SSB are very close to reference points (e.g., F = 0.201 > F<sub>MSY</sub> = 0.20).

Periodically, ICES adds or removes stocks from the advisory process. The function returns the SAG reference points and summary table for all published (in SAG) and active stocks for a given year.

Author(s)

Scott Large

See Also

SAG summary table and reference points come from clean_sag. frmt_summary_table evaluates status relative to reference points and formats the table for .html.

Examples

## Not run: 
stockSummaryTable_fun("Greater North Sea Ecoregion")

## End(Not run)