-
Notifications
You must be signed in to change notification settings - Fork 5
Revamped tables #168
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
Draft
sbreitbart-NOAA
wants to merge
44
commits into
main
Choose a base branch
from
revamped-tables
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Revamped tables #168
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* remove exp_all_figs_tables() and add theme_noaa() to exports * Update theme_noaa() to apply viridis palette to figures; update documentation
* add module as argument so user can remove the menu option when it is known * update sr documentation and add argument * Revamped N-at-age plot (#131) * add baseline timeseries plot and adjustments to plot_rec_devs * update function and fix bugs when only one dat is present * move rda out of plot function and add as separate fxn * move rda making functions into single file for organization * minor change to naa plot for testing before dev, lay plot_aa function foundation for other at age plots * add and update plot_aa * adjust plot_abundanc_at_age with revamped, modular design * gsub space for _ when present in faceting and fix error in code * add stop if no data was extracted from the df * select N module - always the first option in output atm * feature to add facet of model when more than one output results are provided * allow filtered data to also be scaled by adding argument * add arg for scaling abundance * adjust how reference line is implemented and make changes to revamped plots that use it * revert new setup of refernce line - can not do list trick, but still make fixes to sb plot * revamp biomass at age plot and update documentation * adjust aa plot so avg age line is added as a component instead of in base * update plot_catch_comps for revamp and follow same type of plot from r4ss * minor adjustments to catch comp, calculate circles are area proportional to catch * add option to turn proportional on/off * add in missing avg age line from baa plot * fix bug where b should have been catch in catch comp plot * fix leftover rebase and re-document * fix missing legend and adjust scales. Add in missing 'proportional' argument to functions * more fixes to legend and testing * update documentation * fix NAA documentation to change group to facet * add commas into legend labels * comment out y limits for now - removing the -1 messes with the y_n_breaks functioning and adds axis ticks on the half * change group to facet in aa args * update all aa plot documentation * Fix key quantity names for NAA so that start/end years are successfully added to alt text * add CAA key quantity calculations to write_captions() * Update R/plot_catch_comp.R Co-authored-by: Sophie Breitbart <sophie.breitbart@noaa.gov> * update figure labels and add in caption and figure for caa plot * update NAA test * add new tests to naa to test proportional arg * update biomass_at_age plot tests and fix issue in extracting biomass * update catch comp tests * Update inst/resources/captions_alt_text_template.csv Co-authored-by: Sophie Breitbart <sophie.breitbart@noaa.gov> * Edited utils_rda.R so that tot.catch.min and max are rounded and subbed into the alt text csv * change cohort line to black and fix error message in catch_comp plot * update stop in catch_comp and update alt text * remove aes(color = model) from plot_aa() * add new key quantities for alt text and update them in export * fix bug in calculating avg age line; update examples in revelant aa plots; update documentation: --------- Co-authored-by: sbreitbart-NOAA <sophie.breitbart@noaa.gov> * fix documentation and replace missing code from old rebases and reverting code * update spawn rec plot and associated functions back to working * add new function to calc magnitude of the label on y axis usually * add option for legend so the units get wrapped or not * update plots that use magnitude labelling method * Update "How captions and alternative text are generated" vignette to match new workflow * fix relative and scale_amount arg implementation into spawning_biomass * add back in rda utils, update sb plot and tests, update documentation * adjust sr plot tests and fix per one test * adjust test and fxn for rec devs * adjust output rda for spawn recruit fxn * update documentation and comment out tests that need updating but aren't part of this PR * fix export_rda -- change back to object instead of final * fix tests and comment out those for fxns that aren't yet modified * additional fixes to functions * minor changes to remove some warnings from checks * fix prep data error is properly incorporated into rec devs plot * Revamped b plot (#136) * add URL and BugReports links to DESCRIPTION, the only non-outdated changes from #86 (comment) * add empty line to end of DESCRIPTION * Update documentation * Update required R version in DESCRIPTION * Update plot_biomass() params, function, documentation * Update plot_biomass test so that it tests when relative = TRUE * change interative default to TRUE --------- Co-authored-by: Schiano-NOAA <samantha.schiano@noaa.gov> * Revamped recruitment plot (#137) * Update plot_recruitment() fxn, documentation, and test * Address spellcheck; update documentation; add module_name example in plot_recruitment() * remove or keep hline in plot_error depending on the plot; replace primary plotting function in plot_recruitment * Make plot_recruitment() line thicker * Update documentation --------- Co-authored-by: Schiano-NOAA <samantha.schiano@noaa.gov> * add option to filter by era in the case that some models don't have it or the user wants to plot all eras, this change also adds lines at points where eras change; this is added into all relevant functions * adjust sr plot to add commas where needed and adjust plot_timeries to add commas to y-axis, also add scale_amount as arg in sr and removed era * fix sr plot where bam was not working if naming not the same. Also remove commans to x-axis from tseries general fxn to sr plot specific * fix reference line label when era is not time * update key quantities for sr * increase descriptiveness of return and standardizes across functions * fix catch comp plot to plot landings for BAM conout --------- Co-authored-by: sbreitbart-NOAA <sophie.breitbart@noaa.gov>
… to better fit axes for all functions
… predicted recruitment is present
…oud under line plot
…f line as subscript in annotation in ggplot2::annotate for reference line label
…sed) then any extra occurrances in the data are included resulting in an incorrect plot
…ot fail when the group doesn't exist
…the case there is only one group and the data gets repeated
…models when it's present
…e to package; fix tests and comment out unused tests
* update process data for a more general process and apply to sb plot * add process data as an export to package * add process_data to biomass * make updates to process_data and add new filtering to biomass plot * fix issue where explicit group was not prioritized and filter biomass to better suit workflow * fix final errors when setting grouping in different ways * fix check in plots for faceting * cleanup plot_biomass and process_data * add process data to NAA plot * add process data to other fxns * fix issue with process data when group is none and add new arg * fix process_data due to conflicting steps since summ happens with group=none * fix issue where when group is null but has an indexing with 1 uniquw value it still plots a legend * update process_data in plot M * minor tweak to process data and fix refernce in fxns * fix plot_land with process_data * add process data to landings and recruitment * update documentation * fix errors from devtools check and fix rec devs fxn with new process_data * fix a couple more issues * fix example in landings plot * adjust fxn title and description * change size to linewidth arg in rec plot * add check before removing age from variables * minor documentation update:
* add documentation for group=none into time series plots where applicable and add to process data. Remove from filter_data * add if else statement to add plots to set facet = none to summarize data * update documentation of facet to reflect new option * fix issue with missing package and catch comp error
…rguments, code, and documentation
…ate table_landings() to create a latex-based table and add it to the rda; update documentation
…not working as expected)
…out code causing issues related to missing alt text for fishing mortality plot
Contributor
Code Metrics Report
Code coverage of files in pull request scope (72.6%)
Reported by octocov |
2111cc1 to
c6b5b4f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
landings_table()to match framework of figurescreate_latex_table()) and incorporate those tables into table rdassave_all_plots()so that it works with revamped figuresLeft to do:
add_theme()to add a consistent theme forgttablestable_landings()to be more stable and flexible (i.e., addressing to-dos, testing with more datasets, and adding functionality for multiple datasets)rel.F.max), landings (fig and table), and recruitment figure (sr.min, sr.max)