-
Notifications
You must be signed in to change notification settings - Fork 5
Redesign key quantity extraction/insertion pipeline #205
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
base: main
Are you sure you want to change the base?
Changes from all commits
c907fa3
97965cb
f749fce
7359734
5f2412b
a231fbe
2a828cc
03bf02b
b717cc1
9f3ccf8
339d1c8
8155b98
86d338c
bd1f9ae
3236f7c
760649d
00ef89f
27d5f71
849bff5
553893f
848ae4e
2b49886
2c06903
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,4 +28,3 @@ export(reference_line) | |
| export(save_all_plots) | ||
| export(table_landings) | ||
| export(theme_noaa) | ||
| export(write_captions) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -99,6 +99,28 @@ plot_landings <- function( | |
|
|
||
| ### Make RDA ---- | ||
| if (make_rda) { | ||
|
|
||
|
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. Is this chunk going to be unique to all plots? Like we won't be able to generalize this and make it more concise?
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. Line 102-108
Collaborator
Author
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. Lines 102-108 are where key quantities are calculated for this plot (and I'd expect this is where each plot/table's KQs will be calculated too). The next couple of functions are where the generalization happens: in the exporting of the KQs into a csv, and the insertion of the KQs into the alt text/captions csv. |
||
| # Obtain relevant key quantities for captions/alt text | ||
| landings.start.year <- min(prepared_data$year) | ||
| landings.end.year <- max(prepared_data$year) | ||
| landings.min <- min(prepared_data$estimate) |> round(digits = 3) | ||
| landings.max <- max(prepared_data$estimate) |> round(digits = 3) | ||
| landings.units <- unit_label | ||
|
|
||
| # calculate & export key quantities | ||
| export_kqs(landings.start.year, | ||
| landings.end.year, | ||
| landings.min, | ||
| landings.max, | ||
| landings.units) | ||
|
|
||
| # Add key quantities to captions/alt text | ||
| insert_kqs(landings.start.year, | ||
| landings.end.year, | ||
| landings.min, | ||
| landings.max, | ||
| landings.units) | ||
|
|
||
| create_rda( | ||
| object = plt, | ||
| # get name of function and remove "plot_" from it | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.