A simple R package to draft ICES advice sheets
ICES provides advice on over 260 fish stocks. In 2017, ICES will provide new advice for 170 of these stocks. Providing uniform and quality controled products is paramount to ICES's mission, however, the number of fish stocks (many with slight variations in data and format) and the practical consideration of having a large network of persons responsible throughout the process can make a consistent product difficult. The impetus, here, is to provide a starting point that reduces Secretariat work load, provides a consistent product, requires no additional software (everything remains a word .docx file!), is mostly hidden from view outside the Secretariat, and is flexible enough for the challenges mentioned above.
Notes: With the implementation of more standardized model output with the ICES Transparent Assessment Framework, some of the limitations mentioned below will be mitigated.
The ReporteRs package can add relevant information from the SD (via the icesSD package) to a generic advice sheet template to create a draft advice sheet for each stock. Each draft advice sheet will have updated stock names, section numbers, advice heading, and caption labels saved to a output folder with a specific file name (e.g., O:/
Building on the above, the docxtractr package can harvest tables from year-1 advice sheets and the ReporteRs package can format and add standard tables to the proper location in the draft advice sheets. Splitting the stocks into data categories (Category 1-6) and stock type (e.g., crustacean, elasmobranch, or fish) will be necessary to format and add the different standard tables for each unique type.
update Now for 2018, the officer package provides much of the text support that was missing from last year. Now, the effort will be to take year-1 advice, clean out the tables and update as a new draft for 2018.
Currently, we create draft advice sheets before the Working Group. If we create draft advice sheets after the final assessment is accepted and uploaded to Stock Assessment Graphs, the icesSAG package can be used to add figures and tables directly into the draft advice sheet.
Tables that should not be transferred from year-1: