Skip to content

Unable to plot from "DERIVED_QUANTATIES" in stockplotr #219

@JoelRice-NOAA

Description

@JoelRice-NOAA

Stockplotr does not find the spawning biomass in the DERIVED_QUANTITIES module

Identify output file

output_file <- file.path("example_output", "Report.sso")

convert the output

albacore <- stockplotr::convert_output(
output_file,
save_dir = file.path(getwd(), "report", "albacore_conout.rda")
)

stockplotr::plot_spawning_biomass(

  • dat = albacore,
  • geom = "line",
  • group = NULL,
  • facet = NULL,
  • ref_line = c("target" = 10e6),
  • unit_label = "mt",
  • scale_amount = 1e6,
  • relative = TRUE, # changed from FALSE
  • interactive = FALSE,
  • module = "DERIVED_QUANTITIES",
  • linewidth = 2 # increase width of lines
    +) +
  • ggplot2::geom_vline(xintercept = 2020, linetype = "dashed", color = "red")
    !Scale amount is not applicable when relative = TRUE. Resetting scale_amount to 1.
    Errorin process_data():
    !Please check df. This scenario hasn't been considered.
    Show Traceback

albacore %>% dplyr:: filter( year %in% 2000:2020 & label == "spawning_biomass") %>%

  • select(label, estimate,year, uncertainty, module_name, time , era , month ) %>%
  • as.data.frame()
    label estimate year uncertainty module_name time era month
    1 spawning_biomass 21281600 2000 4269500 DERIVED_QUANTITIES
    2 spawning_biomass 20422000 2001 4095280 DERIVED_QUANTITIES
    3 spawning_biomass 19860100 2002 3971540 DERIVED_QUANTITIES
    4 spawning_biomass 20417100 2003 4093120 DERIVED_QUANTITIES

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions