-
Notifications
You must be signed in to change notification settings - Fork 7
[feat] Update biomass/abundance/catch table #373
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
Open
sbreitbart-NOAA
wants to merge
11
commits into
main
Choose a base branch
from
revamp-tab-bnc
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.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
36a9a22
Add key quantities to bnc caption; remove unnecessary 'year' arg from…
sbreitbart-NOAA 920f66a
Continue "revamping" bnc table to match structure and formatting of l…
sbreitbart-NOAA fb42918
Add bnc table to save_all_plots() and its test; update bnc tests
sbreitbart-NOAA 07abe98
Troubleshoot failing bnc table pipeline
sbreitbart-NOAA 59e5281
Update function as per coworking; change name from bnc to spelled-out…
sbreitbart-NOAA 46152cd
Update rda-exporting portion of bnc table function
sbreitbart-NOAA d77a8cc
Update alt text/captions/kqs templates with bnc table values
sbreitbart-NOAA d2acc8c
Remove unused unit_label as arg from create_rda(); update documentation
sbreitbart-NOAA 11c78e3
Streamline bac table's unit label arguments
sbreitbart-NOAA 4f79947
Update tests and documentation
sbreitbart-NOAA 1bfca09
Remove warning from test
sbreitbart-NOAA File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -84,10 +84,6 @@ | |
| #' | ||
| #' Default: "" | ||
| #' | ||
| #' @param biomass_unit_label String. Abbreviated biomass units | ||
| #' | ||
| #' Default: "mt" | ||
| #' | ||
| #' @param catch_unit_label String. Abbreviated catch units | ||
| #' | ||
| #' Default: "mt" | ||
|
|
@@ -146,6 +142,7 @@ save_all_plots <- function( | |
| figures_tables_dir = getwd(), | ||
| # imported from plot_biomass | ||
| ref_line = "msy", | ||
| biomass_unit_label = "mt", | ||
| biomass_scale_amount = 1, | ||
| # imported from plot_landings | ||
| landings_unit_label = "mt", | ||
|
|
@@ -163,12 +160,11 @@ save_all_plots <- function( | |
| biomass_at_age_unit_label = "mt", | ||
| # imported from plot_index | ||
| index_unit_label = "", | ||
| # imported from table_afsc_tier- add potential unique arguments after dev | ||
| # imported from table_bnc | ||
| biomass_unit_label = "mt", | ||
| # imported from table_biomass_abundance_catch | ||
| bac_unit_label = c("biomass" = "mt", "abundance" = "fish", "catch" = "mt"), | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this argument is in the roxygen documentation. Could you also change it to bnc? |
||
| # imported from plot_catch_comp | ||
| catch_unit_label = "mt", | ||
| catch_scale_amount = 1, | ||
| # imported from table_harvest_projection- add potential unique arguments after dev | ||
| # imported from table_index- zero unique arguments | ||
| # imported from table_landings- zero unique arguments | ||
| # imported from table_projections | ||
|
|
@@ -469,29 +465,26 @@ save_all_plots <- function( | |
| ) | ||
|
|
||
| # tables | ||
| # tryCatch( | ||
| # { | ||
| # cli::cli_h2("table_bnc") | ||
| # table_bnc( | ||
| # dat, | ||
| # biomass_unit_label, | ||
| # catch_unit_label, | ||
| # spawning_biomass_label, | ||
| # make_rda = TRUE, | ||
| # tables_dir = figures_tables_dir | ||
| # ) # |> | ||
| # # suppressWarnings() |> | ||
| # # invisible() | ||
| # }, | ||
| # error = function(e) { | ||
| # cli::cli_alert_danger("table_bnc failed to run.") | ||
| # cli::cli_alert("Tip: check that your arguments are correct.") | ||
| # cli::cli_li("biomass_unit_label = {biomass_unit_label}") | ||
| # cli::cli_li("catch_unit_label = {catch_unit_label}") | ||
| # cli::cli_li("spawning_biomass_label = {spawning_biomass_label}") | ||
| # print(e) | ||
| # } | ||
| # ) | ||
| tryCatch( | ||
| { | ||
| cli::cli_h2("table_biomass_abundance_catch") | ||
| table_biomass_abundance_catch( | ||
| dat, | ||
| unit_label = bac_unit_label, | ||
| interactive = interactive, | ||
| make_rda = TRUE, | ||
| tables_dir = figures_tables_dir | ||
| ) # |> | ||
| # suppressWarnings() |> | ||
| # invisible() | ||
| }, | ||
| error = function(e) { | ||
| cli::cli_alert_danger("table_biomass_abundance_catch failed to run.") | ||
| cli::cli_alert("Tip: check that your arguments are correct.") | ||
| cli::cli_li("unit_label = {bac_unit_label}") | ||
| print(e) | ||
| } | ||
| ) | ||
|
|
||
| tryCatch( | ||
| { | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like there has to be an automated way to update this function whenever we add a new figure_* or table_*