Conversation
| .groups="drop") | ||
| dplyr::summarise(Value = sum(Value), .groups = "drop") |> | ||
| subset(!is.na(Value)) |> | ||
| dplyr::mutate(Fishery = dplyr::recode(Fishery, |
There was a problem hiding this comment.
We shouldn't be doing this. If we need to recode variables we should be doing it programmatically
|
Not sure i understand why this was done! |
|
There have been a lot of post-hoc figure adjustments included in the report knitting in the past. As part of the updated Rmarkdown process and to improve the figure versioning, we're moving all the plotting code into the ecodata functions. |
|
|
||
| if (report == "MidAtlantic") { | ||
| p <- p + | ||
| ggplot2::coord_cartesian(ylim = c(2e+07, 4e+07), xlim = c(1998, 2023)) + |
There was a problem hiding this comment.
cant hard code years, what happens next year?
|
Far too many issues, mostly hardcoded times and names. The PR description should say explicitly why this is needed. There are several products that rely on ecodata, the catalog in particular. Making these types of changes could cause big problems |
| #' | ||
|
|
||
| plot_seal_pups <- function(shadedRegion = NULL, | ||
| report="MidAtlantic") { |
There was a problem hiding this comment.
The idea was to keep the default report name the same across all indicators
|
Yes, Andy is correct. Let's take some extra time to go through/discuss these things. At first glance, there is a lot of hard-coded formatting being carried over from the report .Rmds to the plot functions... this would work to generate plots for the reports, but will negatively impact several of our products that use Generally, tweaks to plots specifically for the reports have to live somewhere specific to the reports. Not in the package itself. |
| report="MidAtlantic") { | ||
| report="MidAtlantic", | ||
| data = all_data, | ||
| port_list = NULL) { |
| report="MidAtlantic", | ||
| varName = "adult", | ||
| n = 0) { | ||
| n = 10) { |
|
Let's circle back to this in the spring/summer. Thanks! |
Plotting code modifications. All mods added to each individual script in ecodata (plot_xxx.R) can be seen in the commented out lines in this script (https://github.com/NEFSC/READ-EDAB-SOE_reports/blob/stephanie_dev/scripts/create_plots.R).
All updated functions in the 'plot_updates' branch have been tested in this script (https://github.com/NEFSC/READ-EDAB-SOE_reports/blob/stephanie_dev/scripts/create_plots_new_SO.R) to ensure they produce the correct figures.