Skip to content

Commit

Permalink
compare ecodata condition with survey EPU based
Browse files Browse the repository at this point in the history
  • Loading branch information
sgaichas committed Aug 1, 2024
1 parent e596e92 commit 2b1acca
Show file tree
Hide file tree
Showing 28 changed files with 7,658 additions and 690 deletions.
1,528 changes: 838 additions & 690 deletions RiskIndicators.html

Large diffs are not rendered by default.

80 changes: 80 additions & 0 deletions RiskIndicators.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,86 @@ p
```

Updated condition dataset with survey strata based EPU definitions

```{r, fig.width=10, fig.asp=2}
AnnualRelCond2023_Fall <- readr::read_csv(here::here("condition/AnnualRelCond2023_Fall.csv"))
survEPUcond <- AnnualRelCond2023_Fall |>
dplyr::select(Time = YEAR,
Var = Species,
EPU,
Value = MeanCond,
nCond) |>
dplyr::group_by(EPU, Var) |>
dplyr::mutate(scaleCond = scale(Value,scale =T,center=T)) |>
dplyr::mutate(category = cut(scaleCond,
breaks = xs,
labels = c( "Poor Condition",
"Below Average",
"Neutral",
"Above Average",
"Good Condition"),
include.lowest = TRUE))
mafmcsurvEPUcond <- survEPUcond |>
dplyr::filter(Var %in% mafmc_cond)
p <- ggplot2::ggplot() +
ggplot2::theme_bw() +
ggplot2::geom_rect(data = condquants,
aes(ymin = ymin, ymax = ymax, fill = category, xmin = -Inf, xmax = Inf),
alpha = .3) +
ggplot2::scale_fill_manual(values=vir) +
ggplot2::geom_point(data= mafmcsurvEPUcond, ggplot2::aes(x=Time, y=scaleCond[,1])) +
#ggplot2::geom_hline(yintercept = xs[2:5]) +
#ggplot2::geom_line() +
ggplot2::facet_grid(Var~factor(EPU, levels = c("MAB", "GB", "GOM", "SS", "NA")), ) +
ggplot2::guides(fill = ggplot2::guide_legend(reverse = TRUE))
p
```
Condition comparison?

`ecodata::condition` missing EPU values

```{r}
ecodata::condition |> dplyr::filter(is.na(EPU)) |> dplyr::select(Var) |> dplyr::distinct()
```
Survey strata based EPU condition missing EPU values

```{r}
survEPUcond |> dplyr::filter(is.na(EPU)) |> dplyr::select(Var) |> dplyr::distinct()
```


```{r, fig.height=10, fig.asp=6}
compfix <- fix |>
dplyr::rename(ecodataValue = Value,
ecodataScaleCond = scaleCond,
ecodataCategory = category)
compcond <- survEPUcond |>
dplyr::left_join(compfix)
p <- compcond |>
ggplot2::ggplot(ggplot2::aes(x=scaleCond, y=ecodataScaleCond), color="blue") +
ggplot2::theme_bw() +
ggplot2::geom_point() +
#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) +
ggplot2::facet_grid(Var~factor(EPU, levels = c("MAB", "GB", "GOM", "SS", "NA")))
p
```



## Prey indicators

Macrobenthos (fall)
Expand Down
Binary file modified RiskIndicators_files/figure-html/unnamed-chunk-10-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified RiskIndicators_files/figure-html/unnamed-chunk-11-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified RiskIndicators_files/figure-html/unnamed-chunk-12-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified RiskIndicators_files/figure-html/unnamed-chunk-13-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified RiskIndicators_files/figure-html/unnamed-chunk-14-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified RiskIndicators_files/figure-html/unnamed-chunk-15-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified RiskIndicators_files/figure-html/unnamed-chunk-16-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified RiskIndicators_files/figure-html/unnamed-chunk-17-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified RiskIndicators_files/figure-html/unnamed-chunk-18-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified RiskIndicators_files/figure-html/unnamed-chunk-19-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified RiskIndicators_files/figure-html/unnamed-chunk-2-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified RiskIndicators_files/figure-html/unnamed-chunk-20-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified RiskIndicators_files/figure-html/unnamed-chunk-21-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified RiskIndicators_files/figure-html/unnamed-chunk-22-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified RiskIndicators_files/figure-html/unnamed-chunk-23-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified RiskIndicators_files/figure-html/unnamed-chunk-24-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified RiskIndicators_files/figure-html/unnamed-chunk-25-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified RiskIndicators_files/figure-html/unnamed-chunk-26-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified RiskIndicators_files/figure-html/unnamed-chunk-7-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified RiskIndicators_files/figure-html/unnamed-chunk-8-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified RiskIndicators_files/figure-html/unnamed-chunk-9-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2b1acca

Please sign in to comment.