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

[Developer Issue]: convert JSON output to R list following plan in design doc #664

Open
iantaylor-NOAA opened this issue Aug 23, 2024 · 2 comments
Assignees
Labels
status: triage_needed This is not approved for this milestone, do not work on it yet

Comments

@iantaylor-NOAA
Copy link
Contributor

Description

I've been working in the r-json branch as directed by @kellijohnson-NOAA to convert new JSON output into the format specified in the Design document for R output.

I'm on leave all of next week so leaving some notes in this issue in case further work is needed before I can continue it or if folks just want to explore the approach we're attempting to take.

What's working:

  • a new function create_fims_output() calls new get_estimates() and get_fits() functions to create tibbles and returns them as a list
  • the get_estimates() function returns all the parameters and derived quantities that are reported in the JSON output
  • the get_fits() function returns the observed and expected values for indices of abundance

What's next:

  • figure out why the test for "agecomp in proportion works" is failing: https://github.com/NOAA-FIMS/FIMS/actions/runs/10533605520/job/29189876127#step:7:176
  • continue development on get_fits() to process age comps and any other data types (incomplete output processing shouldn't impact the test noted above)
  • work with @msupernaw to add a few more things to the output in the JSON file (@kellijohnson-NOAA has a list of ideas that could be added to this issue)
  • fill in lots of missing values in the tibbles that get returned by those functions (in some cases because it's not yet in the JSON output, like the uncertainty estimates)
  • refactor some of the functions to convert the many loops that I used into some more efficient approach that depends on apply functions or stuff in tidyverse or tidyjson (but only if it doesn't make the code really hard to understand and develop)
@iantaylor-NOAA iantaylor-NOAA added the status: triage_needed This is not approved for this milestone, do not work on it yet label Aug 23, 2024
@kellijohnson-NOAA
Copy link
Contributor

@iantaylor-NOAA thank you for your patience. We have been refactoring the .json output based on the need for parameter vectors and some of your comments. You will have a new version by Monday September 23rd that should be easier to parse in R though still not complete with everything that is needed to create the two desired data frames.

@iantaylor-NOAA
Copy link
Contributor Author

Thanks for the update and good to hear about the progress. I'm unavailable Sept 25 - Oct 6 (on the bottom trawl survey), so if there's someone else available to continue the work on the R code for JSON processing, I'm happy to hand this over. Otherwise I can pick up after I return.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: triage_needed This is not approved for this milestone, do not work on it yet
Projects
None yet
Development

No branches or pull requests

2 participants