Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

produceSamplingCoverage function #11

Open
erosquesada opened this issue Oct 18, 2023 · 1 comment
Open

produceSamplingCoverage function #11

erosquesada opened this issue Oct 18, 2023 · 1 comment
Assignees

Comments

@erosquesada
Copy link

erosquesada commented Oct 18, 2023

output from WGRDBES-EST 2023.

This function requires the user to specify data containing the sampling information and a database for contrast (one of landing or effort data). The user should also specify type of comparison and a resolution of the comparison as follows:

  -	Spatial:
  i.	ICES Subdivision
  ii.	ICES Rectangle
  -	Time: 
  i.	Year
  ii.	Semester
  iii.	Quarter
  iv.	Month 
  -	Fleet:
  i.	Scale of the fishery (length vessel discriminate large and small) . 
  ii.       Gear [will be needed to extract it from the metier in CL]  
  -	Species:
  i.	Species list
  ii.	Group list (e.g. Cephalopods). 

The parameters of this function are:

RDBESobj    = RDBESobject to be explored. 
var = weight sampled/number samples/individuals sampled. 
contrastVar = is a variable related to landing or effort selected by the user. 
by =  One (or more) factor(s) to split the data. 
type =  one of spatial, time, fleet, species. 
resolution = is conditional on type. 
year = year(s) to filter the data. 
output_type = one of table | plot. 

The function output provides information on the distribution of the number of samples versus landing or effort unit across the levels of the factors selected by the user.
If output_type == “table” the output is a table.
If output_type == “plot” the output is an heatmap.
If the type == “effort”, the output consist of one plot illustrating the number of sampled trips versus the number of trips that were performed by the fleet.
If the type == “landing”, the output consists of two plots:

  • one plot illustrating the number of samples versus the weight landed.
  • one plot illustrating either the weight sampled (the default option) or the number of individuals sampled (if the weight is not available) versus the weight landed.
@erosquesada erosquesada changed the title SamplingCoverage function 02_SamplingCoverage function Oct 18, 2023
@erosquesada erosquesada self-assigned this Oct 18, 2023
@erosquesada
Copy link
Author

erosquesada commented Oct 17, 2024

Update WGRDBES-EST 2024

The function was amended during WGRDBES-EST 2024. The main edits were related to:

  • Generalizing the function structure to take into account multiple type x resolution combinations.
  • Finalizing the type = "Spatial" x resolution = "ICES Rectangle" combination base version (by = NA) and initiating the work with the parameter by filled.
  • Include the use of showSamples parameter.
  • It was decided that a new level "Region" should be allowed for the type = "Spatial" in order to accomodate the plotting of the sampled information against the contrast variable at the resolution of the regions used in the RCG overviews environment.

The current output of the function, when compiled as follows, is shown below.

produceSamplingCoverage(
  rdbesobj,
  var = "SAsampWtLive",
  contrastVar = "CLoffWeight",
  by = NA,
  type = "Spatial",
  resolution ="ICES Rectangle",
  year = NA,
  quarter = NA, 
  vesselFlag = NA, 
  catchCat = NA, 
  showSamples = T,
  output_type = NA, 
  verbose = T
)

example_produceSamplingCoverage_function_zwData

This combination (type = "Spatial" x resolution = "ICES Rectangle") still requires to be improvement with regards to:

  • Possibly turn down the scientific notation without changing under the hood the user global options, as this may be meet packages development guidelines on CRAN. Still to be decided whether to include a dichotomous parameter (sciNotation?) with this regard.
  • Work on the use of by parameter, with 1+ levels.
  • Work on the output_type = table output.

In summary, the type x resolution developed so far for this function are:

  • Spatial

  • ICES Subdivision

  • ICES Rectangle

  • Time:

  • Year

  • Semester

  • Quarter

  • Month

  • Fleet

  • Scale of the fishery (length vessel discriminate large and small)

  • Gear [will be needed to extract it from the metier in CL] .

  • Species:

  • Species list

  • Group list (e.g. Cephalopods).

With regards to the fleet type, for future development, please note that @JulBond may provide some useful code.

@erosquesada erosquesada changed the title 02_SamplingCoverage function 02_produceSamplingCoverage function Oct 17, 2024
@erosquesada erosquesada changed the title 02_produceSamplingCoverage function produceSamplingCoverage function Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant