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.
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:
- Create a new directory.
- Within that directory, execute:
git clone https://github.com/openmodels/small-world-fisheries
- Go to
https://zenodo.org/record/2636745
and download the entire dataset (generated.zip
). - Unzip the
generated.zip
file to a directory nameddata
:
unzip generated.zip -d data
- 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
The following scripts are run to generate the results:
- Generate the FAO region-EEZ mapping:
fao2eez/mapping.R
- Generate the species-EEZ mapping:
fao2eez/specieseez.R
- Generate the network edge weights:
network/edgeweights.R
- Generate baselines for each country:
economics/country-weights.R
- Generate value at risk figures:
economics/species-weight.R
After you have run network/edgeweights.R
, run
display/edgelist_net.R
.
Figure 2 is constructed from excepts of figure 1.
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, along with zoomed regions, is produced by displays/figure4.R
.