Skip to content

Commit

Permalink
plots for risk assessment 1
Browse files Browse the repository at this point in the history
  • Loading branch information
sgaichas committed Nov 1, 2024
1 parent 63cc548 commit 88e3b89
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion RiskIndicators.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ ggplot2::ggplot(ggplot2::aes(x=scaleCond, y=ecodataScaleCond), color="blue") +
#ggplot2::geom_smooth(data=bsbcondprey, ggplot2::aes(x=scaleMacro, y=scaleCond), method="lm", col="blue") +
ggplot2::geom_abline(intercept = 0, slope = 1, lty=3) +
ggplot2::geom_smooth(method=lm) +
ggpubr::stat_cor(method="pearson", label.x = 0, label.y = -2) +
ggpubr::stat_cor(method="pearson", label.x = 0, label.y = -2, cex ) +
ggplot2::facet_grid(Var~factor(EPU, levels = c("MAB", "GB", "GOM", "SS", "NA")))
p
Expand Down Expand Up @@ -1183,3 +1183,22 @@ mortplot
```

Fake mortality proportions to illustrate risk levels

```{r}
mortprop <- data.frame(spp = c("fishA", "fishB", "fishC", "fishD"),
Fishing = c(0.1, 0.3, 0.5, 0.7),
Unknown = c(0.5, 0.1, 0.0, 0.2),
Predation = c(0.4, 0.6, 0.5, 0.1)) |>
tidyr::pivot_longer(2:4, names_to = "Mortality", values_to = "Proportion")
mortcomp <- ggplot2::ggplot(mortprop, ggplot2::aes("", Proportion, fill=Mortality )) +
ggplot2::geom_bar(width = 1, size = 1, stat = "identity") +
ggplot2::facet_wrap(~spp) +
ggplot2::theme_bw()
mortcomp + scale_fill_brewer(palette="Paired")
```

Binary file modified fwmods/MAB_Rpath_no_disc.RData
Binary file not shown.
Binary file modified fwmods/MAB_params_Rpath_no_disc.RData
Binary file not shown.

0 comments on commit 88e3b89

Please sign in to comment.