Title: | Functions to support the creation of ICES Fisheries Overviews |
---|---|
Description: | Functions to support the creation of ICES Fisheries Overviews. |
Authors: | Adriana Villamor [aut, cre], Colin Millar [aut], Colm Lordan [aut], Youen Vermard [aut], Scott Large [aut], Sarah Millar [ctb] |
Maintainer: | Adriana Villamor <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.0.0.9005 |
Built: | 2024-12-09 04:45:25 UTC |
Source: | https://github.com/ices-tools-prod/icesFO |
Functions to support the creation of ICES Fisheries Overviews, ....
Loading data:
load_sid |
load data from SID |
load_sag |
load data from SAG |
load_catches |
load catch data from ICES |
Formatting datas:
format_sid |
format raw output from load_sid |
format_stecf |
format raw output from load_sid |
Plots:
plot_CLD_bar |
plot |
plot_GES_pies |
plot |
plot_catch_trends |
plot |
plot_discard_current |
plot |
plot_discard_trends |
plot |
plot_kobe |
plot |
plot_status_prop_pies |
plot |
plot_stecf |
plot |
plot_stock_trends |
plot |
Adriana Villamor, Scott Large, Sarah Louise Millar and Colin Millar.
Returns a data frame of reference points, catch, discards, and landings by stock over time.
CLD_trends(x)
CLD_trends(x)
x |
a dataframe output of format_sag function |
A data frame..
Can add some helpful information here
The ICES stock information Database web sevices: http://sid.ices.dk/services/
stock_trends
for formatting data from the ICES Stock Assessment database.
icesFO-package
gives an overview of the package.
## Not run: CLD_2018 <- catch_landings_discards(sag_formatted) ## End(Not run)
## Not run: CLD_2018 <- catch_landings_discards(sag_formatted) ## End(Not run)
Based on landings and catches by species and gear, compute a matrix of technical interaction values and main gear contributions.
compute_technical_interactions(x, threshByCatch = 5, thresholdMainGear = 0.8, thresholdCoCatches = 0.5, catchCoverage = 0.95)
compute_technical_interactions(x, threshByCatch = 5, thresholdMainGear = 0.8, thresholdCoCatches = 0.5, catchCoverage = 0.95)
x |
a dataframe in the same format as the STECF data. |
threshByCatch |
minimum tonnage for a species to be considered a by catch (default 5) |
thresholdMainGear |
a threshold for including gears contributing to co-catches, to retain only the gear with the greatest contribution set this to 1 (default is 0.8) |
thresholdCoCatches |
a proportion giving the threshold for when we decide that there is co-catches (default 0.5) |
catchCoverage |
the propotion of total catch to cover in the tables i.e. 0.95 gives a table convering 95% of the total catch (default 0.95) |
A list with four elements, technical interactions for landings (recapLand) and catch (recapCatch) and tables of main gears involved in the interactions based on landings (MainGearsLandings) and catches (MainGearsCatches)
Technical interaction appears between stocks when they are caught by the same gear during a fishing operation. Ideally the technical interaction should then be studied at the scale of the fishing operation to prevent artificially creating technical interaction between stocks that might only be caught at day/night or in different areas/timing of the year. However, often, the finest available information is per stock/gear/area/season. Knowing these limitations, the methodology used here consists in computing the sum of landings per strata of one species given that a second species is also present in the landings of this strata and then dividing this number by the total landings of the first species:
Where T is the value of the technical interaction, i and j are the two species for which the technical interaction is assessed. P is an indicator variable and equals 0 if the total landings of a species for a for a given strata is less than 5 total landings for that strata and 1 otherwise. L is the landings for a given species and strata.
Strata corresponds to the provided disaggregation of the landings.
plot_technical_interactions
for plotting technical interactions.
icesFO-package
gives an overview of the package.
## Not run: technical_interacton <- compute_technical_interactions(STECF_landings, catchCoverage = 0.99) plot_technical_interactions(technical_interacton$recapLand) ## End(Not run)
## Not run: technical_interacton <- compute_technical_interactions(STECF_landings, catchCoverage = 0.99) plot_technical_interactions(technical_interacton$recapLand) ## End(Not run)
It provides an excel file with color names per status, as well as other information that might be required for an annex table
format_annex_table(df, year)
format_annex_table(df, year)
df |
a dataframe output from format_sag_status. |
year |
the active year |
A data frame
Can add some helpful information here
format_sag
for formatting raw data from the ICES Stock Assessment database.
icesFO-package
gives an overview of the package.
## Not run: sid_format <- format_sid(x, "Celtic Seas") ## End(Not run)
## Not run: sid_format <- format_sid(x, "Celtic Seas") ## End(Not run)
Format the data from the ICES Stock Assessment Database for the downloaded year and the specific Ecoregion for which you are producing the Fisheries Overviews.
format_catches(year, ecoregion, historical, official, preliminary = NULL, species_list, sid)
format_catches(year, ecoregion, historical, official, preliminary = NULL, species_list, sid)
year |
the year required |
ecoregion |
an identifier of the Ecoregion of interest |
historical |
a dataframe output from load_historical_catches() required. |
official |
a dataframe output from load_official_catches() required. |
preliminary |
a dataframe output from load_preliminary_catches() optional. |
species_list |
a list of species common names and scientific names from ASFIS |
sid |
the main table from ICES Stock Information DB (SD) |
A data frame..
Can add some helpful information here
The ICES stock information Database web sevices: http://sid.ices.dk/services/
format_sid
for formatting raw data from the ICES Stock Information database.
icesFO-package
gives an overview of the package.
## Not run: sid <- load_sid(2019) species_list <- load_asfis_species() historical <- load_historical_catches() official <- load_official_catches() preliminary <- load_preliminary_catches(2018) catches_format <- format_catches(2019, "Celtic Seas", historical, official, preliminary, species_list, sid) ## End(Not run)
## Not run: sid <- load_sid(2019) species_list <- load_asfis_species() historical <- load_historical_catches() official <- load_official_catches() preliminary <- load_preliminary_catches(2018) catches_format <- format_catches(2019, "Celtic Seas", historical, official, preliminary, species_list, sid) ## End(Not run)
Format the data from the ICES Stock Assessment Database for the downloaded year and the specific Ecoregion for which you are producing the Fisheries Overviews.
format_sag(x, y, year, ecoregion)
format_sag(x, y, year, ecoregion)
x |
a dataframe output from load_sag_summary() required. |
y |
a dataframe output from load_sag_refpts() required. |
year |
the year for which data is required. |
ecoregion |
an identifier of the Ecoregion of interest |
A data frame..
Can add some helpful information here
The ICES stock information Database web sevices: http://sid.ices.dk/services/
format_sid
for formatting raw data from the ICES Stock Information database.
icesFO-package
gives an overview of the package.
## Not run: sag_format <- format_sag(x,y, "Celtic Seas") ## End(Not run)
## Not run: sag_format <- format_sag(x,y, "Celtic Seas") ## End(Not run)
Format the data from the ICES Stock Assessment Database for the downloaded year and the specific Ecoregion for which you are producing the Fisheries Overviews.
format_sag_status(x, year, ecoregion)
format_sag_status(x, year, ecoregion)
x |
a dataframe output from load_sag_status() required. |
year |
the year required |
ecoregion |
an identifier of the Ecoregion of interest |
A data frame..
Can add some helpful information here
The ICES stock information Database web sevices: http://sid.ices.dk/services/
format_sid
for formatting raw data from the ICES Stock Information database.
icesFO-package
gives an overview of the package.
## Not run: sag_status <- format_sag_status(x,"Celtic Seas") ## End(Not run)
## Not run: sag_status <- format_sag_status(x,"Celtic Seas") ## End(Not run)
Format the data from the ICES Stock Information Database for the downloaded year and the specific Ecoregion for which you are producing the Fisheries Overviews.
format_sid(x, ecoregion)
format_sid(x, ecoregion)
x |
a dataframe output from load_sid() required. |
ecoregion |
an identifier of the Ecoregion of interest |
A data frame..
Can add some helpful information here
The ICES stock information Database web sevices: http://sid.ices.dk/services/
format_sag
for formatting raw data from the ICES Stock Assessment database.
icesFO-package
gives an overview of the package.
## Not run: sid_format <- format_sid(x, "Celtic Seas") ## End(Not run)
## Not run: sid_format <- format_sid(x, "Celtic Seas") ## End(Not run)
Format the data from STECF effort and landings for the specific Ecoregion for which you are producing the Fisheries Overviews.
format_stecf_effort(x) format_stecf_landings(x)
format_stecf_effort(x) format_stecf_landings(x)
x |
the name of the dataframe with effort data |
These two dataframes have to be downloaded by hand and put in the data folder. The proper Annexes have to decided by the user.
a data frame of stock status relative to reference points and catch, discards, and landings by stock for the most recent assessment.
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.
Can add some helpful information here
STECF dissemination tool https://stecf.jrc.ec.europa.eu/web/stecf/dd/effort/graphs-annex
format_sag
for formatting raw data from the ICES Stock Assessment database.
icesFO-package
gives an overview of the package.
## Not run: stecf_formatted <- format_stecf("Celtic Seas") ## End(Not run)
## Not run: stecf_formatted <- format_stecf("Celtic Seas") ## End(Not run)
Wrangling of format_sag output to obtain a dataframe with time-series of F, Fmsy, SSB and MSY B trigger for each guild in the Ecoregion, according to the last assessment (relative to the set year) This guild grouping is used in the Ecosystem Overviews.
guild_trends(x)
guild_trends(x)
x |
a dataframe output of format_sag function |
A data frame..
Can add some helpful information here
The ICES stock information Database web sevices: http://sid.ices.dk/services/
format_sag
for formatting data from the ICES Stock Assessment database.
icesFO-package
gives an overview of the package.
## Not run: trends <- guild_trends(sag_formatted) ## End(Not run)
## Not run: trends <- guild_trends(sag_formatted) ## End(Not run)
Returns a simple features object with polygons for all subdivisions
load_areas(ecoregion, precision = 3)
load_areas(ecoregion, precision = 3)
ecoregion |
an ICES ecoregion to download ICES areas from (e.g "Baltic Sea") |
precision |
the numnber of decimal places required in the coordinates |
A simple features collection
icesFO-package
gives an overview of the package.
## Not run: ices_areas <- load_areas("Greater North Sea") ## End(Not run)
## Not run: ices_areas <- load_areas("Greater North Sea") ## End(Not run)
Download
load_asfis_species()
load_asfis_species()
A data frame
load_sag
for loading data from the ICES Stock Assessment database.
icesFO-package
gives an overview of the package.
## Not run: catches_hist_raw <- load_historical_catches() catches_official_raw <- load_official_catches() catches_prelim_raw <- load_preliminary_catches() ## End(Not run)
## Not run: catches_hist_raw <- load_historical_catches() catches_official_raw <- load_official_catches() catches_prelim_raw <- load_preliminary_catches() ## End(Not run)
Download historical and current catches data from the ICES web services also preliminary catches can be downloaded for the current year
load_historical_catches() load_official_catches() load_preliminary_catches(year)
load_historical_catches() load_official_catches() load_preliminary_catches(year)
year |
the year for which data is required. |
A data frame..
Can add some helpful information here
The ICES stock information Database web sevices: http://sid.ices.dk/services/
load_sag
for loading data from the ICES Stock Assessment database.
icesFO-package
gives an overview of the package.
## Not run: catches_hist_raw <- load_historical_catches() catches_official_raw <- load_official_catches() catches_prelim_raw <- load_preliminary_catches() ## End(Not run)
## Not run: catches_hist_raw <- load_historical_catches() catches_official_raw <- load_official_catches() catches_prelim_raw <- load_preliminary_catches() ## End(Not run)
Returns a simple features object with a polygon for each ecoregion
load_ecoregion(ecoregion, precision = 3)
load_ecoregion(ecoregion, precision = 3)
ecoregion |
an ICES ecoregion to download (e.g "Baltic Sea") |
precision |
the numnber of decimal places required in the coordinates |
A simple features collection
icesFO-package
gives an overview of the package.
## Not run: ecoregion <- load_ecoregion("Baltic Sea") ## End(Not run)
## Not run: ecoregion <- load_ecoregion("Baltic Sea") ## End(Not run)
Download data from the ICES Stock Assessment database for the year in which you are producing the Fisheries Overviews. Form SAG
load_sag_summary(year) load_sag_refpts(year) load_sag_status(year)
load_sag_summary(year) load_sag_refpts(year) load_sag_status(year)
year |
the year for which data is required. |
A data frame..
Can add some helpful information here
The ICES stock assessment graphs Database web sevices: http://standardgraphs.ices.dk/stockList.aspx
load_sid
for loading data from the ICES Stock Information database.
icesFO-package
gives an overview of the package.
## Not run: sag_summary_raw <- load_sag_summary(2019) sag_refpts_raw <- load_sag_refpts(2019) sag_status_raw <- load_sag_status(2019) ## End(Not run)
## Not run: sag_summary_raw <- load_sag_summary(2019) sag_refpts_raw <- load_sag_refpts(2019) sag_status_raw <- load_sag_status(2019) ## End(Not run)
Download data from the ICES Stock Information Database for the year in which you are producing the Fisheries Overviews.
load_sid(year)
load_sid(year)
year |
the year for which data is required. |
A data frame..
Can add some helpful information here
The ICES stock information Database web sevices: http://sid.ices.dk/services/
load_sag
for loading data from the ICES Stock Assessment database.
icesFO-package
gives an overview of the package.
## Not run: sid_raw <- load_sid(2019) ## End(Not run)
## Not run: sid_raw <- load_sid(2019) ## End(Not run)
Returns a data frame of giving the ecoregion for each ICES statistical rectangle
load_statrec2ecoregions()
load_statrec2ecoregions()
A data frame
icesFO-package
gives an overview of the package.
## Not run: statrec2ecoregion <- load_statrec2ecoregion() ## End(Not run)
## Not run: statrec2ecoregion <- load_statrec2ecoregion() ## End(Not run)
Wrangling of format_sag output to obtain a dataframe with time-series of F, Fmsy, SSB and MSY B trigger for each stock in the Ecoregion, according to the last assessment (relative to the set year)
plot_catch_trends(x, type = c("COMMON_NAME", "COUNTRY", "GUILD"), line_count = 10, plot_type = c("line", "area"), preliminary_catches = TRUE, official_catches_year = 2018, return_data = FALSE)
plot_catch_trends(x, type = c("COMMON_NAME", "COUNTRY", "GUILD"), line_count = 10, plot_type = c("line", "area"), preliminary_catches = TRUE, official_catches_year = 2018, return_data = FALSE)
x |
a dataframe output of stockstatus+catch_current.R |
type |
COMMON_NAME, COUNTRY or GUILD |
line_count |
number of lines to show |
plot_type |
either line or area |
preliminary_catches |
logical flag |
official_catches_year |
year required |
return_data |
a parameter indicating if the data behind the plot should be returned as a dataframe |
A plot
Can add some helpful information here
The ICES stock information Database web sevices: http://sid.ices.dk/services/
plot_CLD_bar
Stock status relative to reference points.
icesFO-package
gives an overview of the package.
## Not run: plot1 <- plot_CLD_bar(CLDstatus, guild="Demersal", return_data = TRUE) ## End(Not run)
## Not run: plot1 <- plot_CLD_bar(CLDstatus, guild="Demersal", return_data = TRUE) ## End(Not run)
Wrangling of format_sag output to obtain a dataframe with time-series of F, Fmsy, SSB and MSY B trigger for each stock in the Ecoregion, according to the last assessment (relative to the set year)
plot_CLD_bar(x, guild, caption = TRUE, cap_year, cap_month, return_data = FALSE)
plot_CLD_bar(x, guild, caption = TRUE, cap_year, cap_month, return_data = FALSE)
x |
a dataframe output of stockstatus+catch_current.R |
guild |
an identifier of the Fisheries guild to plot |
caption |
logical flag |
cap_year |
the year to be shown in the figure caption |
cap_month |
the month to be shown in the figure caption, the accession date to SAG usually |
return_data |
a parameter indicating if the data behind the plot should be returned as a dataframe |
A plot
Can add some helpful information here
The ICES stock information Database web sevices: http://sid.ices.dk/services/
plot_CLD_bar
Stock status relative to reference points.
icesFO-package
gives an overview of the package.
## Not run: plot1 <- plot_CLD_bar(CLDstatus, guild="Demersal", return_data = TRUE) ## End(Not run)
## Not run: plot1 <- plot_CLD_bar(CLDstatus, guild="Demersal", return_data = TRUE) ## End(Not run)
Wrangling of format_sag output to obtain a dataframe with time-series of F, Fmsy, SSB and MSY B trigger for each stock in the Ecoregion, according to the last assessment (relative to the set year)
plot_discard_current(x, year, position_letter = "b)", caption = TRUE, cap_year, cap_month, return_data = FALSE)
plot_discard_current(x, year, position_letter = "b)", caption = TRUE, cap_year, cap_month, return_data = FALSE)
x |
a dataframe output of CLD_trends |
year |
the year required |
position_letter |
is this figure "a)", or "b)" etc. |
caption |
logical for whether there should be a caption |
cap_year |
the year to be shown in the figure caption |
cap_month |
the month to be shown in the figure caption, the accession date to SAG usually |
return_data |
a parameter indicating if the data behind the plot should be returned as a dataframe |
A plot
Can add some helpful information here
The ICES stock information Database web sevices: http://sid.ices.dk/services/
plot_discard_current
a plot of landings and discards by fish category in the last year for an ecoregion.
icesFO-package
gives an overview of the package.
## Not run: plot1 <- plot_discard_trends(CLDtrends, caption = T,cap_year, cap_month, return_data = TRUE) ## End(Not run)
## Not run: plot1 <- plot_discard_trends(CLDtrends, caption = T,cap_year, cap_month, return_data = TRUE) ## End(Not run)
Wrangling of format_sag output to obtain a dataframe with time-series of F, Fmsy, SSB and MSY B trigger for each stock in the Ecoregion, according to the last assessment (relative to the set year)
plot_discard_trends(x, year, caption = FALSE, cap_year, cap_month, return_data = FALSE)
plot_discard_trends(x, year, caption = FALSE, cap_year, cap_month, return_data = FALSE)
x |
a dataframe output of CLD_trends |
year |
year required |
caption |
logial flag |
cap_year |
the year to be shown in the figure caption |
cap_month |
the month to be shown in the figure caption, the accession date to SAG usually |
return_data |
a parameter indicating if the data behind the plot should be returned as a dataframe |
A plot
Can add some helpful information here
The ICES stock information Database web sevices: http://sid.ices.dk/services/
plot_discard_current
a plot of landings and discards by fish category in the last year for an ecoregion.
icesFO-package
gives an overview of the package.
## Not run: plot1 <- plot_discard_trends(CLDtrends, caption = T,cap_year, cap_month, return_data = TRUE) ## End(Not run)
## Not run: plot1 <- plot_discard_trends(CLDtrends, caption = T,cap_year, cap_month, return_data = TRUE) ## End(Not run)
Returns an map of the ecoregion and the divisions included in it
plot_ecoregion_map(ecoregion, ices_areas)
plot_ecoregion_map(ecoregion, ices_areas)
ecoregion |
a simple features dataframe output of load_ecoregions( ... ) |
ices_areas |
a simple features dataframe output of load_areas( ... ) |
A ggplot plot
plot_CLD_bar
Stock status relative to reference points.
icesFO-package
gives an overview of the package.
## Not run: ices_areas <- load_areas("Baltic Sea") ecoregion <- load_ecoregion("Baltic Sea") eco_map <- plot_ecoregion_map(ecoregion, ices_areas) ## End(Not run)
## Not run: ices_areas <- load_areas("Baltic Sea") ecoregion <- load_ecoregion("Baltic Sea") eco_map <- plot_ecoregion_map(ecoregion, ices_areas) ## End(Not run)
Returns an map of the ecoregion and the divisions included in it
plot_effort_map(effort, ecoregion)
plot_effort_map(effort, ecoregion)
effort |
a dataframe of effort data with a WKT columns (see notes) |
ecoregion |
a dataframe output of load_ecoregion( ... ) |
A ggplot object
The effort data.frame is conveted to an sf object for plotting and is expeted to have a Well Known Text column containing polygons of c-squares
plot_ecoregion_map
plots ICES areas and ecoregion.
## Not run: ecoregion <- load_ecoregion("Baltic Sea") effort <- icesVMS::get_effort_map("Baltic Sea") # convert to sf effort <- sf::st_as_sf(effort, wkt = "wkt", crs = 4326) # select gears to plot gears <- c("Static", "Midwater", "Otter", "Demersal seine") effort <- effort[effort$fishing_category_FO %in% gears,] plot1 <- plot_effort_map(effort, ecoregion) ## End(Not run)
## Not run: ecoregion <- load_ecoregion("Baltic Sea") effort <- icesVMS::get_effort_map("Baltic Sea") # convert to sf effort <- sf::st_as_sf(effort, wkt = "wkt", crs = 4326) # select gears to plot gears <- c("Static", "Midwater", "Otter", "Demersal seine") effort <- effort[effort$fishing_category_FO %in% gears,] plot1 <- plot_effort_map(effort, ecoregion) ## End(Not run)
Wrangling of format_sag output to obtain a dataframe with time-series of F, Fmsy, SSB and MSY B trigger for each stock in the Ecoregion, according to the last assessment (relative to the set year)
plot_GES_pies(x, y, cap_month = "August", cap_year = "2019", return_data = FALSE)
plot_GES_pies(x, y, cap_month = "August", cap_year = "2019", return_data = FALSE)
x |
a dataframe output of format_sag_status.R |
y |
a dataframe output of stockstatus_CLD_current.R |
cap_month |
the month to be shown in the figure caption, the accession date to SAG usually |
cap_year |
the year to be shown in the figure caption |
return_data |
a parameter indicating if the data behind the plot should be returned as a dataframe |
A plot
Can add some helpful information here
The ICES stock information Database web sevices: http://sid.ices.dk/services/
plot_CLD_bar
Stock status relative to reference points.
icesFO-package
gives an overview of the package.
## Not run: plot1 <- plot_CLD_bar(CLDstatus, guild="Demersal", return_data = TRUE) ## End(Not run)
## Not run: plot1 <- plot_CLD_bar(CLDstatus, guild="Demersal", return_data = TRUE) ## End(Not run)
Wrangling of format_sag output to obtain a dataframe with time-series of F, Fmsy, SSB and MSY B trigger for each guild in the Ecoregion, according to the last assessment (relative to the set year)
plot_guild_trends(x, cap_year, cap_month, return_data = FALSE)
plot_guild_trends(x, cap_year, cap_month, return_data = FALSE)
x |
a dataframe output of guild_trends function |
cap_year |
the year to be shown in the figure caption |
cap_month |
the month to be shown in the figure caption, the accession date to SAG usually |
return_data |
a parameter indicating if the data behind the plot should be returned as a dataframe |
A plot
Can add some helpful information here
The ICES stock information Database web sevices: http://sid.ices.dk/services/
format_sag
for formatting data from the ICES Stock Assessment database.
icesFO-package
gives an overview of the package.
## Not run: plot1 <- plot_guild_trends(trends2018) ## End(Not run)
## Not run: plot1 <- plot_guild_trends(trends2018) ## End(Not run)
Wrangling of format_sag output to obtain a dataframe with time-series of F, Fmsy, SSB and MSY B trigger for each stock in the Ecoregion, according to the last assessment (relative to the set year)
plot_kobe(x, guild, caption = FALSE, cap_year, cap_month, return_data = FALSE)
plot_kobe(x, guild, caption = FALSE, cap_year, cap_month, return_data = FALSE)
x |
a dataframe output of stockstatus+catch_current.R |
guild |
an identifier of the Fisheries guild to plot |
caption |
logical flag |
cap_year |
the year to be shown in the figure caption |
cap_month |
the month to be shown in the figure caption, the accession date to SAG usually |
return_data |
a parameter indicating if the data behind the plot should be returned as a dataframe |
A plot
Can add some helpful information here
The ICES stock information Database web sevices: http://sid.ices.dk/services/
plot_kobe
Stock status relative to reference points.
icesFO-package
gives an overview of the package.
## Not run: plot1 <- plot_kobe(CLDstatus, guild="Demersal", return_data = TRUE) ## End(Not run)
## Not run: plot1 <- plot_kobe(CLDstatus, guild="Demersal", return_data = TRUE) ## End(Not run)
Returns an map of the ecoregion and the divisions included in it
plot_sar_map(sar, ecoregion, what)
plot_sar_map(sar, ecoregion, what)
sar |
a dataframe of swept area ratio data with a WKT columns (see notes) |
ecoregion |
a dataframe output of load_ecoregion( ... ) |
what |
a flag which SAR value to plot - either "surface" or "subsurface" |
A ggplot object
The effort data.frame is conveted to an sf object for plotting and is expeted to have a Well Known Text column containing polygons of c-squares
plot_ecoregion_map
plots ICES areas and ecoregion.
## Not run: ecoregion <- load_ecoregion("Baltic Sea") sar <- icesVMS::get_sar_map("Baltic Sea") # convert to sf sar <- sf::st_as_sf(sar, wkt = "wkt", crs = 4326) plot1 <- plot_sar_map(sar, ecoregion, what = "surface") ## End(Not run)
## Not run: ecoregion <- load_ecoregion("Baltic Sea") sar <- icesVMS::get_sar_map("Baltic Sea") # convert to sf sar <- sf::st_as_sf(sar, wkt = "wkt", crs = 4326) plot1 <- plot_sar_map(sar, ecoregion, what = "surface") ## End(Not run)
Wrangling of format_sag output to obtain a dataframe with time-series of F, Fmsy, SSB and MSY B trigger for each stock in the Ecoregion, according to the last assessment (relative to the set year)
plot_status_prop_pies(x, cap_month = "November", cap_year = "2018", return_data = FALSE)
plot_status_prop_pies(x, cap_month = "November", cap_year = "2018", return_data = FALSE)
x |
a dataframe output of format_sag_status.R |
cap_month |
the month to be shown in the figure caption, the accession date to SAG usually |
cap_year |
the year to be shown in the figure caption |
return_data |
a parameter indicating if the data behind the plot should be returned as a dataframe |
A plot
Can add some helpful information here
The ICES stock information Database web sevices: http://sid.ices.dk/services/
plot_CLD_bar
Stock status relative to reference points.
icesFO-package
gives an overview of the package.
## Not run: plot1 <- plot_CLD_bar(CLDstatus, guild="Demersal", return_data = TRUE) ## End(Not run)
## Not run: plot1 <- plot_CLD_bar(CLDstatus, guild="Demersal", return_data = TRUE) ## End(Not run)
The stecf_plot
function returns an area or line plot of landings (historic and official catch) for an ecoregion by country
guild, or species.
plot_stecf(x, type, variable = NULL, cap_year, cap_month, line_count, stecf_report, return_data = FALSE)
plot_stecf(x, type, variable = NULL, cap_year, cap_month, line_count, stecf_report, return_data = FALSE)
x |
a dataframe resulting from format_stecf_effort function |
type |
need description |
variable |
need description |
cap_year |
the year to be shown in the figure caption |
cap_month |
the month to be shown in the figure caption, the accession date to SAG usually |
line_count |
indicates the number of lines to be shown in the graph |
stecf_report |
need description |
return_data |
a parameter indicating if the data behind the plot should be returned as a dataframe |
A ggplot2 object
## Not run: stecf_plot("Greater North Sea Ecoregion", metric = "EFFORT", type = "GEAR", return_plot = TRUE, line_count = 4) ## End(Not run)
## Not run: stecf_plot("Greater North Sea Ecoregion", metric = "EFFORT", type = "GEAR", return_plot = TRUE, line_count = 4) ## End(Not run)
Wrangling of format_sag output to obtain a dataframe with time-series of F, Fmsy, SSB and MSY B trigger for each stock in the Ecoregion, according to the last assessment (relative to the set year)
plot_stock_trends(x, guild, cap_year, cap_month, return_data = FALSE)
plot_stock_trends(x, guild, cap_year, cap_month, return_data = FALSE)
x |
a dataframe output of stock_trends function |
guild |
an identifier of the Fisheries guild to plot |
cap_year |
the year to be shown in the figure caption |
cap_month |
the month to be shown in the figure caption, the accession date to SAG usually |
return_data |
a parameter indicating if the data behind the plot should be returned as a dataframe |
A plot
Can add some helpful information here
The ICES stock information Database web sevices: http://sid.ices.dk/services/
format_sag
for formatting data from the ICES Stock Assessment database.
icesFO-package
gives an overview of the package.
## Not run: plot1 <- plot_stock_trends(trends2018) ## End(Not run)
## Not run: plot1 <- plot_stock_trends(trends2018) ## End(Not run)
Based on a matrix of technical interactions produce an image plot with a legend.
plot_technical_interactions(x, col = heat.colors(5, rev = TRUE))
plot_technical_interactions(x, col = heat.colors(5, rev = TRUE))
x |
a square matrix with identical row and column names containing values of tecnical interaction between species |
col |
a vector of colours to use on the image plot |
A list with four elements, technical interactions for landings (recapLand) and catch (recapCatch) and tables of main gears involved in the interactions based on landings (MainGearsLandings) and catches (MainGearsCatches)
compute_technical_interactions
for computing technical interactions.
icesFO-package
gives an overview of the package.
## Not run: technical_interacton <- compute_technical_interactions(STECF_landings, catchCoverage = 0.99) plot_technical_interactions(technical_interacton$recapLand) ## End(Not run)
## Not run: technical_interacton <- compute_technical_interactions(STECF_landings, catchCoverage = 0.99) plot_technical_interactions(technical_interacton$recapLand) ## End(Not run)
The stecf_plot
function returns an area or line plot of landings (historic and official catch) for an ecoregion by country
guild, or species.
plot_vms(x, metric = NULL, type = NULL, cap_year, cap_month, line_count, return_data = FALSE)
plot_vms(x, metric = NULL, type = NULL, cap_year, cap_month, line_count, return_data = FALSE)
x |
a dataframe resulting from icesVMS::get_fo_effort() or icesVMS::get_fo_landings() |
metric |
either "effort" or "landings" |
type |
either "country" or "gear_category" |
cap_year |
the year to be shown in the figure caption |
cap_month |
the month to be shown in the figure caption, the accession date to SAG usually |
line_count |
indicates the number of lines to be shown in the graph |
return_data |
a parameter indicating if the data behind the plot should be returned as a dataframe |
A ggplot2 object
## Not run: vms_plot("Greater North Sea Ecoregion", metric = "effort", type = "gear_category", line_count = 4) ## End(Not run)
## Not run: vms_plot("Greater North Sea Ecoregion", metric = "effort", type = "gear_category", line_count = 4) ## End(Not run)
Wrangling of format_sag output to obtain a dataframe with time-series of F, Fmsy, SSB and MSY B trigger for each stock in the Ecoregion, according to the last assessment (relative to the set year)
stock_trends(x)
stock_trends(x)
x |
a dataframe output of format_sag function |
A data frame..
Can add some helpful information here
The ICES stock information Database web sevices: http://sid.ices.dk/services/
format_sag
for formatting data from the ICES Stock Assessment database.
icesFO-package
gives an overview of the package.
## Not run: trends <- stock_trends(sag_formatted) ## End(Not run)
## Not run: trends <- stock_trends(sag_formatted) ## End(Not run)
returns a data frame of stock status relative to reference points and catch, discards, and landings by stock for the most recent assessment.
stockstatus_CLD_current(x)
stockstatus_CLD_current(x)
x |
a dataframe output of format_sag function |
A data frame..
Can add some helpful information here
The ICES stock information Database web sevices: http://sid.ices.dk/services/
stock_trends
for formatting data from the ICES Stock Assessment database.
icesFO-package
gives an overview of the package.
## Not run: CLD_2018 <- catch_landings_discards(sag_formatted) ## End(Not run)
## Not run: CLD_2018 <- catch_landings_discards(sag_formatted) ## End(Not run)