Skip to content

Commit

Permalink
Merge branch 'gh-pages' of https://github.com/OHI-Science/ohiprep_v2023
Browse files Browse the repository at this point in the history
… into gh-pages
  • Loading branch information
adelaiderobinson committed Jul 24, 2023
2 parents 39db5c9 + c149865 commit 1212d78
Show file tree
Hide file tree
Showing 19 changed files with 13,713 additions and 3,636 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Note: In the future, I think it would be possible to use python to download the

# Updates from previous scenario year

- None. This script wasn't run in v2023.
- None. This script wasn't run in v2023. Associated data files within the repo were copied from v2022 to v2023.

# Data Source

Expand Down
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 Tue Jul 18 09:54:08 2023 by egg" />
<meta name="author" content="Compiled on Thu Jul 20 15:42:13 2023 by egg" />


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

<h1 class="title toc-ignore">OHI 2023: Download SAUP production data and
match FAO regions</h1>
<h4 class="author"><em>Compiled on Tue Jul 18 09:54:08 2023 by
<h4 class="author"><em>Compiled on Thu Jul 20 15:42:13 2023 by
egg</em></h4>

</div>
Expand Down Expand Up @@ -1700,7 +1700,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.</li>
<li>None. This script wasn’t run in v2023. Associated data files within
the repo were copied from v2022 to v2023.</li>
</ul>
</div>
<div id="data-source" class="section level1">
Expand Down
5 changes: 1 addition & 4 deletions globalprep/fis/v2023/STEP2a_saup_catch_prep.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,10 @@ An example of our aggregation process: New Zealand is located entirely in FAO re
First, we need to match SAUP EEZ regions to OHI regions, and summarize per region, year, and species.

## Updates from previous assessment
v2022: Added new SAUP fisheries data to include year 2019 and added 2019 as a year for RAM data.
- None. This script wasn't run in v2023. Associated data files within the repo were copied from v2022 to v2023.

***

# Updates from previous scenario year

- None. This script wasn't run in v2023.

# Data Source

Expand Down
16 changes: 6 additions & 10 deletions globalprep/fis/v2023/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 Tue Jul 18 09:54:49 2023 by egg" />
<meta name="author" content="Compiled on Thu Jul 20 15:43:02 2023 by egg" />


<title>OHI 2023: Food Provision, Preparing catch data for BBmsy calculations and mean catch (weights in FIS model) and FP weights</title>
Expand Down Expand Up @@ -1667,7 +1667,7 @@
<h1 class="title toc-ignore">OHI 2023: 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 Tue Jul 18 09:54:49 2023 by
<h4 class="author"><em>Compiled on Thu Jul 20 15:43:02 2023 by
egg</em></h4>

</div>
Expand Down Expand Up @@ -1701,16 +1701,12 @@ <h1>Summary</h1>
summarize per region, year, and species.</p>
<div id="updates-from-previous-assessment" class="section level2">
<h2>Updates from previous assessment</h2>
<p>v2022: Added new SAUP fisheries data to include year 2019 and added
2019 as a year for RAM data.</p>
<hr />
</div>
</div>
<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.</li>
<li>None. This script wasn’t run in v2023. Associated data files within
the repo were copied from v2022 to v2023.</li>
</ul>
<hr />
</div>
</div>
<div id="data-source" class="section level1">
<h1>Data Source</h1>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This script uses FishBase to find the Resilience for each of the species in the

# Updates from previous scenario year

- None. This script wasn't run in v2023.
- None. This script wasn't run in v2023. Associated data files within the repo were copied from v2022 to v2023.

# Setup

Expand Down
2 changes: 1 addition & 1 deletion globalprep/fis/v2023/STEP3_calculate_bbmsy.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The [`datalimited`](https://github.com/datalimited/datalimited) R package, devel

# Updates from previous scenario year

- None. This script wasn't run in v2023.
- None. This script wasn't run in v2023. Associated data files within the repo were copied from v2022 to v2023.

# Setup

Expand Down
7 changes: 4 additions & 3 deletions globalprep/fis/v2023/STEP3_calculate_bbmsy.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 Tue Jul 18 09:56:20 2023 by egg" />
<meta name="author" content="Compiled on Thu Jul 20 15:44:12 2023 by egg" />


<title>OHI 2023: Food Provision, Calculating fisheries stock status</title>
Expand Down Expand Up @@ -1666,7 +1666,7 @@

<h1 class="title toc-ignore">OHI 2023: Food Provision, Calculating
fisheries stock status</h1>
<h4 class="author"><em>Compiled on Tue Jul 18 09:56:20 2023 by
<h4 class="author"><em>Compiled on Thu Jul 20 15:44:12 2023 by
egg</em></h4>

</div>
Expand All @@ -1686,7 +1686,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.</li>
<li>None. This script wasn’t run in v2023. Associated data files within
the repo were copied from v2022 to v2023.</li>
</ul>
</div>
<div id="setup" class="section level1">
Expand Down
6 changes: 3 additions & 3 deletions globalprep/fis/v2023/STEP4a_RAM_data_prep.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ summary(mod)

## Identify FAO and OHI regions for RAM stocks

Identify the FAO/OHI regions where each RAM stock is located (fao and ohi regions are assigned to RAM Data in [STEP4b_fao_ohi_rgns.Rmd](https://mazu.nceas.ucsb.edu/rstudio/files/github/ohiprep_v2021/globalprep/fis/v2022/STEP4b_fao_ohi_rgns.html). **Run STEP4b_fao_ohi_rgns.Rmd now.**
Identify the FAO/OHI regions where each RAM stock is located (fao and ohi regions are assigned to RAM Data in [STEP4b_fao_ohi_rgns.Rmd](https://mazu.nceas.ucsb.edu/rstudio/files/github/ohiprep_v2023/globalprep/fis/v2023/STEP4b_fao_ohi_rgns.html). **Run STEP4b_fao_ohi_rgns.Rmd now.**


If there are many differences between RAM spatial file and RAM metadata, check the STEP4_fao_ohi_rgns.Rmd prep again.
Expand Down Expand Up @@ -376,7 +376,7 @@ ram_sp <- ram_bmsy_gf_final %>%
# SAUP species, sci name (read in the datatable that includes TaxonKey)
SAUP_sp <- read_csv(file.path(dir_M,'git-annex/globalprep/fis/v2022/int/stock_catch_by_rgn_taxa.csv')) %>%
SAUP_sp <- read_csv(file.path(dir_M,'git-annex/globalprep/fis/v2022/int/stock_catch_by_rgn_taxa.csv')) %>% # use most recent one available
dplyr::rename(SAUP_scientificname = TaxonName) %>%
dplyr::select(SAUP_scientificname) %>%
unique() %>%
Expand All @@ -402,7 +402,7 @@ ram_sp_fao_ohi <- tmp %>%
write_csv(ram_sp_fao_ohi, "int/new_ram_sp.csv")
## get SAUP fao_ohi regions
SAUP_sp_fao_ohi <- read_csv(file.path(dir_M,'git-annex/globalprep/fis/v2022/int/stock_catch_by_rgn_taxa.csv')) %>%
SAUP_sp_fao_ohi <- read_csv(file.path(dir_M,'git-annex/globalprep/fis/v2022/int/stock_catch_by_rgn_taxa.csv')) %>% # use most recent one available
dplyr::rename(SAUP_scientificname = TaxonName) %>%
dplyr::filter(year > 1979) # %>%
#filter(str_detect(SAUP_scientificname, "Lepidorhombus"))
Expand Down
10 changes: 5 additions & 5 deletions globalprep/fis/v2023/STEP4a_RAM_data_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 Tue Jul 18 09:56:52 2023 by egg" />
<meta name="author" content="Compiled on Thu Jul 20 15:00:39 2023 by egg" />


<title>OHI 2023: Food Provision/Fisheries, Preparing RAM B/Bmsy data</title>
Expand Down Expand Up @@ -1666,7 +1666,7 @@

<h1 class="title toc-ignore">OHI 2023: Food Provision/Fisheries,
Preparing RAM B/Bmsy data</h1>
<h4 class="author"><em>Compiled on Tue Jul 18 09:56:52 2023 by
<h4 class="author"><em>Compiled on Thu Jul 20 15:00:39 2023 by
egg</em></h4>

</div>
Expand Down Expand Up @@ -2029,7 +2029,7 @@ <h2>Gapfill RAM data when there are missing years</h2>
<div id="identify-fao-and-ohi-regions-for-ram-stocks" class="section level2">
<h2>Identify FAO and OHI regions for RAM stocks</h2>
<p>Identify the FAO/OHI regions where each RAM stock is located (fao and
ohi regions are assigned to RAM Data in <a href="https://mazu.nceas.ucsb.edu/rstudio/files/github/ohiprep_v2021/globalprep/fis/v2022/STEP4b_fao_ohi_rgns.html">STEP4b_fao_ohi_rgns.Rmd</a>.
ohi regions are assigned to RAM Data in <a href="https://mazu.nceas.ucsb.edu/rstudio/files/github/ohiprep_v2023/globalprep/fis/v2023/STEP4b_fao_ohi_rgns.html">STEP4b_fao_ohi_rgns.Rmd</a>.
<strong>Run STEP4b_fao_ohi_rgns.Rmd now.</strong></p>
<p>If there are many differences between RAM spatial file and RAM
metadata, check the STEP4_fao_ohi_rgns.Rmd prep again.</p>
Expand Down Expand Up @@ -2071,7 +2071,7 @@ <h2>Standardize species names</h2>
<span id="cb7-9"><a href="#cb7-9" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-10"><a href="#cb7-10" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-11"><a href="#cb7-11" aria-hidden="true" tabindex="-1"></a><span class="co"># SAUP species, sci name (read in the datatable that includes TaxonKey)</span></span>
<span id="cb7-12"><a href="#cb7-12" aria-hidden="true" tabindex="-1"></a>SAUP_sp <span class="ot">&lt;-</span> <span class="fu">read_csv</span>(<span class="fu">file.path</span>(dir_M,<span class="st">&#39;git-annex/globalprep/fis/v2022/int/stock_catch_by_rgn_taxa.csv&#39;</span>)) <span class="sc">%&gt;%</span> </span>
<span id="cb7-12"><a href="#cb7-12" aria-hidden="true" tabindex="-1"></a>SAUP_sp <span class="ot">&lt;-</span> <span class="fu">read_csv</span>(<span class="fu">file.path</span>(dir_M,<span class="st">&#39;git-annex/globalprep/fis/v2022/int/stock_catch_by_rgn_taxa.csv&#39;</span>)) <span class="sc">%&gt;%</span> <span class="co"># use most recent one available</span></span>
<span id="cb7-13"><a href="#cb7-13" aria-hidden="true" tabindex="-1"></a> dplyr<span class="sc">::</span><span class="fu">rename</span>(<span class="at">SAUP_scientificname =</span> TaxonName) <span class="sc">%&gt;%</span></span>
<span id="cb7-14"><a href="#cb7-14" aria-hidden="true" tabindex="-1"></a> dplyr<span class="sc">::</span><span class="fu">select</span>(SAUP_scientificname) <span class="sc">%&gt;%</span></span>
<span id="cb7-15"><a href="#cb7-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">unique</span>() <span class="sc">%&gt;%</span></span>
Expand All @@ -2097,7 +2097,7 @@ <h2>Standardize species names</h2>
<span id="cb7-35"><a href="#cb7-35" aria-hidden="true" tabindex="-1"></a><span class="fu">write_csv</span>(ram_sp_fao_ohi, <span class="st">&quot;int/new_ram_sp.csv&quot;</span>) </span>
<span id="cb7-36"><a href="#cb7-36" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-37"><a href="#cb7-37" aria-hidden="true" tabindex="-1"></a><span class="do">## get SAUP fao_ohi regions</span></span>
<span id="cb7-38"><a href="#cb7-38" aria-hidden="true" tabindex="-1"></a>SAUP_sp_fao_ohi <span class="ot">&lt;-</span> <span class="fu">read_csv</span>(<span class="fu">file.path</span>(dir_M,<span class="st">&#39;git-annex/globalprep/fis/v2022/int/stock_catch_by_rgn_taxa.csv&#39;</span>)) <span class="sc">%&gt;%</span> </span>
<span id="cb7-38"><a href="#cb7-38" aria-hidden="true" tabindex="-1"></a>SAUP_sp_fao_ohi <span class="ot">&lt;-</span> <span class="fu">read_csv</span>(<span class="fu">file.path</span>(dir_M,<span class="st">&#39;git-annex/globalprep/fis/v2022/int/stock_catch_by_rgn_taxa.csv&#39;</span>)) <span class="sc">%&gt;%</span> <span class="co"># use most recent one available</span></span>
<span id="cb7-39"><a href="#cb7-39" aria-hidden="true" tabindex="-1"></a> dplyr<span class="sc">::</span><span class="fu">rename</span>(<span class="at">SAUP_scientificname =</span> TaxonName) <span class="sc">%&gt;%</span></span>
<span id="cb7-40"><a href="#cb7-40" aria-hidden="true" tabindex="-1"></a> dplyr<span class="sc">::</span><span class="fu">filter</span>(year <span class="sc">&gt;</span> <span class="dv">1979</span>) <span class="co"># %&gt;%</span></span>
<span id="cb7-41"><a href="#cb7-41" aria-hidden="true" tabindex="-1"></a> <span class="co">#filter(str_detect(SAUP_scientificname, &quot;Lepidorhombus&quot;))</span></span>
Expand Down
2 changes: 1 addition & 1 deletion globalprep/prs_alien/v2023/prs_alien_data_prep.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ clean_output <- binded_df %>%
country = str_replace_all(country, "St. Lucia", "Saint Lucia"),
country = str_replace_all(country, "&", "and"),
country = str_replace_all(country, "Congo - Kinshasa", "Democratic Republic of the Congo"),
country = str_replace_all(country, "Côte d’Ivoire", " Ivory Coast"),
country = str_replace_all(country, "Côte d’Ivoire", "Ivory Coast"),
country = str_replace_all(country, "Curaçao", "Curacao"),
country = str_replace_all(country, "Myanmar \\(Burma\\)", "Myanmar"),
country = str_replace_all(country, "Saint Martin \\(French part\\)", "Northern Saint-Martin"),
Expand Down
18 changes: 6 additions & 12 deletions globalprep/prs_alien/v2023/prs_alien_data_prep.html

Large diffs are not rendered by default.

Loading

0 comments on commit 1212d78

Please sign in to comment.