-
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
Changes from all commits
c3204f2
a980f12
861ba15
a592458
ab3e6a7
29b25eb
9ffb77a
824f885
a2604b2
c2acd9d
3d2f7e8
6ae0816
0eb1e23
9311468
5d9d79d
34e6c6c
918de27
45abb4c
6eb5fb5
d712ee0
fd1b5f4
91063aa
d9e0b58
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.