/small-world-fisheries

Analysis code for the paper The Small World of Global Marine Fisheries: The Cross-Boundary Consequences of Larval Dispersal

Primary LanguageR

small-world-fisheries

Analysis code for the paper The Small World of Global Marine Fisheries: The Cross-Boundary Consequences of Larval Dispersal

Code for

N. Ramesh, J. Rising, K. Oremus (2019). The Small World of Global
Marine Fisheries: The Cross-Boundary Consequences of Larval
Dispersal. Science. doi:10.1126/science.aav3409

This repository provides reproduction code for the paper, and works in conjuction with the dataset https://zenodo.org/record/3249468.

Setup

All of the code assumes that code directory (a clone of this repository) is stored in the same folder a folder named data containing the contents of the Zenodo repository. Also create a folder results. That is:

  1. Create a new directory.
  2. Within that directory, execute:
git clone https://github.com/openmodels/small-world-fisheries
  1. Go to https://zenodo.org/record/2636745 and download the entire dataset (generated.zip).
  2. Unzip the generated.zip file to a directory named data:
unzip generated.zip -d data
  1. Create the results folder:
mkdir results

All of the code is written in R. In all cases, the code assumes that it is run from the same directory that contains it, which can be ensured either by running it with Rscript, or executing a setwd command before the contents of each file.

In addition, you will need the following packages installed in R:

  • PBSmapping
  • maps
  • png
  • RColorBrewer
  • classInt
  • maptools
  • mapproj

Process

The following scripts are run to generate the results:

  1. Generate the FAO region-EEZ mapping: fao2eez/mapping.R
  2. Generate the species-EEZ mapping: fao2eez/specieseez.R
  3. Generate the network edge weights: network/edgeweights.R
  4. Generate baselines for each country: economics/country-weights.R
  5. Generate value at risk figures: economics/species-weight.R

Generating the main figures

Figure 1:

After you have run network/edgeweights.R, run display/edgelist_net.R.

Figure 2:

Figure 2 is constructed from excepts of figure 1.

Figure 3:

Figure 3 is a combination of the figures atrisk-combo-split-cl.pdf and export-combo-split-cl.pdf, generated by species-weights.R.

Figure 4

Figure 4, along with zoomed regions, is produced by displays/figure4.R.