Skip to content

Commit

Permalink
Merge branch 'gh-pages' of https://github.com/OHI-Science/ohiprep_v2024
Browse files Browse the repository at this point in the history
… into gh-pages
  • Loading branch information
annaramji committed Sep 4, 2024
2 parents 5bcfa5c + 6f90f50 commit 9c75932
Show file tree
Hide file tree
Showing 10 changed files with 5,353 additions and 870 deletions.
25 changes: 11 additions & 14 deletions globalprep/ao/v2024/ao_stock_status_saup.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ For v2023 and v2024 the Sea Around us Project (SAUP) data used in the ao_catch_p
**Additional Information**: [Methods](http://www.seaaroundus.org/sea-around-us-methods-index/)


**Reference**: [RAM Legacy Stock Assessment Database](http://ramlegacy.org) v4.495
**Reference**: [RAM Legacy Stock Assessment Database](http://ramlegacy.org) v4.65

**Downloaded**: 07/06/2023
**Downloaded**: 08/07/2024

**Description**: B/Bmsy value by stock and year (other data, which we do not use, are also available in the database)

**Native data resolution**: stock (fish stock, species and region specific)

**Time range**: 1800 - 2022 (we only use the year which matches our fisheries catch data (2019 for v2023))
**Time range**: 1800 - 2023 (we only use the year which matches our fisheries catch data (2019 for v2024))

**Format**: CSV format

Expand Down Expand Up @@ -286,7 +286,7 @@ compare <- new %>%
```


```{r, eval = FALSE}
```{r, eval=FALSE}
library(plotly)
library(ggplot2)
Expand All @@ -299,16 +299,13 @@ compare_plotly <- ggplotly(compare_plot, tooltip = c("text", "score", "old_score
compare_plotly
htmlwidgets::saveWidget(compare_plotly, here::here("globalprep","ao", version_year, "figs","v2023_v2024_compare_plot.html"))
```
```{r}
library(tidyverse)
library(here)
library(htmlwidgets)
library(patchwork)
library(ggplot2)
library(dplyr)
source(here("workflow", "R", "common.R"))
#look at the difference between this year and last
new <- read_csv(here::here("globalprep","ao",version_year, "output","ao_nind_scores.csv")) %>%
left_join(rgns_eez)
old <- read_csv(here::here("globalprep","ao",previous_version_year, "output","ao_nind_scores.csv")) %>%
select(rgn_id, year, old_score = score)
# ==== Percent change between this year and last year =====
compare_diff <- new %>%
Expand Down Expand Up @@ -367,7 +364,7 @@ patch_rgn_3
# saveWidget(patch_rgn_3, here::here("globalprep","ao", version_year, "figs","rgn_3_score_comparison.html"))
```

```{r echo=TRUE}
```{r, eval = FALSE}
region_data() # to have access to rgns_all and rgns_eez
Expand Down
2,174 changes: 2,174 additions & 0 deletions globalprep/ao/v2024/ao_stock_status_saup.html

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />


<meta name="author" content="Compiled on Wed Aug 14 16:30:15 2024 by lecuona" />
<meta name="author" content="Compiled on Wed Sep 4 16:58:27 2024 by lecuona" />


<title>OHI 2024: Download SAUP production data and match FAO regions</title>
Expand Down Expand Up @@ -1647,7 +1647,7 @@

<h1 class="title toc-ignore">OHI 2024: Download SAUP production data and
match FAO regions</h1>
<h4 class="author"><em>Compiled on Wed Aug 14 16:30:15 2024 by
<h4 class="author"><em>Compiled on Wed Sep 4 16:58:27 2024 by
lecuona</em></h4>

</div>
Expand Down
4 changes: 2 additions & 2 deletions globalprep/fis/v2024/STEP2a_saup_catch_prep.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />


<meta name="author" content="Compiled on Wed Aug 14 16:31:25 2024 by lecuona" />
<meta name="author" content="Compiled on Wed Sep 4 17:00:06 2024 by lecuona" />


<title>OHI 2024: Food Provision, Preparing catch data for BBmsy calculations and mean catch (weights in FIS model) and FP weights</title>
Expand Down Expand Up @@ -1648,7 +1648,7 @@
<h1 class="title toc-ignore">OHI 2024: Food Provision, Preparing catch
data for BBmsy calculations and mean catch (weights in FIS model) and FP
weights</h1>
<h4 class="author"><em>Compiled on Wed Aug 14 16:31:25 2024 by
<h4 class="author"><em>Compiled on Wed Sep 4 17:00:06 2024 by
lecuona</em></h4>

</div>
Expand Down
20 changes: 13 additions & 7 deletions globalprep/fis/v2024/STEP2b_species_resilience_lookup_table.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@ title: "OHI 2024: FP, SAUP Species Resilience Lookup Table"
author: "*Compiled on `r date()` by `r Sys.info()['user']`*"
output:
html_document:
toc: true
number_sections: true
theme: cerulean
highlight: haddock
includes:
in_header: '../../../workflow/templates/ohi_hdr.html'
code_folding: show
toc: true
toc_depth: 1
toc_float: yes
number_sections: false
theme: cerulean
highlight: haddock
includes:
in_header: '../../../workflow/templates/ohi_hdr.html'
pdf_document:
toc: true
editor_options:
chunk_output_type: console
---

# Summary
Expand All @@ -23,11 +28,12 @@ This script uses FishBase to find the Resilience for each of the species in the

# Setup

```{r setup, include=FALSE}
```{r setup, include=FALSE, eval = FALSE}
knitr::opts_chunk$set(echo = TRUE, eval=FALSE)
library(dplyr)
# install.packages("rfishbase", repos = "http://cran.us.r-project.org")
library(rfishbase)
library(parallel)
Expand Down
1,845 changes: 1,845 additions & 0 deletions globalprep/fis/v2024/STEP2b_species_resilience_lookup_table.html

Large diffs are not rendered by default.

21 changes: 9 additions & 12 deletions globalprep/fis/v2024/STEP3_calculate_bbmsy.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />


<meta name="author" content="Compiled on Mon Sep 11 08:22:41 2023 by egg" />
<meta name="author" content="Compiled on Wed Sep 4 17:07:06 2024 by lecuona" />


<title>OHI 2023: Food Provision, Calculating fisheries stock status</title>
<title>OHI 2024: Food Provision, Calculating fisheries stock status</title>

<script>// Pandoc 2.9 adds attributes on both header and div. We remove the former (to
// be compatible with the behavior of Pandoc < 2.8).
Expand Down Expand Up @@ -1378,7 +1378,7 @@
</style>
<style type="text/css" data-origin="pandoc">
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
Expand Down Expand Up @@ -1645,10 +1645,10 @@



<h1 class="title toc-ignore">OHI 2023: Food Provision, Calculating
<h1 class="title toc-ignore">OHI 2024: Food Provision, Calculating
fisheries stock status</h1>
<h4 class="author"><em>Compiled on Mon Sep 11 08:22:41 2023 by
egg</em></h4>
<h4 class="author"><em>Compiled on Wed Sep 4 17:07:06 2024 by
lecuona</em></h4>

</div>

Expand All @@ -1667,8 +1667,8 @@ <h1>Summary</h1>
<div id="updates-from-previous-scenario-year" class="section level1">
<h1>Updates from previous scenario year</h1>
<ul>
<li>None. This script wasn’t run in v2023. Associated data files within
the repo were copied from v2022 to v2023.</li>
<li>None. This script wasn’t run in v2024. Associated data files within
the repo were copied from v2023 to v2024.</li>
</ul>
</div>
<div id="setup" class="section level1">
Expand All @@ -1684,10 +1684,7 @@ <h1>Setup</h1>
<span id="cb2-6"><a href="#cb2-6" tabindex="-1"></a><span class="fu">library</span>(doParallel)</span>
<span id="cb2-7"><a href="#cb2-7" tabindex="-1"></a><span class="fu">library</span>(here)</span>
<span id="cb2-8"><a href="#cb2-8" tabindex="-1"></a></span>
<span id="cb2-9"><a href="#cb2-9" tabindex="-1"></a><span class="fu">setwd</span>(here<span class="sc">::</span><span class="fu">here</span>(<span class="st">&quot;globalprep/fis/v2022&quot;</span>))</span>
<span id="cb2-10"><a href="#cb2-10" tabindex="-1"></a></span>
<span id="cb2-11"><a href="#cb2-11" tabindex="-1"></a></span>
<span id="cb2-12"><a href="#cb2-12" tabindex="-1"></a><span class="fu">source</span>(<span class="fu">here</span>(<span class="st">&#39;workflow/R/common.R&#39;</span>))</span></code></pre></div>
<span id="cb2-9"><a href="#cb2-9" tabindex="-1"></a><span class="fu">source</span>(here<span class="sc">::</span><span class="fu">here</span>(<span class="st">&quot;workflow&quot;</span>, <span class="st">&quot;R&quot;</span>, <span class="st">&quot;common.R&quot;</span>)) <span class="co"># file creates objects to process data</span></span></code></pre></div>
</div>
<div id="load-catch-data" class="section level1">
<h1>Load catch data</h1>
Expand Down
Loading

0 comments on commit 9c75932

Please sign in to comment.