Open kellijohnson-NOAA opened 5 years ago
I am all for making both of these packages more consistent with each other. Historically they were developed separately because the data structures are different and the expansion approaches differ. I think brainstorming to see if there are ways to pull these packages together next year would a good idea.
@chantelwetzel-noaa I think the best way to start working on this is to work backwards starting from our desired output, i.e., a data frame that can go into SS, which will be a formatted version of a data frame that could in theory be formatted multiple different ways depending on your assessment model of choice.
Can you help me visualize what the data would look like in step 1? Would it be wide or long, i.e., would there be individual columns for each bin or would bin be a column with information for that bin stored in "value"? In theory, we could make both packages output a data frame that looked like this. Then all formatting / exporting would be done by code that worked on a consistent data frame agnostic to package.
The calculation of composition data from a dataframe with information on expansions (calculated from previous functions) should be essentially the same for the survey and the fishery data. It would be great to maintain one set of code for this in the future rather than two. Not sure which package it would be better to have it in, i.e., here or in nwfsc-assess/nwfscSurvey, it doesn't really matter though. The latter repository has the composition code within other functions, which would mean that the relevant section of code would need to be backed out of other functions. @CWetzel what are your thoughts? I am thinking for next round, not in 2019.