Skip to content
/ chartlbi Public

An alternative chart visualisation to the old traffic light system for the Length Based Indicators (LBI) algorithm

License

Notifications You must be signed in to change notification settings

d2gex/chartlbi

Repository files navigation

Documentation

chartlbi

chartlbi is a project built around the utilities for the Length Based Indicator (LBI) algorithm developed by ICES and provides an alternative visualisation of the LBI indicators to the old traffic light system. As a consequence most of the obsolete libraries the original source code was relying on such ReportRs have now vanished. In addition, neither JAVA nor Java dependencies such ReporteRsjars are any longer required, therefore easing its installation.

LBI Visualisation

The primary goal of this wrapper is to make the LBI visual outputs more modern-like, visually-appealing and hopefully more intuitive, facilitating its integration with other similar length-based methods applied as part of everyone's data analysis. Each indicator is now plotted by using ggplot2 and stacked up one on top of another, where every individual indicator value per timestep is visually compared against their theoretical thresholds. Any value equal or above the threshold will be plotted in green and below in red.

Awareness of old bugs

chartlbi has cut from the source code the capacity of showing the Optimal Yield indicator as a function of Lmaxy, that is, the length class from the length-frequency matrix that holds the largest biomass per timestep. The reason being is that there are two bugs in the original source code as follows:

  1. The old algorithm does not contemplate that two length-classes may hold the same biomass. Such case is possible when the mean weight for a single year and length class is calculated as the average weight of all individuals within, rather than using the formula $W = a*L^b$.(See bug source code).
  2. Even when there is only one single length-class per maximum biomass and timestep, the calculation of `Lmaxy` is performed by multiplying the columns of the length-frequency and weight-at-length in desynchronised mode. There is a mismatch for every pair of columns. (See bug source code)

Installation

This R package can be installed through the devtools as follows:

  devtools::install_github("https://github.com/d2gex/chartlbi", dep=TRUE)

About

An alternative chart visualisation to the old traffic light system for the Length Based Indicators (LBI) algorithm

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages