Closed jrenfree closed 3 months ago
This script was made with a specific purpose and recycled several objects created by other scripts for expediency.
@jrenfree, I will aim to port the relevant parts of this script to processSeine_220RL.R, to be used for processing the seine data from fishing vessels for the various reports. I'll try to make it more generic so that it will be disassociated with the estimation of nearshore biomass, since the Lisa Marie sampled the core region N of Cape Mendocino in 2022. I envision sourcing this script in reportSurvey and reportBiomass after the processing of trawl data, and producing analogous objects so they may be added to plots of data from other platforms. However, plotting of these data will have to be done separately.
I've added processSeine_2207RL to the repo. It's a first pass, runs without errors (I think), but should be checked prior to using for biomass estimation. I think it would be fine for plotting catch maps, etc., but may need to be adjusted before combining with other objects from estimateBiomass.
I haven't gone through the code line-by-line, but running it appears to only output length frequencies for each of the CPS species. I don't see any catch maps, which are used in the survey reports. I can go through it see about adding it myself, but thought I should bring this to your attention.
I also see that there are 'processSeine_xxxx' files for other surveys, but they don't appear to be called by the reportSurvey_xxxx files.
It looks like plot_purseSeine_XXXX.r gets called by the survey reports, and processSeine_XXXX.R gets called by estimateBiomass. These two workflows (processing and plotting) should be coordinated, but I think remain separate and called sequentially due to potential breaking of the estimateBiomass workflow. I recommend creating a plotting routine that is analogous to plot_haul_proportion_wt.R and plot_cluster_proportion_wt.R, which is called from all scripts that produce pie charts of trawl catch. Which probably begs for a separate script for processing the trawl catch data, rather than having that code living separately in a bunch of other .Rmd files.
plot_purseSeine_2207RL.r will likely be abandoned for a generic, stand-alone script akin to plot_haul_proportion_wt.r, e.g., plot_seine_proportion_wt.r. For now, the plotting of purse seine data is being accomplished in reportSurvey_2207RL by a bespoke code chunk, but should produce the desired results until this next task is completed.
I believe this has been resolved in later reports by using a generic purseSeine plotting routine. Reopen if not.
I get a number of errors when running this script. Some of the figures do get made, although I'm not sure correctly. For example, the figure 'fig_seine_proportion_set_wt_Carnage.png' appears to plot trawl proportions for Lasker trawls.
It also appears that there are references to files that I either may not have or which use hard-coded paths, such as: