library(dplyr)
library(fisheryO)
library(ggplot2)
library(ggiraph)
library(ggrepel)
# library(svglite)
# library(htmlwidgets)
# devtools::install_github("metrumresearchgroup/slickR")
# library(slickR)

# options(width = 999)
knitr::opts_chunk$set(echo = FALSE, dev='svg', warnings = FALSE)

figRef <- local({
    tag <- numeric()
    created <- logical()
    used <- logical()
    function(label, caption, prefix = options("figcap.prefix"), 
        sep = options("figcap.sep"), prefix.highlight = options("figcap.prefix.highlight")) {
        i <- which(names(tag) == label)
        if (length(i) == 0) {
            i <- length(tag) + 1
            tag <<- c(tag, i)
            names(tag)[length(tag)] <<- label
            used <<- c(used, FALSE)
            names(used)[length(used)] <<- label
            created <<- c(created, FALSE)
            names(created)[length(created)] <<- label
        }
        if (!missing(caption)) {
            created[label] <<- TRUE
            paste0(prefix.highlight, prefix, " ", i, sep, prefix.highlight, 
                " ", caption)
        } else {
            used[label] <<- TRUE
            paste(prefix, tag[label])
        }
    }
})

options(figcap.prefix = "Figure", figcap.sep = ".", figcap.prefix.highlight = "**")

Here we go...

This document shows how the fisheryO package can be used to generate plots for the Greater North Sea Ecoregion Fishery Overview


ices_catch_plot("Greater North Sea Ecoregion", "COUNTRY", line_count = 9,
                "area")
stecf_plot("Greater North Sea Ecoregion", metric = "EFFORT", type = "COUNTRY", line_count = 9, plot_type = "line")
ices_catch_plot("Greater North Sea Ecoregion", "GUILD", line_count = 9,
                "line")
ices_catch_plot("Greater North Sea Ecoregion", "COMMON_NAME", line_count = 9, "line")
stecf_plot("Greater North Sea Ecoregion", metric = "LANDINGS", type = "GEAR", line_count = 9, plot_type = "line")
guild_discards_fun("Greater North Sea Ecoregion", return_plot = TRUE)
stecf_plot("Greater North Sea Ecoregion", metric = "EFFORT", type = "GEAR", line_count = 9, plot_type = "line")

stockPie_fun("Greater North Sea Ecoregion", return_plot = TRUE)
gesPie_fun("Greater North Sea Ecoregion", return_plot = TRUE)
stock_trends_fun("Greater North Sea Ecoregion - benthic", return_plot = TRUE, dynamic = TRUE, stackable = FALSE)
stock_trends_fun("Greater North Sea Ecoregion - crustacean", return_plot = TRUE, dynamic = TRUE, stackable = FALSE)
stock_trends_fun("Greater North Sea Ecoregion - demersal", return_plot = TRUE, dynamic = TRUE, stackable = FALSE)
stock_trends_fun("Greater North Sea Ecoregion - pelagic", return_plot = TRUE, dynamic = TRUE, stackable = FALSE)
plot_kobe("Greater North Sea Ecoregion", guild = "all", return_plot = TRUE, dynamic = TRUE)
plot_kobe("Greater North Sea Ecoregion", guild = "benthic", return_plot = TRUE, dynamic = TRUE)
plot_kobe("Greater North Sea Ecoregion", guild = "crustacean", return_plot = TRUE, dynamic = TRUE)
plot_kobe("Greater North Sea Ecoregion", guild = "demersal", return_plot = TRUE, dynamic = TRUE)
plot_kobe("Greater North Sea Ecoregion", guild = "pelagic", return_plot = TRUE, dynamic = TRUE)




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