Paper Authors
Michael Melnychuk1*
Tyler Clavelle2+
Brandon Owashi2
C. Kent Strauss3
1School of Aquatic and Fishery Sciences, University of Washington, Seattle, WA 98195
2Sustainable Fisheries Group, University of California, Santa Barbara, CA 93106
3Department of Economics, University of California, 2127 North Hall, Santa Barbara, CA 93106
*To whom correspondence regarding the paper should be addressed. Email: m.mel@u.washington.edu
+To whom correspondence regarding the code should be addressed. Email: tclavelle@bren.ucsb.edu
Code Author
Tyler Clavelle (GitHub)
This GitHub repository contains the code and materials required to produce the global database of ex-vessel prices described in Melnychuk et al. (2016). The analysis relies entirely on data publicly available from the Food and Agriculture Organization of the United Nations (FAO). The source code is publicly available under a MIT License so that other researchers and interested parties can reproduce and/or expand upon the analysis. Additionally, the code can be rerun to update the database when future releases of the required FAO data files become available.
The entire repository (code and data) can be downloaded as a zip file by clicking on the green button above. The code is written using the R language. If you do not currently use R or RStudio (IDE for R) you can download them at the following links:
Once installed, set your working directory to the folder containing the R script. This can be done by opening the script in RStudio and selecting the option from the Session
dropdown menu as follows: Session > Set Working Directory > To Source File Location
. Next, simply run the source(file = "Price_DB_Construction.R")
command.
-
R Script - The
Price_DB_Construction.R
R script constructs and saves the ex-vessel price database -
FAO Data - The
price-db-data
folder contains current versions of the required FAO data files, which include the Fishery and Commodities and Trade database and Appendix II – World fishery production: estimated value by groups of species. The commodity data files are unprocessed files directly exported from FAO's FishStatJ program. When updating these files, users must include the Country, Commodity, ISSCAAP group, and Trade flow variables in addition to the year columnsCommodity_quantity_76to13.csv
- Commodity production (tons) by country and trade flow (exports only)Commodity_value_76to13.csv
- Commodity value ($US 1,000) by country and trade flow (exports only)FAO exvessel estimates from archives.xlsx
- Production (1000 tons), value ($US millions), and ex-vessel price ($US/ton)
Users can update the database in the future with new data by replacing the filenames in Price_DB_Construction.R
with the filenames of updated data from the FAO. The ex-vessel estimates available in Appendix II are currently stored in PDF format online and must be saved in an .xlsx file by the user for future updates
-
Linkage Tables - The
price-db-linkage-tables
folder contains the linkage tables required to construct the database per the methods described in Melnychuk et al. (2016) as well as assign and filter out commodities based on their level of processingExvessel_tableS1.csv
- Linkage table 1Exvessel_tableS2.csv
- Linkage table 2Exvessel_tableS3.csv
- Linkage table 3processing assignments.csv
- Processing level assignments for each pooled commodity
Running Price_DB_Construction.R
will create a results folder containing the following output files:
- Exvessel Price Database.csv - Complete database of reconstructed ex-vessel prices for all FAO species items
- Expansion Factor Table.csv - Expansion factors used to convert export prices to ex-vessel prices for each ISSCAAP group