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 Sep 11, 2023
2 parents d50480a + 84a2ab3 commit 77758d2
Show file tree
Hide file tree
Showing 27 changed files with 5,222 additions and 4,787 deletions.
4 changes: 2 additions & 2 deletions globalprep/fis/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ This folder describes the methods used to prepare data for the Fisheries subgoal

More information about this goal is available [here](http://ohi-science.org/goals/#food-provision).

The folders in this file include the metadata, R scripts, and data for each assessement year (i.e., the year the assessment was conducted). The most current year represents the best available data and methods, and previous years are maintained for archival purposes.
The folders in this file include the metadata, R scripts, and data for each assessment year (i.e., the year the assessment was conducted). The most current year represents the best available data and methods, and previous years are maintained for archival purposes.

Our [data managment SOP](https://rawgit.com/OHI-Science/ohiprep/master/src/dataOrganization_SOP.html) describes how we manage OHI global data, including a description of the file structure.

Please see our [citation policy](http://ohi-science.org/citation-policy/) if you use OHI data or methods.
Please see our [citation policy](https://oceanhealthindex.org/global-scores/data-download/) if you use OHI data or methods.

Thank you!
961 changes: 471 additions & 490 deletions globalprep/fis/v2023/STEP1_download_saup_match_fao_data_fix.html

Large diffs are not rendered by default.

1,575 changes: 778 additions & 797 deletions globalprep/fis/v2023/STEP2a_saup_catch_prep.html

Large diffs are not rendered by default.

383 changes: 182 additions & 201 deletions globalprep/fis/v2023/STEP3_calculate_bbmsy.html

Large diffs are not rendered by default.

1,145 changes: 563 additions & 582 deletions globalprep/fis/v2023/STEP4a_RAM_data_prep.html

Large diffs are not rendered by default.

1,117 changes: 549 additions & 568 deletions globalprep/fis/v2023/STEP4b_fao_ohi_rgns.html

Large diffs are not rendered by default.

535 changes: 258 additions & 277 deletions globalprep/fis/v2023/STEP5_RAM_CMSY_combine.html

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions globalprep/fis/v2023/readme.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
## Ocean Health Index: Fisheries Sub-goal (FIS)

See full details for how the SAUP catch data was prepped [here](http://ohi-science.github.io/ohiprep_v2021/globalprep/fis/v2021/STEP2a_saup_catch_prep.html).
See full details for how the SAUP catch data was prepped [here](http://ohi-science.github.io/ohiprep_v2023/globalprep/fis/v2023/STEP2a_saup_catch_prep.html).

See full details for how BBmsy was calculated [here](http://ohi-science.github.io/ohiprep_v2021/globalprep/fis/v2021/STEP3_calculate_bbmsy.html).
See full details for how BBmsy was calculated [here](http://ohi-science.github.io/ohiprep_v2023/globalprep/fis/v2023/STEP3_calculate_bbmsy.html).

See full details for how RAM data was prepped
[here RAM dataprep](http://ohi-science.github.io/ohiprep_v2021/globalprep/fis/v2021/STEP4a_RAM_data_prep.html)
[here RAM_CMSY](http://ohi-science.github.io/ohiprep_v2021/globalprep/fis/v2021/STEP5_RAM_CMSY_combine.html)
[here RAM dataprep](http://ohi-science.github.io/ohiprep_v2023/globalprep/fis/v2023/STEP4a_RAM_data_prep.html)
[here RAM_CMSY](http://ohi-science.github.io/ohiprep_v2023/globalprep/fis/v2023/STEP5_RAM_CMSY_combine.html)


If using these data, please see our [citation policy](http://ohi-science.org/citation-policy/).
If using these data, please see our [citation policy](https://oceanhealthindex.org/global-scores/data-download/).

### Layers Created

Expand All @@ -23,8 +23,8 @@ A description of files:

* STEP2a_saup_catch_prep.Rmd: Preps the spatialized catch data (at half degree cells) for use in goal weighting and stock status calculations. Auxiliary prep file, **STEP2b_species_resilience_lookup_table.Rmd**: Uses FishBase to find the Resilience for each of the species in the SAUP database. The Resilience information is needed for running catch-MSY to estimate B/Bmsy. Outputs:

- `git-annex/globalprep/fis/v2021/int/stock_catch_by_rgn.csv`
- `int/taxon_key_v2021.csv`
- `git-annex/globalprep/fis/v2022/int/stock_catch_by_rgn.csv`
- `int/taxon_key_v2022.csv`
- `output/stock_catch.csv`
- `output/mean_catch.csv`
- `output/FP_fis_catch.csv`
Expand Down
4 changes: 2 additions & 2 deletions globalprep/fp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ This folder describes the methods used to prepare data for the food provision go

More information about the food provision goal is available [here](http://ohi-science.org/goals/#food-provision).

The folders in this file include the metadata, R scripts, and data for each assessement year (i.e., the year the assessment was conducted). The most current year represents the best available data and methods, and previous years are maintained for archival purposes.
The folders in this file include the metadata, R scripts, and data for each assessment year (i.e., the year the assessment was conducted). The most current year represents the best available data and methods, and previous years are maintained for archival purposes.

Our [data managment SOP](https://rawgit.com/OHI-Science/ohiprep/master/src/dataOrganization_SOP.html) describes how we manage OHI global data, including a description of the file structure.

Please see our [citation policy](http://ohi-science.org/citation-policy/) if you use OHI data or methods.
Please see our [citation policy](https://oceanhealthindex.org/global-scores/data-download/) if you use OHI data or methods.

Thank you!
20 changes: 10 additions & 10 deletions globalprep/fp/v2023/FP_script.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This script combines the fisheries catch data with the mariculture production da

# Methods

```{r}
```{r, eval = FALSE}
## load libraries
library(dplyr)
library(tidyr)
Expand All @@ -44,20 +44,20 @@ source('http://ohi-science.org/ohiprep_v2021/workflow/R/common.R')
# Import Output Data: Mariculture data

Mariculture production in tonnes.
```{r}
mar <- read.csv(file.path("..", "..", "mar", paste0("v", scen_year), "output", "MAR_FP_data.csv"))
```{r, eval = FALSE}
mar <- read.csv(file.path("..", "..", "mar", paste0("v", scen_year), "output", "MAR_FP_data.csv")) # see metadata in its prep
```

Fisheries data.
```{r}
```{r, eval = FALSE}
fis <- read.csv(file.path("..", "..", "fis", paste0("v", scen_year), "output", "FP_fis_catch.csv")) %>%
dplyr::select(rgn_id, year, fis_t = fis_catch)
dplyr::select(rgn_id, year, fis_t = fis_catch) # see metadata in its prep
```

# Wrangle

## Tidy MAR data
```{r}
```{r, eval = FALSE}
mar_tidy <- mar %>%
group_by(rgn_id, year) %>%
summarize(mar_t = sum(value, na.rm=TRUE)) %>%
Expand All @@ -70,7 +70,7 @@ filter(mar_tidy, rgn_id == 95) # ok, this makes sense

## Tidy FIS data

```{r}
```{r, eval = FALSE}
fis_tidy <- fis %>%
mutate(fis_t = ifelse(fis_t == 0, NA, fis_t)) %>% # 11 NA values is correct (there were 0 in v2023)
group_by(rgn_id) %>%
Expand All @@ -82,7 +82,7 @@ fis_tidy <- fis %>%
## Combine MAR and FIS

Adjust years so they are equivalent.
```{r}
```{r, eval = FALSE}
adjust <- max(mar_tidy$year) - max(fis_tidy$year)
mar_adjust <- mar_tidy %>%
Expand All @@ -107,7 +107,7 @@ hist(tmp_weights$w_fis,
# Data check

Compare to previous year data
```{r}
```{r, eval = FALSE}
compare <- read.csv(paste0("../../fp/v", prev_scen_year, "/output/wildcaught_weight.csv")) %>%
rename(w_fis_old = w_fis) %>%
left_join(tmp_weights, by = c('rgn_id', 'year'))
Expand All @@ -119,7 +119,7 @@ abline(0, 1, col="red")

# Save data

```{r}
```{r, eval = FALSE}
write.csv(tmp_weights, 'output/wildcaught_weight.csv', row.names=FALSE)
## add gf file (no gapfilling)
Expand Down
604 changes: 604 additions & 0 deletions globalprep/fp/v2023/FP_script.html

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions globalprep/np/v2023/STEP1c_np_fishfeed_prep.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ This script takes the SAUP 2023 catch data, a list of fish oil/fish meal (FOFM)

# Data Source

## Sea Around us

**Reference**: Pauly D., Zeller D., Palomares M.L.D. (Editors), 2020. Sea Around Us Concepts, Design and Data (seaaroundus.org).

**Downloaded**: September 27, 2022
Expand All @@ -42,6 +44,8 @@ This script takes the SAUP 2023 catch data, a list of fish oil/fish meal (FOFM)

**Additional Information**: [Methods](http://www.seaaroundus.org/sea-around-us-methods-index/)

## Avoiding the ecological limits of forage fish

**Reference**: Froehlich, H.E., Jacobsen, N.S., Essington, T.E., Clavelle, T., and Halpern, B.S. (2018). Avoiding the ecological limits of forage fish for fed aquaculture. Nature Sustainability 1, 298.

**Downloaded**: July 7, 2020. Obtained from Melanie Frazier (NCEAS).
Expand All @@ -52,15 +56,17 @@ This script takes the SAUP 2023 catch data, a list of fish oil/fish meal (FOFM)

**Format**: CSV format

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

**Reference**: [RAM Legacy Stock Assessment Database](http://ramlegacy.org) v4.61, 05/10/2023

**Downloaded**: 06/03/2021
**Downloaded**: 07/6/2023

**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**: 1950 - 2024
**Time range**: 1800 - 2022

**Format**: CSV format

Expand Down
18 changes: 13 additions & 5 deletions globalprep/np/v2023/STEP2_np_weighting_prep.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ in ohi global.

# Data Source

## FAO

**Reference**:\
<http://www.fao.org/fishery/statistics/software/fishstatj/en#downlApp>
App release date: July 2021 FAO raw commodities quantity 1976_2021 FAO
Expand All @@ -49,6 +51,8 @@ details).

**Time range**: 1976-2021

## Sea Around Us Concepts

**Reference**: Pauly D., Zeller D., Palomares M.L.D. (Editors), 2020.
Sea Around Us Concepts, Design and Data (seaaroundus.org).

Expand All @@ -65,6 +69,8 @@ taxonomic information.
**Additional Information**:
[Methods](http://www.seaaroundus.org/sea-around-us-methods-index/)

## Avoiding the ecological limits of forage fish for fed aquaculture

**Reference**: Froehlich, H.E., Jacobsen, N.S., Essington, T.E.,
Clavelle, T., and Halpern, B.S. (2018). Avoiding the ecological limits
of forage fish for fed aquaculture. Nature Sustainability 1, 298.
Expand All @@ -77,26 +83,28 @@ of forage fish for fed aquaculture. Nature Sustainability 1, 298.

**Format**: CSV format

## RAM

**Reference**: [RAM Legacy Stock Assessment
Database](http://ramlegacy.org) v4.491
Database](http://ramlegacy.org) v4.61, 05/10/2023

**Downloaded**: 06/03/2021
**Downloaded**: 07/6/2023

**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**: 1950 - 2024
**Time range**: 1800 - 2022

**Format**: CSV format

**Additional Information**: We use the finalized b/bmsy layer from
OHI-global for this data prep. We do not actually read in the raw RAM
data here. We only use up to year == 2018.
data here.

- DOI: 10.5281/zenodo.2542919
## FAO

**Reference**:\
<http://www.fao.org/fishery/statistics/software/fishstatj/en#downlApp>
Expand Down
4 changes: 2 additions & 2 deletions globalprep/prs_alien/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

This folder describes the methods used to prepare data for the nonindigenous species data for the global OHI assessment. These data are used as a pressure.

The folders in this file include the metadata, R scripts, and data for each assessement year (i.e., the year the assessment was conducted). The most current year represents the best available data and methods, and previous years are maintained for archival purposes.
The folders in this file include the metadata, R scripts, and data for each assessment year (i.e., the year the assessment was conducted). The most current year represents the best available data and methods, and previous years are maintained for archival purposes.

Our [data managment SOP](https://rawgit.com/OHI-Science/ohiprep/master/src/dataOrganization_SOP.html) describes how we manage OHI global data, including a description of the file structure.

Please see our [citation policy](http://ohi-science.org/citation-policy/) if you use OHI data or methods.
Please see our [citation policy](https://oceanhealthindex.org/global-scores/data-download/) if you use OHI data or methods.

Thank you!
2 changes: 1 addition & 1 deletion globalprep/prs_alien/v2023/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ Information about [calculating pressure](http://ohi-science.github.io/ohiprep_v2

### Additional information

If using these data, please see our [citation policy](http://ohi-science.org/citation-policy/).
If using these data, please see our [citation policy](https://oceanhealthindex.org/global-scores/data-download/).

1,035 changes: 508 additions & 527 deletions globalprep/prs_alien/v2023/prs_alien_data_prep.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion globalprep/prs_coral_harvest/v2023/prs_coral_harvest.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ FAO raw commodities metadata found [here](https://www.fao.org/fishery/en/collect

**Downloaded**: July 19, 2023

**Description**: Quantity (tonnes) and value (USD) of raw commodities (Exports only) for each country, taxa, year. The FAO data is subset to include commodities in these categories: shells, corals, ornamental fish, fish oil, seaweed and plants, sponges (see: raw/commodities2products.csv for details).
**Description**: Quantity (tonnes) and value (USD) of raw commodities (Exports only) for each country, taxa, year. The FAO data is subset to include commodities in these categories: shells, corals, ornamental fish, fish oil, seaweed and plants, sponges (see: raw/commodities2products.csv for details).

**Time range**: 1976-2021

Expand Down
4 changes: 2 additions & 2 deletions globalprep/prs_coral_harvest/v2023/prs_coral_harvest.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 Sep 5 17:02:51 2023 by egg" />
<meta name="author" content="Compiled on Mon Sep 11 08:12:50 2023 by egg" />


<title>OHI 2023: Coral Harvest Pressure</title>
Expand Down Expand Up @@ -1646,7 +1646,7 @@


<h1 class="title toc-ignore">OHI 2023: Coral Harvest Pressure</h1>
<h4 class="author"><em>Compiled on Tue Sep 5 17:02:51 2023 by
<h4 class="author"><em>Compiled on Mon Sep 11 08:12:50 2023 by
egg</em></h4>

</div>
Expand Down
4 changes: 2 additions & 2 deletions globalprep/prs_coral_harvest/v2023/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

This folder describes the methods used to prepare data for the coral harvest pressure layer for OHI global.

The folders in this file include the metadata, R scripts, and data for each assessement year (i.e., the year the assessment was conducted). The most current year represents the best available data and methods, and previous years are maintained for archival purposes.
The folders in this file include the metadata, R scripts, and data for each assessment year (i.e., the year the assessment was conducted). The most current year represents the best available data and methods, and previous years are maintained for archival purposes.

Our [data managment SOP](https://rawgit.com/OHI-Science/ohiprep/master/src/dataOrganization_SOP.html) describes how we manage OHI global data, including a description of the file structure.

Please see our [citation policy](http://ohi-science.org/citation-policy/) if you use OHI data or methods.
Please see our [citation policy](https://oceanhealthindex.org/global-scores/data-download/) if you use OHI data or methods.

Thank you!
4 changes: 2 additions & 2 deletions globalprep/prs_slr/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

This folder describes the methods used to prepare data for the Sea Level Rise pressure layer for the global OHI assessment.

The folders in this file include the metadata, R scripts, and data for each assessement year (i.e., the year the assessment was conducted). The most current year represents the best available data and methods, and previous years are maintained for archival purposes.
The folders in this file include the metadata, R scripts, and data for each assessment year (i.e., the year the assessment was conducted). The most current year represents the best available data and methods, and previous years are maintained for archival purposes.

Our [data managment SOP](https://rawgit.com/OHI-Science/ohiprep/master/src/dataOrganization_SOP.html) describes how we manage OHI global data, including a description of the file structure.

Please see our [citation policy](http://ohi-science.org/citation-policy/) if you use OHI data or methods.
Please see our [citation policy](https://oceanhealthindex.org/global-scores/data-download/) if you use OHI data or methods.

2 changes: 1 addition & 1 deletion globalprep/prs_slr/v2023/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ See full data prep details [here](https://ohi-science.github.io/ohiprep_v2023/gl

This serves as a pressure for CP, CS, ECO, HAB, LIV, LSP, MAR, NP, & TR.

If using these data, please see our [citation policy](http://ohi-science.org/citation-policy/).
If using these data, please see our [citation policy](https://oceanhealthindex.org/global-scores/data-download/).


4 changes: 2 additions & 2 deletions globalprep/prs_slr/v2023/slr_layer_prep_v2.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ This process is completed entirely within this script. The raw data is downloade
- One additional year of data, 2021, was added
- Add in code to automatically create folders when applicable
- Add in some more tic/tocs
- Had to change `terra` code back to `raster` for one chunk (making the histograms) to get it to work: commented out this code and added a version of histograms that works with `terra`
- Had to change `terra` code back to `raster` for one chunk (making the histograms) to get it to work; later, commented out this code and added a version of histograms that works with `terra`

***

Expand Down Expand Up @@ -532,7 +532,7 @@ plotData <- regions_stats_clean %>%
dplyr::arrange(rgn_name, year) %>%
data.frame()
# This does not work at the moment, probably due to lack of Flash support
# this does not work at the moment, probably due to lack of Flash support
# Motion <- gvisMotionChart(plotData, idvar = "rgn_name", timevar = "year")
# plot(Motion)
# print(Motion, file = "slr.html")
Expand Down
1,080 changes: 529 additions & 551 deletions globalprep/prs_slr/v2023/slr_layer_prep_v2.html

Large diffs are not rendered by default.

Loading

0 comments on commit 77758d2

Please sign in to comment.