ohi logo
OHI Science | Citation policy

[REFERENCE RMD FILE: https://cdn.rawgit.com/OHI-Science/ohiprep/master/globalprep/np/v2016/np_dataprep.html]

1 Summary

This analysis converts FAO commodities data into data layers used to calculate OHI 2016 global natural products scores.

2 Updates from previous assessment

New year of FAO data (1976-2013), but no changes to general methods.


3 Data Source

Reference:
http://www.fao.org/fishery/statistics/software/fishstatj/en#downlApp Release date: March 2016 FAO raw commodities quantity 1976_2013 FAO raw commodities value 1976_2013

Downloaded: July 29 2016

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-2013


4 Methods

# load libraries, set directories
library(ohicore)  #devtools::install_github('ohi-science/ohicore@dev')
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(stringr)
library(tidyr)
library(zoo)  
## 
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
## 
##     as.Date, as.Date.numeric
## comment out when knitting
#setwd("globalprep/np/v2016")


### Load FAO-specific user-defined functions
source('../../../src/R/fao_fxn.R') # function for cleaning FAO files
source('../../../src/R/common.R') # directory locations
source('R/np_fxn.R')

5 FAO Commodities: Value and Quantity

Read and process FAO commodities value and quantity data.

## NOTE: This can be run as a loop, but the "value" and "quant" datasets need to be run individually to make sure
## there are no problems (after this check, they can be looped for effeciency)

dir_fao_data <- file.path(dir_M, 'git-annex/globalprep/_raw_data/FAO_commodities/d2016')

files <- list.files(dir_fao_data, pattern=glob2rx('*.csv'), full.names=T)

# To compare to old data:
# dir_fao_data <- file.path(dir_M, 'git-annex/globalprep/_raw_data/FAO_commodities/d2014/raw')
# 
# files <- list.files(dir_fao_data, pattern=glob2rx('*.csv'), full.names=T)

for (f in files){ # f <- files[1]
  cat(sprintf('\n\n\n====\nfile: %s\n', basename(f)))
  
  
  d <- read.csv(f, check.names=FALSE, strip.white=TRUE, stringsAsFactors = FALSE) # , stringsAsFactors=T
  
  ## Include only the "Exports" data:
  d <- d %>%
    filter(`Trade flow (Trade flow)` == "Exports")
  
  units <- c('tonnes','usd')[str_detect(f, c('quant','value'))] # using American English, lowercase

  ### gather into long format and clean up FAO-specific data foibles

    ### warning: attributes are not identical across measure variables; they will be dropped: this is fine
    m <- d %>% 
      rename(country   = `Country (Country)`,
             commodity = `Commodity (Commodity)`,
             trade     = `Trade flow (Trade flow)`) %>%
    gather(year, value, -country, -commodity, -trade, -Unit)

    m <- m %>%
    fao_clean_data() %>%  
      # swaps out FAO-specific codes. NOTE: optional parameter 'sub_0_0' can be
      # passed to control how a '0 0' code is interpreted.
      select(-trade, -Unit)   %>%                   
      # eliminate 'trade' column
    arrange(country, commodity, is.na(value), year)

  
  ### Products join: attach product categories from com2prod, and
  ###   filter out all entries that do not match a product category.
  ### Note: commodity_lookup is user-defined function to compare 
  ###   commodities in data vs commodities in lookup table

  ### load lookup for converting commodities to products
  com2prod <- read.csv('raw/commodities2products.csv', na.strings='')
  
    # version used in 2015: use when testing....
  #com2prod <- read.csv('../v2014_test/commodities2products.csv', na.strings='')
  
  ### Check the current commodity-to-product lookup table.  If necessary, make changes to "raw/commodities2products.csv"
     np_commodity_lookup(m, com2prod)
  
  ### inner_join will attach product names to matching commodities according to
  ### lookup table 'com2prod', and eliminate all commodities that do not appear in the lookup table.
  m <- m %>%
    inner_join(com2prod, by='commodity')
  
  
  ### Special case: user-defined function deals with 
  ###   breaking up Antilles into separate reported rgns
  m <- np_split_antilles(m)
  
  ### Some changes to region names that aren't working
  m <- m %>%
    mutate(country = ifelse(country == "C\xf4te d'Ivoire", "Ivory Coast", country)) %>%
    mutate(country = ifelse(country == "Cura\xe7ao","Curacao", country)) %>%
    mutate(country = ifelse(country == "R\xe9union", "Reunion", country))
             
  
  m_rgn <- name_2_rgn(df_in = m, 
                       fld_name='country', 
                       flds_unique=c('commodity', 'product', 'year'))
  
  
  
    ### combine composite regions
   # This function provides a way to maintain NA values when both variables are NA (rather than turning to zero values)
    sum_function <- function(x) {
      if (sum(is.na(x)) == length(x)) 
        return(NA)
      return(sum(x, na.rm = T))}
  
  m_rgn <- m_rgn %>%
    group_by(rgn_id, rgn_name, commodity, product, year) %>%
    summarize(value = sum_function(value)) %>%
    ungroup()

  ### units: rename value field to units based on filename
  names(m_rgn)[names(m_rgn) == 'value'] <- units  
  
  ### output to .csv
  harvest_out <- sprintf('int/%s.csv', units)
  write.csv(m_rgn, harvest_out, row.names = FALSE, na = '')
}
## 
## 
## 
## ====
## file: FAO_raw_commodities_quant_1976_2013.csv
## Please use (fixed|coll|regexp)(x, ignore_case = TRUE) instead of ignore.case(x)
## Please use (fixed|coll|regexp)(x, ignore_case = TRUE) instead of ignore.case(x)
## 
## MISSING in the lookup the following commodites in product='fish_oil' having keyword='oil' in data file FAO_raw_commodities_quant_1976_2013.csv:
##     Albacore (=Longfin tuna), prepared or preserved, not minced, in oil
##     Aquatic animals, oils and fats, nei
##     Atlantic herring, not minced, in oil, prep. or pres.
##     Atlantic herring, not minced, smoked in oil, prep. or pres.
##     Chub mackerel prepared or preserved, not minced, in oil
##     Common (=Crangon) shrimp, fresh, chilled or boiled
##     Crustaceans, fresh, chilled or boiled in water, nei
##     European sardine, prepared or preserved, not minced, in oil
##     Herrings, not minced, in oil, prepared or preserved
##     Herrings, not minced, smoked, in oil or in tomato sauce, prep. or pres.
##     Mackerels nei, prep. or pres., not minced, in oil or in brine
##     Marine mammal oils, nei
##     Oils and fats of aquatic animals, nei
##     Pilchards (Sardinops spp.), prep. or pres., not minced, in oil
##     Salmon nei, not minced, in oil, prepared or preserved
##     Sardines, sardinellas, brisling or sprats, prep. or pres., not minced, in oil
##     Seal oil
##     Skipjack, prepared or preserved, whole or in pieces, not minced, in oil
##     Sperm oil
##     Tunas prepared or preserved, not minced, in oil
##     Whale oil
## Please use (fixed|coll|regexp)(x, ignore_case = TRUE) instead of ignore.case(x)
## Please use (fixed|coll|regexp)(x, ignore_case = TRUE) instead of ignore.case(x)
## 
## MISSING in the lookup the following commodites in product='ornamentals' having keyword='ornamental' in data file FAO_raw_commodities_quant_1976_2013.csv:
##     Ornamental freshwater fish
## Please use (fixed|coll|regexp)(x, ignore_case = TRUE) instead of ignore.case(x)
## 
## MISSING in the lookup the following commodites in product='corals' having keyword='coral' in data file FAO_raw_commodities_quant_1976_2013.csv:
##     Miscellaneous corals and shells
## Please use (fixed|coll|regexp)(x, ignore_case = TRUE) instead of ignore.case(x)
## 
## MISSING in the lookup the following commodites in product='shells' having keyword='shell' in data file FAO_raw_commodities_quant_1976_2013.csv:
##     Arkshell, fresh or chilled
##     Arkshells, frozen
##     Clams, cockles, arkshells, etc., prep. or pres., nei
##     Clams, cockles, arkshells, live, fresh or chilled
##     Clams, cockles, arkshells nei, dried, salted or in brine
##     Clams, cockles, arkshells, other than live, fresh or chilled
##     Cold-water shrimps and prawns (Pandalus spp., Crangon spp.), whether in shell or not, frozen
##     Oysters, in shell, live fresh or chilled
##     Powder and waste of shells
##     Shrimps and prawns, tails, shell on, frozen
##     Top shell, live, fresh or chilled
## 
## MISSING: These commodities in the lookup are not found in the data FAO_raw_commodities_quant_1976_2013.csv:
##         product                commodity
## 1  seaweeds  Other inedible seaweeds
## 2  seaweeds    Other edible seaweeds
## 3  fish_oil Alaska pollock, oil, nei
## 4  fish_oil  Demersal fish oils, nei
## 5  fish_oil     Gadiformes, oil, nei
## 6  fish_oil   Pelagic fish oils, nei
## 7  fish_oil             Pilchard oil
## 8  fish_oil        Jack mackerel oil
## 9  fish_oil           Hake liver oil
## 10 fish_oil   Gadoid liver oils, nei
## 11 fish_oil            Anchoveta oil
## 12 fish_oil  Alaska pollack oil, nei
## Warning in inner_join_impl(x, y, by$x, by$y, suffix$x, suffix$y): joining
## character vector and factor, coercing into character vector
## 
## These data were removed for not having any match in the lookup tables:
## 
## Yugoslavia SFR 
##              1 
## 
## These data were removed for not being of the proper rgn_type (eez,ohi_region) or mismatching region names in the lookup tables:
##                           tmp_type
## tmp_name                   disputed landlocked
##   Armenia                         0         38
##   Austria                         0        456
##   Belarus                         0        342
##   Bhutan                          0         38
##   Bolivia (Plurinat.State)        0         38
##   Botswana                        0        418
##   Burundi                         0         76
##   Chad                            0         76
##   Czech Republic                  0        456
##   Ethiopia                        0        190
##   Hungary                         0        494
##   Kazakhstan                      0        152
##   Kyrgyzstan                      0         38
##   Lao People's Dem. Rep.          0        190
##   Lesotho                         0        190
##   Luxembourg                      0        342
##   Macedonia, Fmr Yug Rp of        0        228
##   Malawi                          0         76
##   Mali                            0         76
##   Moldova, Republic of            0        114
##   Mongolia                        0        114
##   Nepal                           0        152
##   Niger                           0        152
##   Palestine, Occupied Tr.        38          0
##   Paraguay                        0         38
##   Rwanda                          0         38
##   Serbia                          0        342
##   Slovakia                        0        456
##   Swaziland                       0        266
##   Switzerland                     0        418
##   Turkmenistan                    0         38
##   Uganda                          0        304
##   Uzbekistan                      0         38
##   Zambia                          0        228
##   Zimbabwe                        0        190
## 
## DUPLICATES found. Consider using collapse2rgn to collapse duplicates (function in progress).
##  [1] "China"                 "China, Hong Kong SAR" 
##  [3] "China, Macao SAR"      "Guadeloupe"           
##  [5] "Martinique"            "Montenegro"           
##  [7] "Russian Federation"    "Serbia and Montenegro"
##  [9] "Sudan"                 "Sudan (former)"       
## [11] "Un. Sov. Soc. Rep."   
## 
## 
## 
## ====
## file: FAO_raw_commodities_value_1976_2013.csv
## Please use (fixed|coll|regexp)(x, ignore_case = TRUE) instead of ignore.case(x)
## Please use (fixed|coll|regexp)(x, ignore_case = TRUE) instead of ignore.case(x)
## 
## MISSING in the lookup the following commodites in product='fish_oil' having keyword='oil' in data file FAO_raw_commodities_value_1976_2013.csv:
##     Albacore (=Longfin tuna), prepared or preserved, not minced, in oil
##     Aquatic animals, oils and fats, nei
##     Atlantic herring, not minced, in oil, prep. or pres.
##     Atlantic herring, not minced, smoked in oil, prep. or pres.
##     Chub mackerel prepared or preserved, not minced, in oil
##     Common (=Crangon) shrimp, fresh, chilled or boiled
##     Crustaceans, fresh, chilled or boiled in water, nei
##     European sardine, prepared or preserved, not minced, in oil
##     Herrings, not minced, in oil, prepared or preserved
##     Herrings, not minced, smoked, in oil or in tomato sauce, prep. or pres.
##     Mackerels nei, prep. or pres., not minced, in oil or in brine
##     Marine mammal oils, nei
##     Oils and fats of aquatic animals, nei
##     Pilchards (Sardinops spp.), prep. or pres., not minced, in oil
##     Salmon nei, not minced, in oil, prepared or preserved
##     Sardines, sardinellas, brisling or sprats, prep. or pres., not minced, in oil
##     Seal oil
##     Skipjack, prepared or preserved, whole or in pieces, not minced, in oil
##     Sperm oil
##     Tunas prepared or preserved, not minced, in oil
##     Whale oil
## Please use (fixed|coll|regexp)(x, ignore_case = TRUE) instead of ignore.case(x)
## Please use (fixed|coll|regexp)(x, ignore_case = TRUE) instead of ignore.case(x)
## 
## MISSING in the lookup the following commodites in product='ornamentals' having keyword='ornamental' in data file FAO_raw_commodities_value_1976_2013.csv:
##     Ornamental freshwater fish
## Please use (fixed|coll|regexp)(x, ignore_case = TRUE) instead of ignore.case(x)
## 
## MISSING in the lookup the following commodites in product='corals' having keyword='coral' in data file FAO_raw_commodities_value_1976_2013.csv:
##     Miscellaneous corals and shells
## Please use (fixed|coll|regexp)(x, ignore_case = TRUE) instead of ignore.case(x)
## 
## MISSING in the lookup the following commodites in product='shells' having keyword='shell' in data file FAO_raw_commodities_value_1976_2013.csv:
##     Arkshell, fresh or chilled
##     Arkshells, frozen
##     Clams, cockles, arkshells, etc., prep. or pres., nei
##     Clams, cockles, arkshells, live, fresh or chilled
##     Clams, cockles, arkshells nei, dried, salted or in brine
##     Clams, cockles, arkshells, other than live, fresh or chilled
##     Cold-water shrimps and prawns (Pandalus spp., Crangon spp.), whether in shell or not, frozen
##     Oysters, in shell, live fresh or chilled
##     Powder and waste of shells
##     Shrimps and prawns, tails, shell on, frozen
##     Top shell, live, fresh or chilled
## 
## MISSING: These commodities in the lookup are not found in the data FAO_raw_commodities_value_1976_2013.csv:
##         product                commodity
## 1  seaweeds  Other inedible seaweeds
## 2  seaweeds    Other edible seaweeds
## 3  fish_oil Alaska pollock, oil, nei
## 4  fish_oil  Demersal fish oils, nei
## 5  fish_oil     Gadiformes, oil, nei
## 6  fish_oil   Pelagic fish oils, nei
## 7  fish_oil             Pilchard oil
## 8  fish_oil        Jack mackerel oil
## 9  fish_oil           Hake liver oil
## 10 fish_oil   Gadoid liver oils, nei
## 11 fish_oil            Anchoveta oil
## 12 fish_oil  Alaska pollack oil, nei
## Warning in inner_join_impl(x, y, by$x, by$y, suffix$x, suffix$y): joining
## character vector and factor, coercing into character vector
## 
## These data were removed for not having any match in the lookup tables:
## 
## Yugoslavia SFR 
##              1 
## 
## These data were removed for not being of the proper rgn_type (eez,ohi_region) or mismatching region names in the lookup tables:
##                           tmp_type
## tmp_name                   disputed landlocked
##   Armenia                         0         38
##   Austria                         0        456
##   Belarus                         0        342
##   Bhutan                          0         38
##   Bolivia (Plurinat.State)        0         38
##   Botswana                        0        418
##   Burundi                         0         76
##   Chad                            0         76
##   Czech Republic                  0        456
##   Ethiopia                        0        190
##   Hungary                         0        494
##   Kazakhstan                      0        152
##   Kyrgyzstan                      0         38
##   Lao People's Dem. Rep.          0        190
##   Lesotho                         0        190
##   Luxembourg                      0        342
##   Macedonia, Fmr Yug Rp of        0        228
##   Malawi                          0         76
##   Mali                            0         76
##   Moldova, Republic of            0        114
##   Mongolia                        0        114
##   Nepal                           0        152
##   Niger                           0        152
##   Palestine, Occupied Tr.        38          0
##   Paraguay                        0         38
##   Rwanda                          0         38
##   Serbia                          0        342
##   Slovakia                        0        456
##   Swaziland                       0        266
##   Switzerland                     0        418
##   Turkmenistan                    0         38
##   Uganda                          0        304
##   Uzbekistan                      0         38
##   Zambia                          0        228
##   Zimbabwe                        0        190
## 
## DUPLICATES found. Consider using collapse2rgn to collapse duplicates (function in progress).
##  [1] "China"                 "China, Hong Kong SAR" 
##  [3] "China, Macao SAR"      "Guadeloupe"           
##  [5] "Martinique"            "Montenegro"           
##  [7] "Russian Federation"    "Serbia and Montenegro"
##  [9] "Sudan"                 "Sudan (former)"       
## [11] "Un. Sov. Soc. Rep."

Combining the quantity and value data and a bit of cleaning to remove data prior to first reporting year for each commodity and region.

h_tonnes <- read.csv('int/tonnes.csv')
#h_tonnes_old <- read.csv('../v2014_test/intermediate/tonnes.csv')
h_usd    <- read.csv('int/usd.csv')

### concatenates h_tonnes and h_usd data
### h includes rgn_name, rgn_id, commodity, product, year, tonnes, usd.
h <- h_usd %>%
    full_join(h_tonnes, by=c('rgn_name', 'rgn_id', 'commodity', 'product', 'year')) %>%
    mutate(commodity = as.character(commodity)) %>%
    arrange(rgn_id, product, commodity, year)

### clips out years prior to first reporting year, for each commodity per region
h <- h %>% np_harvest_preclip

6 Gapfilling

See issue #397 for details and debate and pretty graphs. Summary of gapfilling that is performed:

h <- h %>% np_harvest_gapflag  
### Adds flag for required gap-filling, based upon NAs in data. 
### NOTE: Does not perform any gap-filling.
### At this point, h includes: 
###   rgn_name   rgn_id   commodity   product   year   tonnes   usd   gapfill
### 'gapfill' will be in (zerofill, endfill, tbd, none)

data_check <- h %>% np_datacheck()
### for each commodity within each region, creates (but doesn't save...) summary info:
###   num_years:        the length of the data series for this commodity in this region
###   usd_unique_nz:    (or 'tns') number of unique non-zero values for usd or tonnes 
###   usd_na & tns_na:  number of NA occurrences
###   paired_obs:       number of non-zero paired observations
###   usd_unique_pairs: (or 'tns') within set of paired observations, count of unique usd and tonnes
###   unique_pairs:     lesser of usd_unique_pairs and tns_unique_pairs
###   count_no_data:    number of paired NAs - years with no value reported

h <- h %>% np_zerofill
### for post-reporting years with NA for both tonnes and USD, fill zero - 
### assumes that non-reporting indicates zero harvest to report.
### Also cross-fills zeros where one side is 0, other is NA (not flagged as gapfill)

h <- h %>% np_lowdata_filter()
### Exclude commodities (within a region) that have few non-zero data points.
### Optional parameter with default: nonzero_h_yr_min = 4
### NOTE: This filter has consequences for the regression, but also has meaning in terms of 
###       not inflicting a penalty on regions trying, and then stopping, an experimental harvest.

h <- h %>% add_georegion_id()
## Warning in left_join_impl(x, y, by$x, by$y, suffix$x, suffix$y): joining
## factors with different levels, coercing to character vector
### Melanie's script to add a georegional ID tag based on country keys and IDs.


h <- h %>% np_regr_fill(years_back = 10, vars = 'td', scope = 'rgn_id')
h <- h %>% np_regr_fill(vars = 'tdy', scope = 'georgn_id')
h <- h %>% np_regr_fill(vars = 'tdy', scope = 'global')
### np_regr_fill() is a generalized regression gapfill function.  Parameters (with defaults):
### * years_back=50 (int):     This determines how far back in the time series to include within the regression.
### * min_paired_obs=4 (int):  This determines how many paired observations are required to attempt a regression.
### * scope = 'rgn_id' (str):  ('rgn_id', 'georgn_id', 'global') Determines grouping scale for regression.
### * vars = 'tdy' (str):      ('td', 'tdy') Determines model: (tonnes ~ usd) or (tonnes ~ usd + year) [and vice versa]


h <- h %>% np_end_fill()
### For final year of data, if both usd and tonnes originally reported as NA, pull forward
### values for usd and tonnes from the previous year.  This should happen after regression fill.

h_comm <- h
### Store commodity-level data, before moving on to the product-level smoothing.


### Output gapfilling report to .csv files.
### Very few usd gapfilling, and none in recent years (data used to weight contributions), so will ignore this: gapfill=="r2_u_gr"
h_gap <- h %>%
  mutate(gapfill = ifelse(gapfill == "r2_u_gr", "none", gapfill)) %>%   # focusing only on tonnes gapfilling
  select(rgn_id, commodity, product, year, gapfill)

write.csv(h_gap, 'output/np_harvest_tonnes_gf.csv', row.names = FALSE, na = '')

7 Final data preparation

Summarize each product per country per year, e.g., all corals in Albania in 2011. And, do some error checking.

h_prod <- h_comm %>%
  group_by(rgn_name, rgn_id, product, year) %>%
  summarize(tonnes = sum(tonnes, na.rm = TRUE), 
            usd = sum(usd, na.rm = TRUE))
          
### Error-checking and table exports
stopifnot(sum(duplicated(h_prod[ , c('rgn_id', 'product', 'year')])) == 0)

### Check: wide with all commmodities and product subtotal for comparison with input data
h_x_tonnes <- h_comm %>% 
  bind_rows(mutate(h_prod, commodity='Z_TOTAL')) %>%
  select(rgn_name, rgn_id, commodity, product, year, tonnes) %>%
  arrange(rgn_name, product, commodity, year) %>%
  spread(year, tonnes)
h_x_usd <- h_comm %>% 
  bind_rows(mutate(h_prod, commodity='Z_TOTAL')) %>%
  select(rgn_name, rgn_id, commodity, product, year, usd) %>%
  arrange(rgn_name, product, commodity, year) %>%
  spread(year, usd)
write.csv(h_x_tonnes, 'int/np_harvest_tonnes_wide.csv', row.names = FALSE, na = 'NA')
write.csv(h_x_usd,    'int/np_harvest_usd_wide.csv',    row.names = FALSE, na = 'NA')

Determine rolling averages for tonnes and USD in order to determine peak values. This is based upon total harvests by product group, not individual commodity.

year_max <- max(h_prod$year)


j <- h_prod %>%
  arrange(rgn_id, product, year) %>%
   group_by(rgn_id, product) %>%
        mutate(
          tonnes_rollmean = rollapply(tonnes, width=4, FUN=mean, align='right', partial=TRUE, na.rm=FALSE),
          usd_rollmean    = rollapply(   usd, width=4, FUN=mean, align='right', partial=TRUE, na.rm=FALSE)) %>%
        rename(
          tonnes_orig = tonnes, ### prevent overwriting of reported and gapfilled values
          usd_orig    = usd) %>%    ### prevent overwriting of reported and gapfilled values
    mutate(
      tonnes = ifelse(!is.na(tonnes_rollmean), tonnes_rollmean, tonnes),
      usd    = ifelse(!is.na(   usd_rollmean),    usd_rollmean,    usd)) %>%
    select(rgn_id, rgn_name, product, year, tonnes, usd, tonnes_orig, usd_orig)

Score harvest (tonnes and usd) relative to peaks. Output values as .csvs. Perform this for all given scenarios, using a for loop.

buffer  <-  0.35 
recent_years  <-  10

j <- j %>%
    group_by(rgn_id, product) %>%
    mutate(tonnes_peak = max(tonnes, na.rm=T)  * (1 - buffer)) %>%
    mutate(usd_peak = max(   usd[year >= (year_max - recent_years)], na.rm=T)) %>%
    ungroup() 

### all years (within a region) have the same usd_peak values, but some years don't have all the products. Use the most recent year as this is considered the most current product list. 
j_weights <- j %>%
    filter(year==2013) %>%
    group_by(rgn_id) %>%
    mutate(
      usd_peak_allproducts    = sum(usd_peak, na.rm=T),
      prod_weight = usd_peak / usd_peak_allproducts) %>%
    ungroup() %>%
  select(rgn_id, product, weight = prod_weight)

## Determine relative status:
  j <- j %>% 
    mutate(tonnes_rel = ifelse(tonnes >= tonnes_peak, 1, tonnes / tonnes_peak))

Write .csv files.

### Write entire data frame to .csv:
write.csv(j, 'int/np_harvest_smoothed_data.csv', row.names = FALSE, na = '')

### Write individual data layers:
### Write NP weights layer also used to calculate pressures and resilience:
write.csv(j_weights, 'output/np_harvest_weights_from_usd.csv', row.names = FALSE, na = '')

tonnes <- j %>%
  select(rgn_id, product, year, tonnes) 
write.csv(tonnes, 'output/np_harvest_tonnes.csv', row.names = FALSE, na = '')

tonnes_rel <- j %>%
  select(rgn_id, product, year, tonnes_rel) 
write.csv(tonnes_rel, 'output/np_harvest_tonnes_rel.csv', row.names = FALSE, na = '')

Comparing against last year’s data

## Replique de Congo, due to revision of 2011 data for ornamentals (and only one product that isn't a big producer)
new <- read.csv("int/tonnes.csv")
old <- read.csv("../v2014_test/intermediate/tonnes.csv")

filter(new, rgn_id==115) %>%
  arrange(commodity, year)
##     rgn_id           rgn_name
## 1      115 Dominican Republic
## 2      115 Dominican Republic
## 3      115 Dominican Republic
## 4      115 Dominican Republic
## 5      115 Dominican Republic
## 6      115 Dominican Republic
## 7      115 Dominican Republic
## 8      115 Dominican Republic
## 9      115 Dominican Republic
## 10     115 Dominican Republic
## 11     115 Dominican Republic
## 12     115 Dominican Republic
## 13     115 Dominican Republic
## 14     115 Dominican Republic
## 15     115 Dominican Republic
## 16     115 Dominican Republic
## 17     115 Dominican Republic
## 18     115 Dominican Republic
## 19     115 Dominican Republic
## 20     115 Dominican Republic
## 21     115 Dominican Republic
## 22     115 Dominican Republic
## 23     115 Dominican Republic
## 24     115 Dominican Republic
## 25     115 Dominican Republic
## 26     115 Dominican Republic
## 27     115 Dominican Republic
## 28     115 Dominican Republic
## 29     115 Dominican Republic
## 30     115 Dominican Republic
## 31     115 Dominican Republic
## 32     115 Dominican Republic
## 33     115 Dominican Republic
## 34     115 Dominican Republic
## 35     115 Dominican Republic
## 36     115 Dominican Republic
## 37     115 Dominican Republic
## 38     115 Dominican Republic
## 39     115 Dominican Republic
## 40     115 Dominican Republic
## 41     115 Dominican Republic
## 42     115 Dominican Republic
## 43     115 Dominican Republic
## 44     115 Dominican Republic
## 45     115 Dominican Republic
## 46     115 Dominican Republic
## 47     115 Dominican Republic
## 48     115 Dominican Republic
## 49     115 Dominican Republic
## 50     115 Dominican Republic
## 51     115 Dominican Republic
## 52     115 Dominican Republic
## 53     115 Dominican Republic
## 54     115 Dominican Republic
## 55     115 Dominican Republic
## 56     115 Dominican Republic
## 57     115 Dominican Republic
## 58     115 Dominican Republic
## 59     115 Dominican Republic
## 60     115 Dominican Republic
## 61     115 Dominican Republic
## 62     115 Dominican Republic
## 63     115 Dominican Republic
## 64     115 Dominican Republic
## 65     115 Dominican Republic
## 66     115 Dominican Republic
## 67     115 Dominican Republic
## 68     115 Dominican Republic
## 69     115 Dominican Republic
## 70     115 Dominican Republic
## 71     115 Dominican Republic
## 72     115 Dominican Republic
## 73     115 Dominican Republic
## 74     115 Dominican Republic
## 75     115 Dominican Republic
## 76     115 Dominican Republic
## 77     115 Dominican Republic
## 78     115 Dominican Republic
## 79     115 Dominican Republic
## 80     115 Dominican Republic
## 81     115 Dominican Republic
## 82     115 Dominican Republic
## 83     115 Dominican Republic
## 84     115 Dominican Republic
## 85     115 Dominican Republic
## 86     115 Dominican Republic
## 87     115 Dominican Republic
## 88     115 Dominican Republic
## 89     115 Dominican Republic
## 90     115 Dominican Republic
## 91     115 Dominican Republic
## 92     115 Dominican Republic
## 93     115 Dominican Republic
## 94     115 Dominican Republic
## 95     115 Dominican Republic
## 96     115 Dominican Republic
## 97     115 Dominican Republic
## 98     115 Dominican Republic
## 99     115 Dominican Republic
## 100    115 Dominican Republic
## 101    115 Dominican Republic
## 102    115 Dominican Republic
## 103    115 Dominican Republic
## 104    115 Dominican Republic
## 105    115 Dominican Republic
## 106    115 Dominican Republic
## 107    115 Dominican Republic
## 108    115 Dominican Republic
## 109    115 Dominican Republic
## 110    115 Dominican Republic
## 111    115 Dominican Republic
## 112    115 Dominican Republic
## 113    115 Dominican Republic
## 114    115 Dominican Republic
## 115    115 Dominican Republic
## 116    115 Dominican Republic
## 117    115 Dominican Republic
## 118    115 Dominican Republic
## 119    115 Dominican Republic
## 120    115 Dominican Republic
## 121    115 Dominican Republic
## 122    115 Dominican Republic
## 123    115 Dominican Republic
## 124    115 Dominican Republic
## 125    115 Dominican Republic
## 126    115 Dominican Republic
## 127    115 Dominican Republic
## 128    115 Dominican Republic
## 129    115 Dominican Republic
## 130    115 Dominican Republic
## 131    115 Dominican Republic
## 132    115 Dominican Republic
## 133    115 Dominican Republic
## 134    115 Dominican Republic
## 135    115 Dominican Republic
## 136    115 Dominican Republic
## 137    115 Dominican Republic
## 138    115 Dominican Republic
## 139    115 Dominican Republic
## 140    115 Dominican Republic
## 141    115 Dominican Republic
## 142    115 Dominican Republic
## 143    115 Dominican Republic
## 144    115 Dominican Republic
## 145    115 Dominican Republic
## 146    115 Dominican Republic
## 147    115 Dominican Republic
## 148    115 Dominican Republic
## 149    115 Dominican Republic
## 150    115 Dominican Republic
## 151    115 Dominican Republic
## 152    115 Dominican Republic
## 153    115 Dominican Republic
## 154    115 Dominican Republic
## 155    115 Dominican Republic
## 156    115 Dominican Republic
## 157    115 Dominican Republic
## 158    115 Dominican Republic
## 159    115 Dominican Republic
## 160    115 Dominican Republic
## 161    115 Dominican Republic
## 162    115 Dominican Republic
## 163    115 Dominican Republic
## 164    115 Dominican Republic
## 165    115 Dominican Republic
## 166    115 Dominican Republic
## 167    115 Dominican Republic
## 168    115 Dominican Republic
## 169    115 Dominican Republic
## 170    115 Dominican Republic
## 171    115 Dominican Republic
## 172    115 Dominican Republic
## 173    115 Dominican Republic
## 174    115 Dominican Republic
## 175    115 Dominican Republic
## 176    115 Dominican Republic
## 177    115 Dominican Republic
## 178    115 Dominican Republic
## 179    115 Dominican Republic
## 180    115 Dominican Republic
## 181    115 Dominican Republic
## 182    115 Dominican Republic
## 183    115 Dominican Republic
## 184    115 Dominican Republic
## 185    115 Dominican Republic
## 186    115 Dominican Republic
## 187    115 Dominican Republic
## 188    115 Dominican Republic
## 189    115 Dominican Republic
## 190    115 Dominican Republic
## 191    115 Dominican Republic
## 192    115 Dominican Republic
## 193    115 Dominican Republic
## 194    115 Dominican Republic
## 195    115 Dominican Republic
## 196    115 Dominican Republic
## 197    115 Dominican Republic
## 198    115 Dominican Republic
## 199    115 Dominican Republic
## 200    115 Dominican Republic
## 201    115 Dominican Republic
## 202    115 Dominican Republic
## 203    115 Dominican Republic
## 204    115 Dominican Republic
## 205    115 Dominican Republic
## 206    115 Dominican Republic
## 207    115 Dominican Republic
## 208    115 Dominican Republic
## 209    115 Dominican Republic
## 210    115 Dominican Republic
## 211    115 Dominican Republic
## 212    115 Dominican Republic
## 213    115 Dominican Republic
## 214    115 Dominican Republic
## 215    115 Dominican Republic
## 216    115 Dominican Republic
## 217    115 Dominican Republic
## 218    115 Dominican Republic
## 219    115 Dominican Republic
## 220    115 Dominican Republic
## 221    115 Dominican Republic
## 222    115 Dominican Republic
## 223    115 Dominican Republic
## 224    115 Dominican Republic
## 225    115 Dominican Republic
## 226    115 Dominican Republic
## 227    115 Dominican Republic
## 228    115 Dominican Republic
## 229    115 Dominican Republic
## 230    115 Dominican Republic
## 231    115 Dominican Republic
## 232    115 Dominican Republic
## 233    115 Dominican Republic
## 234    115 Dominican Republic
## 235    115 Dominican Republic
## 236    115 Dominican Republic
## 237    115 Dominican Republic
## 238    115 Dominican Republic
## 239    115 Dominican Republic
## 240    115 Dominican Republic
## 241    115 Dominican Republic
## 242    115 Dominican Republic
## 243    115 Dominican Republic
## 244    115 Dominican Republic
## 245    115 Dominican Republic
## 246    115 Dominican Republic
## 247    115 Dominican Republic
## 248    115 Dominican Republic
## 249    115 Dominican Republic
## 250    115 Dominican Republic
## 251    115 Dominican Republic
## 252    115 Dominican Republic
## 253    115 Dominican Republic
## 254    115 Dominican Republic
## 255    115 Dominican Republic
## 256    115 Dominican Republic
## 257    115 Dominican Republic
## 258    115 Dominican Republic
## 259    115 Dominican Republic
## 260    115 Dominican Republic
## 261    115 Dominican Republic
## 262    115 Dominican Republic
## 263    115 Dominican Republic
## 264    115 Dominican Republic
## 265    115 Dominican Republic
## 266    115 Dominican Republic
## 267    115 Dominican Republic
## 268    115 Dominican Republic
## 269    115 Dominican Republic
## 270    115 Dominican Republic
## 271    115 Dominican Republic
## 272    115 Dominican Republic
## 273    115 Dominican Republic
## 274    115 Dominican Republic
## 275    115 Dominican Republic
## 276    115 Dominican Republic
## 277    115 Dominican Republic
## 278    115 Dominican Republic
## 279    115 Dominican Republic
## 280    115 Dominican Republic
## 281    115 Dominican Republic
## 282    115 Dominican Republic
## 283    115 Dominican Republic
## 284    115 Dominican Republic
## 285    115 Dominican Republic
## 286    115 Dominican Republic
## 287    115 Dominican Republic
## 288    115 Dominican Republic
## 289    115 Dominican Republic
## 290    115 Dominican Republic
## 291    115 Dominican Republic
## 292    115 Dominican Republic
## 293    115 Dominican Republic
## 294    115 Dominican Republic
## 295    115 Dominican Republic
## 296    115 Dominican Republic
## 297    115 Dominican Republic
## 298    115 Dominican Republic
## 299    115 Dominican Republic
## 300    115 Dominican Republic
## 301    115 Dominican Republic
## 302    115 Dominican Republic
## 303    115 Dominican Republic
## 304    115 Dominican Republic
##                                                  commodity     product
## 1                                            Agar agar nei    seaweeds
## 2                                            Agar agar nei    seaweeds
## 3                                            Agar agar nei    seaweeds
## 4                                            Agar agar nei    seaweeds
## 5                                            Agar agar nei    seaweeds
## 6                                            Agar agar nei    seaweeds
## 7                                            Agar agar nei    seaweeds
## 8                                            Agar agar nei    seaweeds
## 9                                            Agar agar nei    seaweeds
## 10                                           Agar agar nei    seaweeds
## 11                                           Agar agar nei    seaweeds
## 12                                           Agar agar nei    seaweeds
## 13                                           Agar agar nei    seaweeds
## 14                                           Agar agar nei    seaweeds
## 15                                           Agar agar nei    seaweeds
## 16                                           Agar agar nei    seaweeds
## 17                                           Agar agar nei    seaweeds
## 18                                           Agar agar nei    seaweeds
## 19                                           Agar agar nei    seaweeds
## 20                                           Agar agar nei    seaweeds
## 21                                           Agar agar nei    seaweeds
## 22                                           Agar agar nei    seaweeds
## 23                                           Agar agar nei    seaweeds
## 24                                           Agar agar nei    seaweeds
## 25                                           Agar agar nei    seaweeds
## 26                                           Agar agar nei    seaweeds
## 27                                           Agar agar nei    seaweeds
## 28                                           Agar agar nei    seaweeds
## 29                                           Agar agar nei    seaweeds
## 30                                           Agar agar nei    seaweeds
## 31                                           Agar agar nei    seaweeds
## 32                                           Agar agar nei    seaweeds
## 33                                           Agar agar nei    seaweeds
## 34                                           Agar agar nei    seaweeds
## 35                                           Agar agar nei    seaweeds
## 36                                           Agar agar nei    seaweeds
## 37                                           Agar agar nei    seaweeds
## 38                                           Agar agar nei    seaweeds
## 39                                      Coral and the like      corals
## 40                                      Coral and the like      corals
## 41                                      Coral and the like      corals
## 42                                      Coral and the like      corals
## 43                                      Coral and the like      corals
## 44                                      Coral and the like      corals
## 45                                      Coral and the like      corals
## 46                                      Coral and the like      corals
## 47                                      Coral and the like      corals
## 48                                      Coral and the like      corals
## 49                                      Coral and the like      corals
## 50                                      Coral and the like      corals
## 51                                      Coral and the like      corals
## 52                                      Coral and the like      corals
## 53                                      Coral and the like      corals
## 54                                      Coral and the like      corals
## 55                                      Coral and the like      corals
## 56                                      Coral and the like      corals
## 57                                      Coral and the like      corals
## 58                                      Coral and the like      corals
## 59                                      Coral and the like      corals
## 60                                      Coral and the like      corals
## 61                                      Coral and the like      corals
## 62                                      Coral and the like      corals
## 63                                      Coral and the like      corals
## 64                                      Coral and the like      corals
## 65                                      Coral and the like      corals
## 66                                      Coral and the like      corals
## 67                                      Coral and the like      corals
## 68                                      Coral and the like      corals
## 69                                      Coral and the like      corals
## 70                                      Coral and the like      corals
## 71                                      Coral and the like      corals
## 72                                      Coral and the like      corals
## 73                                      Coral and the like      corals
## 74                                      Coral and the like      corals
## 75                                      Coral and the like      corals
## 76                                      Coral and the like      corals
## 77                                     Fish body oils, nei    fish_oil
## 78                                     Fish body oils, nei    fish_oil
## 79                                     Fish body oils, nei    fish_oil
## 80                                     Fish body oils, nei    fish_oil
## 81                                     Fish body oils, nei    fish_oil
## 82                                     Fish body oils, nei    fish_oil
## 83                                     Fish body oils, nei    fish_oil
## 84                                     Fish body oils, nei    fish_oil
## 85                                     Fish body oils, nei    fish_oil
## 86                                     Fish body oils, nei    fish_oil
## 87                                     Fish body oils, nei    fish_oil
## 88                                     Fish body oils, nei    fish_oil
## 89                                     Fish body oils, nei    fish_oil
## 90                                     Fish body oils, nei    fish_oil
## 91                                     Fish body oils, nei    fish_oil
## 92                                     Fish body oils, nei    fish_oil
## 93                                     Fish body oils, nei    fish_oil
## 94                                     Fish body oils, nei    fish_oil
## 95                                     Fish body oils, nei    fish_oil
## 96                                     Fish body oils, nei    fish_oil
## 97                                     Fish body oils, nei    fish_oil
## 98                                     Fish body oils, nei    fish_oil
## 99                                     Fish body oils, nei    fish_oil
## 100                                    Fish body oils, nei    fish_oil
## 101                                    Fish body oils, nei    fish_oil
## 102                                    Fish body oils, nei    fish_oil
## 103                                    Fish body oils, nei    fish_oil
## 104                                    Fish body oils, nei    fish_oil
## 105                                    Fish body oils, nei    fish_oil
## 106                                    Fish body oils, nei    fish_oil
## 107                                    Fish body oils, nei    fish_oil
## 108                                    Fish body oils, nei    fish_oil
## 109                                    Fish body oils, nei    fish_oil
## 110                                    Fish body oils, nei    fish_oil
## 111                                    Fish body oils, nei    fish_oil
## 112                                    Fish body oils, nei    fish_oil
## 113                                    Fish body oils, nei    fish_oil
## 114                                    Fish body oils, nei    fish_oil
## 115                                   Fish liver oils, nei    fish_oil
## 116                                   Fish liver oils, nei    fish_oil
## 117                                   Fish liver oils, nei    fish_oil
## 118                                   Fish liver oils, nei    fish_oil
## 119                                   Fish liver oils, nei    fish_oil
## 120                                   Fish liver oils, nei    fish_oil
## 121                                   Fish liver oils, nei    fish_oil
## 122                                   Fish liver oils, nei    fish_oil
## 123                                   Fish liver oils, nei    fish_oil
## 124                                   Fish liver oils, nei    fish_oil
## 125                                   Fish liver oils, nei    fish_oil
## 126                                   Fish liver oils, nei    fish_oil
## 127                                   Fish liver oils, nei    fish_oil
## 128                                   Fish liver oils, nei    fish_oil
## 129                                   Fish liver oils, nei    fish_oil
## 130                                   Fish liver oils, nei    fish_oil
## 131                                   Fish liver oils, nei    fish_oil
## 132                                   Fish liver oils, nei    fish_oil
## 133                                   Fish liver oils, nei    fish_oil
## 134                                   Fish liver oils, nei    fish_oil
## 135                                   Fish liver oils, nei    fish_oil
## 136                                   Fish liver oils, nei    fish_oil
## 137                                   Fish liver oils, nei    fish_oil
## 138                                   Fish liver oils, nei    fish_oil
## 139                                   Fish liver oils, nei    fish_oil
## 140                                   Fish liver oils, nei    fish_oil
## 141                                   Fish liver oils, nei    fish_oil
## 142                                   Fish liver oils, nei    fish_oil
## 143                                   Fish liver oils, nei    fish_oil
## 144                                   Fish liver oils, nei    fish_oil
## 145                                   Fish liver oils, nei    fish_oil
## 146                                   Fish liver oils, nei    fish_oil
## 147                                   Fish liver oils, nei    fish_oil
## 148                                   Fish liver oils, nei    fish_oil
## 149                                   Fish liver oils, nei    fish_oil
## 150                                   Fish liver oils, nei    fish_oil
## 151                                   Fish liver oils, nei    fish_oil
## 152                                   Fish liver oils, nei    fish_oil
## 153                                    Natural sponges nei     sponges
## 154                                    Natural sponges nei     sponges
## 155                                    Natural sponges nei     sponges
## 156                                    Natural sponges nei     sponges
## 157                                    Natural sponges nei     sponges
## 158                                    Natural sponges nei     sponges
## 159                                    Natural sponges nei     sponges
## 160                                    Natural sponges nei     sponges
## 161                                    Natural sponges nei     sponges
## 162                                    Natural sponges nei     sponges
## 163                                    Natural sponges nei     sponges
## 164                                    Natural sponges nei     sponges
## 165                                    Natural sponges nei     sponges
## 166                                    Natural sponges nei     sponges
## 167                                    Natural sponges nei     sponges
## 168                                    Natural sponges nei     sponges
## 169                                    Natural sponges nei     sponges
## 170                                    Natural sponges nei     sponges
## 171                                    Natural sponges nei     sponges
## 172                                    Natural sponges nei     sponges
## 173                                    Natural sponges nei     sponges
## 174                                    Natural sponges nei     sponges
## 175                                    Natural sponges nei     sponges
## 176                                    Natural sponges nei     sponges
## 177                                    Natural sponges nei     sponges
## 178                                    Natural sponges nei     sponges
## 179                                    Natural sponges nei     sponges
## 180                                    Natural sponges nei     sponges
## 181                                    Natural sponges nei     sponges
## 182                                    Natural sponges nei     sponges
## 183                                    Natural sponges nei     sponges
## 184                                    Natural sponges nei     sponges
## 185                                    Natural sponges nei     sponges
## 186                                    Natural sponges nei     sponges
## 187                                    Natural sponges nei     sponges
## 188                                    Natural sponges nei     sponges
## 189                                    Natural sponges nei     sponges
## 190                                    Natural sponges nei     sponges
## 191                                    Ornamental fish nei ornamentals
## 192                                    Ornamental fish nei ornamentals
## 193                                    Ornamental fish nei ornamentals
## 194                                    Ornamental fish nei ornamentals
## 195                                    Ornamental fish nei ornamentals
## 196                                    Ornamental fish nei ornamentals
## 197                                    Ornamental fish nei ornamentals
## 198                                    Ornamental fish nei ornamentals
## 199                                    Ornamental fish nei ornamentals
## 200                                    Ornamental fish nei ornamentals
## 201                                    Ornamental fish nei ornamentals
## 202                                    Ornamental fish nei ornamentals
## 203                                    Ornamental fish nei ornamentals
## 204                                    Ornamental fish nei ornamentals
## 205                                    Ornamental fish nei ornamentals
## 206                                    Ornamental fish nei ornamentals
## 207                                    Ornamental fish nei ornamentals
## 208                                    Ornamental fish nei ornamentals
## 209                                    Ornamental fish nei ornamentals
## 210                                    Ornamental fish nei ornamentals
## 211                                    Ornamental fish nei ornamentals
## 212                                    Ornamental fish nei ornamentals
## 213                                    Ornamental fish nei ornamentals
## 214                                    Ornamental fish nei ornamentals
## 215                                    Ornamental fish nei ornamentals
## 216                                    Ornamental fish nei ornamentals
## 217                                    Ornamental fish nei ornamentals
## 218                                    Ornamental fish nei ornamentals
## 219                                    Ornamental fish nei ornamentals
## 220                                    Ornamental fish nei ornamentals
## 221                                    Ornamental fish nei ornamentals
## 222                                    Ornamental fish nei ornamentals
## 223                                    Ornamental fish nei ornamentals
## 224                                    Ornamental fish nei ornamentals
## 225                                    Ornamental fish nei ornamentals
## 226                                    Ornamental fish nei ornamentals
## 227                                    Ornamental fish nei ornamentals
## 228                                    Ornamental fish nei ornamentals
## 229                              Ornamental saltwater fish ornamentals
## 230                              Ornamental saltwater fish ornamentals
## 231                              Ornamental saltwater fish ornamentals
## 232                              Ornamental saltwater fish ornamentals
## 233                              Ornamental saltwater fish ornamentals
## 234                              Ornamental saltwater fish ornamentals
## 235                              Ornamental saltwater fish ornamentals
## 236                              Ornamental saltwater fish ornamentals
## 237                              Ornamental saltwater fish ornamentals
## 238                              Ornamental saltwater fish ornamentals
## 239                              Ornamental saltwater fish ornamentals
## 240                              Ornamental saltwater fish ornamentals
## 241                              Ornamental saltwater fish ornamentals
## 242                              Ornamental saltwater fish ornamentals
## 243                              Ornamental saltwater fish ornamentals
## 244                              Ornamental saltwater fish ornamentals
## 245                              Ornamental saltwater fish ornamentals
## 246                              Ornamental saltwater fish ornamentals
## 247                              Ornamental saltwater fish ornamentals
## 248                              Ornamental saltwater fish ornamentals
## 249                              Ornamental saltwater fish ornamentals
## 250                              Ornamental saltwater fish ornamentals
## 251                              Ornamental saltwater fish ornamentals
## 252                              Ornamental saltwater fish ornamentals
## 253                              Ornamental saltwater fish ornamentals
## 254                              Ornamental saltwater fish ornamentals
## 255                              Ornamental saltwater fish ornamentals
## 256                              Ornamental saltwater fish ornamentals
## 257                              Ornamental saltwater fish ornamentals
## 258                              Ornamental saltwater fish ornamentals
## 259                              Ornamental saltwater fish ornamentals
## 260                              Ornamental saltwater fish ornamentals
## 261                              Ornamental saltwater fish ornamentals
## 262                              Ornamental saltwater fish ornamentals
## 263                              Ornamental saltwater fish ornamentals
## 264                              Ornamental saltwater fish ornamentals
## 265                              Ornamental saltwater fish ornamentals
## 266                              Ornamental saltwater fish ornamentals
## 267 Other seaweeds and aquatic plants and products thereof    seaweeds
## 268 Other seaweeds and aquatic plants and products thereof    seaweeds
## 269 Other seaweeds and aquatic plants and products thereof    seaweeds
## 270 Other seaweeds and aquatic plants and products thereof    seaweeds
## 271 Other seaweeds and aquatic plants and products thereof    seaweeds
## 272 Other seaweeds and aquatic plants and products thereof    seaweeds
## 273 Other seaweeds and aquatic plants and products thereof    seaweeds
## 274 Other seaweeds and aquatic plants and products thereof    seaweeds
## 275 Other seaweeds and aquatic plants and products thereof    seaweeds
## 276 Other seaweeds and aquatic plants and products thereof    seaweeds
## 277 Other seaweeds and aquatic plants and products thereof    seaweeds
## 278 Other seaweeds and aquatic plants and products thereof    seaweeds
## 279 Other seaweeds and aquatic plants and products thereof    seaweeds
## 280 Other seaweeds and aquatic plants and products thereof    seaweeds
## 281 Other seaweeds and aquatic plants and products thereof    seaweeds
## 282 Other seaweeds and aquatic plants and products thereof    seaweeds
## 283 Other seaweeds and aquatic plants and products thereof    seaweeds
## 284 Other seaweeds and aquatic plants and products thereof    seaweeds
## 285 Other seaweeds and aquatic plants and products thereof    seaweeds
## 286 Other seaweeds and aquatic plants and products thereof    seaweeds
## 287 Other seaweeds and aquatic plants and products thereof    seaweeds
## 288 Other seaweeds and aquatic plants and products thereof    seaweeds
## 289 Other seaweeds and aquatic plants and products thereof    seaweeds
## 290 Other seaweeds and aquatic plants and products thereof    seaweeds
## 291 Other seaweeds and aquatic plants and products thereof    seaweeds
## 292 Other seaweeds and aquatic plants and products thereof    seaweeds
## 293 Other seaweeds and aquatic plants and products thereof    seaweeds
## 294 Other seaweeds and aquatic plants and products thereof    seaweeds
## 295 Other seaweeds and aquatic plants and products thereof    seaweeds
## 296 Other seaweeds and aquatic plants and products thereof    seaweeds
## 297 Other seaweeds and aquatic plants and products thereof    seaweeds
## 298 Other seaweeds and aquatic plants and products thereof    seaweeds
## 299 Other seaweeds and aquatic plants and products thereof    seaweeds
## 300 Other seaweeds and aquatic plants and products thereof    seaweeds
## 301 Other seaweeds and aquatic plants and products thereof    seaweeds
## 302 Other seaweeds and aquatic plants and products thereof    seaweeds
## 303 Other seaweeds and aquatic plants and products thereof    seaweeds
## 304 Other seaweeds and aquatic plants and products thereof    seaweeds
##     year tonnes
## 1   1976     NA
## 2   1977     NA
## 3   1978     NA
## 4   1979     NA
## 5   1980     NA
## 6   1981     NA
## 7   1982     NA
## 8   1983     NA
## 9   1984     NA
## 10  1985     NA
## 11  1986     NA
## 12  1987     NA
## 13  1988     NA
## 14  1989     NA
## 15  1990     NA
## 16  1991     NA
## 17  1992     NA
## 18  1993     NA
## 19  1994     NA
## 20  1995     NA
## 21  1996     NA
## 22  1997     NA
## 23  1998     NA
## 24  1999     NA
## 25  2000     NA
## 26  2001     NA
## 27  2002     NA
## 28  2003     NA
## 29  2004     NA
## 30  2005    0.1
## 31  2006    0.0
## 32  2007    0.1
## 33  2008    1.0
## 34  2009    0.0
## 35  2010    0.0
## 36  2011    0.0
## 37  2012    7.0
## 38  2013    1.0
## 39  1976     NA
## 40  1977     NA
## 41  1978     NA
## 42  1979     NA
## 43  1980     NA
## 44  1981     NA
## 45  1982     NA
## 46  1983     NA
## 47  1984     NA
## 48  1985     NA
## 49  1986     NA
## 50  1987     NA
## 51  1988     NA
## 52  1989     NA
## 53  1990     NA
## 54  1991     NA
## 55  1992     NA
## 56  1993     NA
## 57  1994     NA
## 58  1995     NA
## 59  1996     NA
## 60  1997   37.0
## 61  1998    0.1
## 62  1999   19.0
## 63  2000    2.0
## 64  2001    0.0
## 65  2002    0.1
## 66  2003   21.0
## 67  2004    0.1
## 68  2005   15.0
## 69  2006   37.0
## 70  2007    0.1
## 71  2008    0.1
## 72  2009    0.0
## 73  2010    3.0
## 74  2011   10.0
## 75  2012    0.1
## 76  2013    0.0
## 77  1976    0.1
## 78  1977     NA
## 79  1978     NA
## 80  1979     NA
## 81  1980     NA
## 82  1981     NA
## 83  1982     NA
## 84  1983    0.1
## 85  1984    0.1
## 86  1985     NA
## 87  1986     NA
## 88  1987     NA
## 89  1988     NA
## 90  1989     NA
## 91  1990     NA
## 92  1991     NA
## 93  1992     NA
## 94  1993     NA
## 95  1994     NA
## 96  1995     NA
## 97  1996     NA
## 98  1997    0.1
## 99  1998    1.0
## 100 1999    0.1
## 101 2000    1.0
## 102 2001    0.1
## 103 2002    0.1
## 104 2003    0.1
## 105 2004    0.0
## 106 2005    0.0
## 107 2006    0.1
## 108 2007    0.0
## 109 2008    0.0
## 110 2009    0.0
## 111 2010    0.0
## 112 2011    0.1
## 113 2012    4.0
## 114 2013    0.1
## 115 1976     NA
## 116 1977     NA
## 117 1978     NA
## 118 1979     NA
## 119 1980     NA
## 120 1981     NA
## 121 1982     NA
## 122 1983     NA
## 123 1984     NA
## 124 1985     NA
## 125 1986     NA
## 126 1987     NA
## 127 1988     NA
## 128 1989     NA
## 129 1990     NA
## 130 1991     NA
## 131 1992     NA
## 132 1993     NA
## 133 1994     NA
## 134 1995     NA
## 135 1996     NA
## 136 1997     NA
## 137 1998     NA
## 138 1999    0.1
## 139 2000     NA
## 140 2001    0.1
## 141 2002     NA
## 142 2003    0.1
## 143 2004     NA
## 144 2005    0.1
## 145 2006    0.0
## 146 2007    0.0
## 147 2008    2.0
## 148 2009    0.1
## 149 2010    0.0
## 150 2011    0.0
## 151 2012    0.0
## 152 2013    0.0
## 153 1976     NA
## 154 1977     NA
## 155 1978     NA
## 156 1979     NA
## 157 1980     NA
## 158 1981     NA
## 159 1982     NA
## 160 1983     NA
## 161 1984     NA
## 162 1985     NA
## 163 1986     NA
## 164 1987     NA
## 165 1988     NA
## 166 1989     NA
## 167 1990     NA
## 168 1991     NA
## 169 1992     NA
## 170 1993     NA
## 171 1994     NA
## 172 1995     NA
## 173 1996     NA
## 174 1997     NA
## 175 1998     NA
## 176 1999     NA
## 177 2000     NA
## 178 2001     NA
## 179 2002     NA
## 180 2003     NA
## 181 2004    0.1
## 182 2005    0.0
## 183 2006    0.0
## 184 2007    0.0
## 185 2008    0.0
## 186 2009    0.0
## 187 2010    0.0
## 188 2011    0.0
## 189 2012    0.0
## 190 2013    0.0
## 191 1976     NA
## 192 1977     NA
## 193 1978     NA
## 194 1979    0.1
## 195 1980     NA
## 196 1981     NA
## 197 1982     NA
## 198 1983     NA
## 199 1984     NA
## 200 1985     NA
## 201 1986     NA
## 202 1987     NA
## 203 1988     NA
## 204 1989     NA
## 205 1990     NA
## 206 1991     NA
## 207 1992     NA
## 208 1993     NA
## 209 1994     NA
## 210 1995    0.1
## 211 1996     NA
## 212 1997     NA
## 213 1998     NA
## 214 1999     NA
## 215 2000     NA
## 216 2001     NA
## 217 2002   33.0
## 218 2003   36.0
## 219 2004   19.0
## 220 2005   48.0
## 221 2006   20.0
## 222 2007   62.0
## 223 2008   45.0
## 224 2009   40.0
## 225 2010   44.0
## 226 2011   45.0
## 227 2012     NA
## 228 2013     NA
## 229 1976     NA
## 230 1977     NA
## 231 1978     NA
## 232 1979     NA
## 233 1980     NA
## 234 1981     NA
## 235 1982     NA
## 236 1983     NA
## 237 1984     NA
## 238 1985     NA
## 239 1986     NA
## 240 1987     NA
## 241 1988     NA
## 242 1989     NA
## 243 1990     NA
## 244 1991     NA
## 245 1992     NA
## 246 1993     NA
## 247 1994     NA
## 248 1995     NA
## 249 1996     NA
## 250 1997     NA
## 251 1998     NA
## 252 1999     NA
## 253 2000     NA
## 254 2001     NA
## 255 2002     NA
## 256 2003     NA
## 257 2004     NA
## 258 2005     NA
## 259 2006     NA
## 260 2007     NA
## 261 2008     NA
## 262 2009     NA
## 263 2010     NA
## 264 2011     NA
## 265 2012    8.0
## 266 2013    0.0
## 267 1976     NA
## 268 1977     NA
## 269 1978     NA
## 270 1979     NA
## 271 1980     NA
## 272 1981     NA
## 273 1982     NA
## 274 1983     NA
## 275 1984     NA
## 276 1985     NA
## 277 1986     NA
## 278 1987     NA
## 279 1988     NA
## 280 1989     NA
## 281 1990     NA
## 282 1991     NA
## 283 1992     NA
## 284 1993     NA
## 285 1994     NA
## 286 1995     NA
## 287 1996     NA
## 288 1997     NA
## 289 1998     NA
## 290 1999     NA
## 291 2000     NA
## 292 2001     NA
## 293 2002     NA
## 294 2003    0.1
## 295 2004    0.0
## 296 2005    0.0
## 297 2006    0.0
## 298 2007    0.1
## 299 2008    0.0
## 300 2009    0.0
## 301 2010    0.0
## 302 2011    0.0
## 303 2012    0.0
## 304 2013    0.0
filter(old, rgn_id==115) %>%
  arrange(commodity, year)
##     rgn_id                                              commodity
## 1      115                                          Agar agar nei
## 2      115                                          Agar agar nei
## 3      115                                          Agar agar nei
## 4      115                                          Agar agar nei
## 5      115                                          Agar agar nei
## 6      115                                          Agar agar nei
## 7      115                                          Agar agar nei
## 8      115                                          Agar agar nei
## 9      115                                          Agar agar nei
## 10     115                                          Agar agar nei
## 11     115                                          Agar agar nei
## 12     115                                          Agar agar nei
## 13     115                                          Agar agar nei
## 14     115                                          Agar agar nei
## 15     115                                          Agar agar nei
## 16     115                                          Agar agar nei
## 17     115                                          Agar agar nei
## 18     115                                          Agar agar nei
## 19     115                                          Agar agar nei
## 20     115                                          Agar agar nei
## 21     115                                          Agar agar nei
## 22     115                                          Agar agar nei
## 23     115                                          Agar agar nei
## 24     115                                          Agar agar nei
## 25     115                                          Agar agar nei
## 26     115                                          Agar agar nei
## 27     115                                          Agar agar nei
## 28     115                                          Agar agar nei
## 29     115                                          Agar agar nei
## 30     115                                          Agar agar nei
## 31     115                                          Agar agar nei
## 32     115                                          Agar agar nei
## 33     115                                          Agar agar nei
## 34     115                                          Agar agar nei
## 35     115                                          Agar agar nei
## 36     115                                          Agar agar nei
## 37     115                                     Coral and the like
## 38     115                                     Coral and the like
## 39     115                                     Coral and the like
## 40     115                                     Coral and the like
## 41     115                                     Coral and the like
## 42     115                                     Coral and the like
## 43     115                                     Coral and the like
## 44     115                                     Coral and the like
## 45     115                                     Coral and the like
## 46     115                                     Coral and the like
## 47     115                                     Coral and the like
## 48     115                                     Coral and the like
## 49     115                                     Coral and the like
## 50     115                                     Coral and the like
## 51     115                                     Coral and the like
## 52     115                                     Coral and the like
## 53     115                                     Coral and the like
## 54     115                                     Coral and the like
## 55     115                                     Coral and the like
## 56     115                                     Coral and the like
## 57     115                                     Coral and the like
## 58     115                                     Coral and the like
## 59     115                                     Coral and the like
## 60     115                                     Coral and the like
## 61     115                                     Coral and the like
## 62     115                                     Coral and the like
## 63     115                                     Coral and the like
## 64     115                                     Coral and the like
## 65     115                                     Coral and the like
## 66     115                                     Coral and the like
## 67     115                                     Coral and the like
## 68     115                                     Coral and the like
## 69     115                                     Coral and the like
## 70     115                                     Coral and the like
## 71     115                                     Coral and the like
## 72     115                                     Coral and the like
## 73     115                                    Fish body oils, nei
## 74     115                                    Fish body oils, nei
## 75     115                                    Fish body oils, nei
## 76     115                                    Fish body oils, nei
## 77     115                                    Fish body oils, nei
## 78     115                                    Fish body oils, nei
## 79     115                                    Fish body oils, nei
## 80     115                                    Fish body oils, nei
## 81     115                                    Fish body oils, nei
## 82     115                                    Fish body oils, nei
## 83     115                                    Fish body oils, nei
## 84     115                                    Fish body oils, nei
## 85     115                                    Fish body oils, nei
## 86     115                                    Fish body oils, nei
## 87     115                                    Fish body oils, nei
## 88     115                                    Fish body oils, nei
## 89     115                                    Fish body oils, nei
## 90     115                                    Fish body oils, nei
## 91     115                                    Fish body oils, nei
## 92     115                                    Fish body oils, nei
## 93     115                                    Fish body oils, nei
## 94     115                                    Fish body oils, nei
## 95     115                                    Fish body oils, nei
## 96     115                                    Fish body oils, nei
## 97     115                                    Fish body oils, nei
## 98     115                                    Fish body oils, nei
## 99     115                                    Fish body oils, nei
## 100    115                                    Fish body oils, nei
## 101    115                                    Fish body oils, nei
## 102    115                                    Fish body oils, nei
## 103    115                                    Fish body oils, nei
## 104    115                                    Fish body oils, nei
## 105    115                                    Fish body oils, nei
## 106    115                                    Fish body oils, nei
## 107    115                                    Fish body oils, nei
## 108    115                                    Fish body oils, nei
## 109    115                                   Fish liver oils, nei
## 110    115                                   Fish liver oils, nei
## 111    115                                   Fish liver oils, nei
## 112    115                                   Fish liver oils, nei
## 113    115                                   Fish liver oils, nei
## 114    115                                   Fish liver oils, nei
## 115    115                                   Fish liver oils, nei
## 116    115                                   Fish liver oils, nei
## 117    115                                   Fish liver oils, nei
## 118    115                                   Fish liver oils, nei
## 119    115                                   Fish liver oils, nei
## 120    115                                   Fish liver oils, nei
## 121    115                                   Fish liver oils, nei
## 122    115                                   Fish liver oils, nei
## 123    115                                   Fish liver oils, nei
## 124    115                                   Fish liver oils, nei
## 125    115                                   Fish liver oils, nei
## 126    115                                   Fish liver oils, nei
## 127    115                                   Fish liver oils, nei
## 128    115                                   Fish liver oils, nei
## 129    115                                   Fish liver oils, nei
## 130    115                                   Fish liver oils, nei
## 131    115                                   Fish liver oils, nei
## 132    115                                   Fish liver oils, nei
## 133    115                                   Fish liver oils, nei
## 134    115                                   Fish liver oils, nei
## 135    115                                   Fish liver oils, nei
## 136    115                                   Fish liver oils, nei
## 137    115                                   Fish liver oils, nei
## 138    115                                   Fish liver oils, nei
## 139    115                                   Fish liver oils, nei
## 140    115                                   Fish liver oils, nei
## 141    115                                   Fish liver oils, nei
## 142    115                                   Fish liver oils, nei
## 143    115                                   Fish liver oils, nei
## 144    115                                   Fish liver oils, nei
## 145    115                                    Natural sponges nei
## 146    115                                    Natural sponges nei
## 147    115                                    Natural sponges nei
## 148    115                                    Natural sponges nei
## 149    115                                    Natural sponges nei
## 150    115                                    Natural sponges nei
## 151    115                                    Natural sponges nei
## 152    115                                    Natural sponges nei
## 153    115                                    Natural sponges nei
## 154    115                                    Natural sponges nei
## 155    115                                    Natural sponges nei
## 156    115                                    Natural sponges nei
## 157    115                                    Natural sponges nei
## 158    115                                    Natural sponges nei
## 159    115                                    Natural sponges nei
## 160    115                                    Natural sponges nei
## 161    115                                    Natural sponges nei
## 162    115                                    Natural sponges nei
## 163    115                                    Natural sponges nei
## 164    115                                    Natural sponges nei
## 165    115                                    Natural sponges nei
## 166    115                                    Natural sponges nei
## 167    115                                    Natural sponges nei
## 168    115                                    Natural sponges nei
## 169    115                                    Natural sponges nei
## 170    115                                    Natural sponges nei
## 171    115                                    Natural sponges nei
## 172    115                                    Natural sponges nei
## 173    115                                    Natural sponges nei
## 174    115                                    Natural sponges nei
## 175    115                                    Natural sponges nei
## 176    115                                    Natural sponges nei
## 177    115                                    Natural sponges nei
## 178    115                                    Natural sponges nei
## 179    115                                    Natural sponges nei
## 180    115                                    Natural sponges nei
## 181    115                                    Ornamental fish nei
## 182    115                                    Ornamental fish nei
## 183    115                                    Ornamental fish nei
## 184    115                                    Ornamental fish nei
## 185    115                                    Ornamental fish nei
## 186    115                                    Ornamental fish nei
## 187    115                                    Ornamental fish nei
## 188    115                                    Ornamental fish nei
## 189    115                                    Ornamental fish nei
## 190    115                                    Ornamental fish nei
## 191    115                                    Ornamental fish nei
## 192    115                                    Ornamental fish nei
## 193    115                                    Ornamental fish nei
## 194    115                                    Ornamental fish nei
## 195    115                                    Ornamental fish nei
## 196    115                                    Ornamental fish nei
## 197    115                                    Ornamental fish nei
## 198    115                                    Ornamental fish nei
## 199    115                                    Ornamental fish nei
## 200    115                                    Ornamental fish nei
## 201    115                                    Ornamental fish nei
## 202    115                                    Ornamental fish nei
## 203    115                                    Ornamental fish nei
## 204    115                                    Ornamental fish nei
## 205    115                                    Ornamental fish nei
## 206    115                                    Ornamental fish nei
## 207    115                                    Ornamental fish nei
## 208    115                                    Ornamental fish nei
## 209    115                                    Ornamental fish nei
## 210    115                                    Ornamental fish nei
## 211    115                                    Ornamental fish nei
## 212    115                                    Ornamental fish nei
## 213    115                                    Ornamental fish nei
## 214    115                                    Ornamental fish nei
## 215    115                                    Ornamental fish nei
## 216    115                                    Ornamental fish nei
## 217    115 Other seaweeds and aquatic plants and products thereof
## 218    115 Other seaweeds and aquatic plants and products thereof
## 219    115 Other seaweeds and aquatic plants and products thereof
## 220    115 Other seaweeds and aquatic plants and products thereof
## 221    115 Other seaweeds and aquatic plants and products thereof
## 222    115 Other seaweeds and aquatic plants and products thereof
## 223    115 Other seaweeds and aquatic plants and products thereof
## 224    115 Other seaweeds and aquatic plants and products thereof
## 225    115 Other seaweeds and aquatic plants and products thereof
## 226    115 Other seaweeds and aquatic plants and products thereof
## 227    115 Other seaweeds and aquatic plants and products thereof
## 228    115 Other seaweeds and aquatic plants and products thereof
## 229    115 Other seaweeds and aquatic plants and products thereof
## 230    115 Other seaweeds and aquatic plants and products thereof
## 231    115 Other seaweeds and aquatic plants and products thereof
## 232    115 Other seaweeds and aquatic plants and products thereof
## 233    115 Other seaweeds and aquatic plants and products thereof
## 234    115 Other seaweeds and aquatic plants and products thereof
## 235    115 Other seaweeds and aquatic plants and products thereof
## 236    115 Other seaweeds and aquatic plants and products thereof
## 237    115 Other seaweeds and aquatic plants and products thereof
## 238    115 Other seaweeds and aquatic plants and products thereof
## 239    115 Other seaweeds and aquatic plants and products thereof
## 240    115 Other seaweeds and aquatic plants and products thereof
## 241    115 Other seaweeds and aquatic plants and products thereof
## 242    115 Other seaweeds and aquatic plants and products thereof
## 243    115 Other seaweeds and aquatic plants and products thereof
## 244    115 Other seaweeds and aquatic plants and products thereof
## 245    115 Other seaweeds and aquatic plants and products thereof
## 246    115 Other seaweeds and aquatic plants and products thereof
## 247    115 Other seaweeds and aquatic plants and products thereof
## 248    115 Other seaweeds and aquatic plants and products thereof
## 249    115 Other seaweeds and aquatic plants and products thereof
## 250    115 Other seaweeds and aquatic plants and products thereof
## 251    115 Other seaweeds and aquatic plants and products thereof
## 252    115 Other seaweeds and aquatic plants and products thereof
##         product year tonnes           rgn_name
## 1      seaweeds 1976     NA Dominican Republic
## 2      seaweeds 1977     NA Dominican Republic
## 3      seaweeds 1978     NA Dominican Republic
## 4      seaweeds 1979     NA Dominican Republic
## 5      seaweeds 1980     NA Dominican Republic
## 6      seaweeds 1981     NA Dominican Republic
## 7      seaweeds 1982     NA Dominican Republic
## 8      seaweeds 1983     NA Dominican Republic
## 9      seaweeds 1984     NA Dominican Republic
## 10     seaweeds 1985     NA Dominican Republic
## 11     seaweeds 1986     NA Dominican Republic
## 12     seaweeds 1987     NA Dominican Republic
## 13     seaweeds 1988     NA Dominican Republic
## 14     seaweeds 1989     NA Dominican Republic
## 15     seaweeds 1990     NA Dominican Republic
## 16     seaweeds 1991     NA Dominican Republic
## 17     seaweeds 1992     NA Dominican Republic
## 18     seaweeds 1993     NA Dominican Republic
## 19     seaweeds 1994     NA Dominican Republic
## 20     seaweeds 1995     NA Dominican Republic
## 21     seaweeds 1996     NA Dominican Republic
## 22     seaweeds 1997     NA Dominican Republic
## 23     seaweeds 1998     NA Dominican Republic
## 24     seaweeds 1999     NA Dominican Republic
## 25     seaweeds 2000     NA Dominican Republic
## 26     seaweeds 2001     NA Dominican Republic
## 27     seaweeds 2002     NA Dominican Republic
## 28     seaweeds 2003     NA Dominican Republic
## 29     seaweeds 2004     NA Dominican Republic
## 30     seaweeds 2005   25.0 Dominican Republic
## 31     seaweeds 2006    0.0 Dominican Republic
## 32     seaweeds 2007    0.1 Dominican Republic
## 33     seaweeds 2008    1.0 Dominican Republic
## 34     seaweeds 2009    0.0 Dominican Republic
## 35     seaweeds 2010    0.0 Dominican Republic
## 36     seaweeds 2011    0.0 Dominican Republic
## 37       corals 1976     NA Dominican Republic
## 38       corals 1977     NA Dominican Republic
## 39       corals 1978     NA Dominican Republic
## 40       corals 1979     NA Dominican Republic
## 41       corals 1980     NA Dominican Republic
## 42       corals 1981     NA Dominican Republic
## 43       corals 1982     NA Dominican Republic
## 44       corals 1983     NA Dominican Republic
## 45       corals 1984     NA Dominican Republic
## 46       corals 1985     NA Dominican Republic
## 47       corals 1986     NA Dominican Republic
## 48       corals 1987     NA Dominican Republic
## 49       corals 1988     NA Dominican Republic
## 50       corals 1989     NA Dominican Republic
## 51       corals 1990     NA Dominican Republic
## 52       corals 1991     NA Dominican Republic
## 53       corals 1992     NA Dominican Republic
## 54       corals 1993     NA Dominican Republic
## 55       corals 1994     NA Dominican Republic
## 56       corals 1995     NA Dominican Republic
## 57       corals 1996     NA Dominican Republic
## 58       corals 1997   37.0 Dominican Republic
## 59       corals 1998    0.1 Dominican Republic
## 60       corals 1999   19.0 Dominican Republic
## 61       corals 2000    2.0 Dominican Republic
## 62       corals 2001    0.0 Dominican Republic
## 63       corals 2002    0.1 Dominican Republic
## 64       corals 2003   21.0 Dominican Republic
## 65       corals 2004    0.1 Dominican Republic
## 66       corals 2005   15.0 Dominican Republic
## 67       corals 2006   37.0 Dominican Republic
## 68       corals 2007    0.1 Dominican Republic
## 69       corals 2008    0.1 Dominican Republic
## 70       corals 2009    0.0 Dominican Republic
## 71       corals 2010    3.0 Dominican Republic
## 72       corals 2011   10.0 Dominican Republic
## 73     fish_oil 1976    0.1 Dominican Republic
## 74     fish_oil 1977     NA Dominican Republic
## 75     fish_oil 1978     NA Dominican Republic
## 76     fish_oil 1979     NA Dominican Republic
## 77     fish_oil 1980     NA Dominican Republic
## 78     fish_oil 1981     NA Dominican Republic
## 79     fish_oil 1982     NA Dominican Republic
## 80     fish_oil 1983    0.1 Dominican Republic
## 81     fish_oil 1984    0.1 Dominican Republic
## 82     fish_oil 1985     NA Dominican Republic
## 83     fish_oil 1986     NA Dominican Republic
## 84     fish_oil 1987     NA Dominican Republic
## 85     fish_oil 1988     NA Dominican Republic
## 86     fish_oil 1989     NA Dominican Republic
## 87     fish_oil 1990     NA Dominican Republic
## 88     fish_oil 1991     NA Dominican Republic
## 89     fish_oil 1992     NA Dominican Republic
## 90     fish_oil 1993     NA Dominican Republic
## 91     fish_oil 1994     NA Dominican Republic
## 92     fish_oil 1995     NA Dominican Republic
## 93     fish_oil 1996     NA Dominican Republic
## 94     fish_oil 1997    0.1 Dominican Republic
## 95     fish_oil 1998    1.0 Dominican Republic
## 96     fish_oil 1999    0.1 Dominican Republic
## 97     fish_oil 2000    1.0 Dominican Republic
## 98     fish_oil 2001    0.1 Dominican Republic
## 99     fish_oil 2002    0.1 Dominican Republic
## 100    fish_oil 2003    0.1 Dominican Republic
## 101    fish_oil 2004    0.0 Dominican Republic
## 102    fish_oil 2005    0.0 Dominican Republic
## 103    fish_oil 2006    0.1 Dominican Republic
## 104    fish_oil 2007    0.0 Dominican Republic
## 105    fish_oil 2008    0.0 Dominican Republic
## 106    fish_oil 2009    0.0 Dominican Republic
## 107    fish_oil 2010    0.0 Dominican Republic
## 108    fish_oil 2011    0.1 Dominican Republic
## 109    fish_oil 1976     NA Dominican Republic
## 110    fish_oil 1977     NA Dominican Republic
## 111    fish_oil 1978     NA Dominican Republic
## 112    fish_oil 1979     NA Dominican Republic
## 113    fish_oil 1980     NA Dominican Republic
## 114    fish_oil 1981     NA Dominican Republic
## 115    fish_oil 1982     NA Dominican Republic
## 116    fish_oil 1983     NA Dominican Republic
## 117    fish_oil 1984     NA Dominican Republic
## 118    fish_oil 1985     NA Dominican Republic
## 119    fish_oil 1986     NA Dominican Republic
## 120    fish_oil 1987     NA Dominican Republic
## 121    fish_oil 1988     NA Dominican Republic
## 122    fish_oil 1989     NA Dominican Republic
## 123    fish_oil 1990     NA Dominican Republic
## 124    fish_oil 1991     NA Dominican Republic
## 125    fish_oil 1992     NA Dominican Republic
## 126    fish_oil 1993     NA Dominican Republic
## 127    fish_oil 1994     NA Dominican Republic
## 128    fish_oil 1995     NA Dominican Republic
## 129    fish_oil 1996     NA Dominican Republic
## 130    fish_oil 1997     NA Dominican Republic
## 131    fish_oil 1998     NA Dominican Republic
## 132    fish_oil 1999    0.1 Dominican Republic
## 133    fish_oil 2000     NA Dominican Republic
## 134    fish_oil 2001    0.1 Dominican Republic
## 135    fish_oil 2002     NA Dominican Republic
## 136    fish_oil 2003    0.1 Dominican Republic
## 137    fish_oil 2004     NA Dominican Republic
## 138    fish_oil 2005    4.0 Dominican Republic
## 139    fish_oil 2006    0.0 Dominican Republic
## 140    fish_oil 2007    0.0 Dominican Republic
## 141    fish_oil 2008    2.0 Dominican Republic
## 142    fish_oil 2009    0.1 Dominican Republic
## 143    fish_oil 2010    0.0 Dominican Republic
## 144    fish_oil 2011    0.0 Dominican Republic
## 145     sponges 1976     NA Dominican Republic
## 146     sponges 1977     NA Dominican Republic
## 147     sponges 1978     NA Dominican Republic
## 148     sponges 1979     NA Dominican Republic
## 149     sponges 1980     NA Dominican Republic
## 150     sponges 1981     NA Dominican Republic
## 151     sponges 1982     NA Dominican Republic
## 152     sponges 1983     NA Dominican Republic
## 153     sponges 1984     NA Dominican Republic
## 154     sponges 1985     NA Dominican Republic
## 155     sponges 1986     NA Dominican Republic
## 156     sponges 1987     NA Dominican Republic
## 157     sponges 1988     NA Dominican Republic
## 158     sponges 1989     NA Dominican Republic
## 159     sponges 1990     NA Dominican Republic
## 160     sponges 1991     NA Dominican Republic
## 161     sponges 1992     NA Dominican Republic
## 162     sponges 1993     NA Dominican Republic
## 163     sponges 1994     NA Dominican Republic
## 164     sponges 1995     NA Dominican Republic
## 165     sponges 1996     NA Dominican Republic
## 166     sponges 1997     NA Dominican Republic
## 167     sponges 1998     NA Dominican Republic
## 168     sponges 1999     NA Dominican Republic
## 169     sponges 2000     NA Dominican Republic
## 170     sponges 2001     NA Dominican Republic
## 171     sponges 2002     NA Dominican Republic
## 172     sponges 2003     NA Dominican Republic
## 173     sponges 2004    0.1 Dominican Republic
## 174     sponges 2005    0.0 Dominican Republic
## 175     sponges 2006    0.0 Dominican Republic
## 176     sponges 2007    0.0 Dominican Republic
## 177     sponges 2008    0.0 Dominican Republic
## 178     sponges 2009    0.0 Dominican Republic
## 179     sponges 2010    0.0 Dominican Republic
## 180     sponges 2011    0.0 Dominican Republic
## 181 ornamentals 1976     NA Dominican Republic
## 182 ornamentals 1977     NA Dominican Republic
## 183 ornamentals 1978     NA Dominican Republic
## 184 ornamentals 1979    0.1 Dominican Republic
## 185 ornamentals 1980     NA Dominican Republic
## 186 ornamentals 1981     NA Dominican Republic
## 187 ornamentals 1982     NA Dominican Republic
## 188 ornamentals 1983     NA Dominican Republic
## 189 ornamentals 1984     NA Dominican Republic
## 190 ornamentals 1985     NA Dominican Republic
## 191 ornamentals 1986     NA Dominican Republic
## 192 ornamentals 1987     NA Dominican Republic
## 193 ornamentals 1988     NA Dominican Republic
## 194 ornamentals 1989     NA Dominican Republic
## 195 ornamentals 1990     NA Dominican Republic
## 196 ornamentals 1991     NA Dominican Republic
## 197 ornamentals 1992     NA Dominican Republic
## 198 ornamentals 1993     NA Dominican Republic
## 199 ornamentals 1994     NA Dominican Republic
## 200 ornamentals 1995    0.1 Dominican Republic
## 201 ornamentals 1996     NA Dominican Republic
## 202 ornamentals 1997     NA Dominican Republic
## 203 ornamentals 1998     NA Dominican Republic
## 204 ornamentals 1999     NA Dominican Republic
## 205 ornamentals 2000     NA Dominican Republic
## 206 ornamentals 2001     NA Dominican Republic
## 207 ornamentals 2002   33.0 Dominican Republic
## 208 ornamentals 2003   36.0 Dominican Republic
## 209 ornamentals 2004   19.0 Dominican Republic
## 210 ornamentals 2005   48.0 Dominican Republic
## 211 ornamentals 2006   20.0 Dominican Republic
## 212 ornamentals 2007   62.0 Dominican Republic
## 213 ornamentals 2008   45.0 Dominican Republic
## 214 ornamentals 2009   40.0 Dominican Republic
## 215 ornamentals 2010   44.0 Dominican Republic
## 216 ornamentals 2011   45.0 Dominican Republic
## 217    seaweeds 1976     NA Dominican Republic
## 218    seaweeds 1977     NA Dominican Republic
## 219    seaweeds 1978     NA Dominican Republic
## 220    seaweeds 1979     NA Dominican Republic
## 221    seaweeds 1980     NA Dominican Republic
## 222    seaweeds 1981     NA Dominican Republic
## 223    seaweeds 1982     NA Dominican Republic
## 224    seaweeds 1983     NA Dominican Republic
## 225    seaweeds 1984     NA Dominican Republic
## 226    seaweeds 1985     NA Dominican Republic
## 227    seaweeds 1986     NA Dominican Republic
## 228    seaweeds 1987     NA Dominican Republic
## 229    seaweeds 1988     NA Dominican Republic
## 230    seaweeds 1989     NA Dominican Republic
## 231    seaweeds 1990     NA Dominican Republic
## 232    seaweeds 1991     NA Dominican Republic
## 233    seaweeds 1992     NA Dominican Republic
## 234    seaweeds 1993     NA Dominican Republic
## 235    seaweeds 1994     NA Dominican Republic
## 236    seaweeds 1995     NA Dominican Republic
## 237    seaweeds 1996     NA Dominican Republic
## 238    seaweeds 1997     NA Dominican Republic
## 239    seaweeds 1998     NA Dominican Republic
## 240    seaweeds 1999     NA Dominican Republic
## 241    seaweeds 2000     NA Dominican Republic
## 242    seaweeds 2001     NA Dominican Republic
## 243    seaweeds 2002     NA Dominican Republic
## 244    seaweeds 2003    0.1 Dominican Republic
## 245    seaweeds 2004    0.0 Dominican Republic
## 246    seaweeds 2005    0.0 Dominican Republic
## 247    seaweeds 2006    0.0 Dominican Republic
## 248    seaweeds 2007    0.1 Dominican Republic
## 249    seaweeds 2008    0.0 Dominican Republic
## 250    seaweeds 2009    0.0 Dominican Republic
## 251    seaweeds 2010    0.0 Dominican Republic
## 252    seaweeds 2011    0.0 Dominican Republic
new <- read.csv("int/usd.csv")
filter(new, rgn_id==100) %>%
  arrange(commodity, year)
##     rgn_id            rgn_name            commodity     product year usd
## 1      100 Republique du Congo  Fish body oils, nei    fish_oil 1976  NA
## 2      100 Republique du Congo  Fish body oils, nei    fish_oil 1977  NA
## 3      100 Republique du Congo  Fish body oils, nei    fish_oil 1978  NA
## 4      100 Republique du Congo  Fish body oils, nei    fish_oil 1979  NA
## 5      100 Republique du Congo  Fish body oils, nei    fish_oil 1980  NA
## 6      100 Republique du Congo  Fish body oils, nei    fish_oil 1981  NA
## 7      100 Republique du Congo  Fish body oils, nei    fish_oil 1982  37
## 8      100 Republique du Congo  Fish body oils, nei    fish_oil 1983   0
## 9      100 Republique du Congo  Fish body oils, nei    fish_oil 1984  42
## 10     100 Republique du Congo  Fish body oils, nei    fish_oil 1985   0
## 11     100 Republique du Congo  Fish body oils, nei    fish_oil 1986   0
## 12     100 Republique du Congo  Fish body oils, nei    fish_oil 1987   0
## 13     100 Republique du Congo  Fish body oils, nei    fish_oil 1988   0
## 14     100 Republique du Congo  Fish body oils, nei    fish_oil 1989   0
## 15     100 Republique du Congo  Fish body oils, nei    fish_oil 1990   0
## 16     100 Republique du Congo  Fish body oils, nei    fish_oil 1991   0
## 17     100 Republique du Congo  Fish body oils, nei    fish_oil 1992   0
## 18     100 Republique du Congo  Fish body oils, nei    fish_oil 1993   0
## 19     100 Republique du Congo  Fish body oils, nei    fish_oil 1994   0
## 20     100 Republique du Congo  Fish body oils, nei    fish_oil 1995   0
## 21     100 Republique du Congo  Fish body oils, nei    fish_oil 1996   0
## 22     100 Republique du Congo  Fish body oils, nei    fish_oil 1997   0
## 23     100 Republique du Congo  Fish body oils, nei    fish_oil 1998   0
## 24     100 Republique du Congo  Fish body oils, nei    fish_oil 1999   0
## 25     100 Republique du Congo  Fish body oils, nei    fish_oil 2000   0
## 26     100 Republique du Congo  Fish body oils, nei    fish_oil 2001   0
## 27     100 Republique du Congo  Fish body oils, nei    fish_oil 2002   0
## 28     100 Republique du Congo  Fish body oils, nei    fish_oil 2003   0
## 29     100 Republique du Congo  Fish body oils, nei    fish_oil 2004   0
## 30     100 Republique du Congo  Fish body oils, nei    fish_oil 2005   0
## 31     100 Republique du Congo  Fish body oils, nei    fish_oil 2006   0
## 32     100 Republique du Congo  Fish body oils, nei    fish_oil 2007   0
## 33     100 Republique du Congo  Fish body oils, nei    fish_oil 2008   0
## 34     100 Republique du Congo  Fish body oils, nei    fish_oil 2009   0
## 35     100 Republique du Congo  Fish body oils, nei    fish_oil 2010   0
## 36     100 Republique du Congo  Fish body oils, nei    fish_oil 2011   0
## 37     100 Republique du Congo  Fish body oils, nei    fish_oil 2012   0
## 38     100 Republique du Congo  Fish body oils, nei    fish_oil 2013   0
## 39     100 Republique du Congo Fish liver oils, nei    fish_oil 1976  NA
## 40     100 Republique du Congo Fish liver oils, nei    fish_oil 1977  NA
## 41     100 Republique du Congo Fish liver oils, nei    fish_oil 1978  NA
## 42     100 Republique du Congo Fish liver oils, nei    fish_oil 1979  NA
## 43     100 Republique du Congo Fish liver oils, nei    fish_oil 1980  NA
## 44     100 Republique du Congo Fish liver oils, nei    fish_oil 1981  NA
## 45     100 Republique du Congo Fish liver oils, nei    fish_oil 1982  NA
## 46     100 Republique du Congo Fish liver oils, nei    fish_oil 1983  NA
## 47     100 Republique du Congo Fish liver oils, nei    fish_oil 1984  NA
## 48     100 Republique du Congo Fish liver oils, nei    fish_oil 1985  NA
## 49     100 Republique du Congo Fish liver oils, nei    fish_oil 1986  NA
## 50     100 Republique du Congo Fish liver oils, nei    fish_oil 1987  NA
## 51     100 Republique du Congo Fish liver oils, nei    fish_oil 1988  NA
## 52     100 Republique du Congo Fish liver oils, nei    fish_oil 1989  NA
## 53     100 Republique du Congo Fish liver oils, nei    fish_oil 1990  NA
## 54     100 Republique du Congo Fish liver oils, nei    fish_oil 1991  NA
## 55     100 Republique du Congo Fish liver oils, nei    fish_oil 1992  NA
## 56     100 Republique du Congo Fish liver oils, nei    fish_oil 1993  NA
## 57     100 Republique du Congo Fish liver oils, nei    fish_oil 1994  NA
## 58     100 Republique du Congo Fish liver oils, nei    fish_oil 1995   1
## 59     100 Republique du Congo Fish liver oils, nei    fish_oil 1996   0
## 60     100 Republique du Congo Fish liver oils, nei    fish_oil 1997   0
## 61     100 Republique du Congo Fish liver oils, nei    fish_oil 1998   0
## 62     100 Republique du Congo Fish liver oils, nei    fish_oil 1999   0
## 63     100 Republique du Congo Fish liver oils, nei    fish_oil 2000   0
## 64     100 Republique du Congo Fish liver oils, nei    fish_oil 2001   0
## 65     100 Republique du Congo Fish liver oils, nei    fish_oil 2002   0
## 66     100 Republique du Congo Fish liver oils, nei    fish_oil 2003   0
## 67     100 Republique du Congo Fish liver oils, nei    fish_oil 2004   0
## 68     100 Republique du Congo Fish liver oils, nei    fish_oil 2005   0
## 69     100 Republique du Congo Fish liver oils, nei    fish_oil 2006   0
## 70     100 Republique du Congo Fish liver oils, nei    fish_oil 2007   0
## 71     100 Republique du Congo Fish liver oils, nei    fish_oil 2008   0
## 72     100 Republique du Congo Fish liver oils, nei    fish_oil 2009   0
## 73     100 Republique du Congo Fish liver oils, nei    fish_oil 2010   0
## 74     100 Republique du Congo Fish liver oils, nei    fish_oil 2011   0
## 75     100 Republique du Congo Fish liver oils, nei    fish_oil 2012   0
## 76     100 Republique du Congo Fish liver oils, nei    fish_oil 2013   0
## 77     100 Republique du Congo  Ornamental fish nei ornamentals 1976  NA
## 78     100 Republique du Congo  Ornamental fish nei ornamentals 1977  NA
## 79     100 Republique du Congo  Ornamental fish nei ornamentals 1978  NA
## 80     100 Republique du Congo  Ornamental fish nei ornamentals 1979  NA
## 81     100 Republique du Congo  Ornamental fish nei ornamentals 1980  NA
## 82     100 Republique du Congo  Ornamental fish nei ornamentals 1981  NA
## 83     100 Republique du Congo  Ornamental fish nei ornamentals 1982  NA
## 84     100 Republique du Congo  Ornamental fish nei ornamentals 1983  NA
## 85     100 Republique du Congo  Ornamental fish nei ornamentals 1984  NA
## 86     100 Republique du Congo  Ornamental fish nei ornamentals 1985  NA
## 87     100 Republique du Congo  Ornamental fish nei ornamentals 1986  NA
## 88     100 Republique du Congo  Ornamental fish nei ornamentals 1987  NA
## 89     100 Republique du Congo  Ornamental fish nei ornamentals 1988  NA
## 90     100 Republique du Congo  Ornamental fish nei ornamentals 1989  NA
## 91     100 Republique du Congo  Ornamental fish nei ornamentals 1990  NA
## 92     100 Republique du Congo  Ornamental fish nei ornamentals 1991  NA
## 93     100 Republique du Congo  Ornamental fish nei ornamentals 1992  NA
## 94     100 Republique du Congo  Ornamental fish nei ornamentals 1993  NA
## 95     100 Republique du Congo  Ornamental fish nei ornamentals 1994  NA
## 96     100 Republique du Congo  Ornamental fish nei ornamentals 1995   3
## 97     100 Republique du Congo  Ornamental fish nei ornamentals 1996  85
## 98     100 Republique du Congo  Ornamental fish nei ornamentals 1997  77
## 99     100 Republique du Congo  Ornamental fish nei ornamentals 1998  77
## 100    100 Republique du Congo  Ornamental fish nei ornamentals 1999  82
## 101    100 Republique du Congo  Ornamental fish nei ornamentals 2000  96
## 102    100 Republique du Congo  Ornamental fish nei ornamentals 2001 132
## 103    100 Republique du Congo  Ornamental fish nei ornamentals 2002 187
## 104    100 Republique du Congo  Ornamental fish nei ornamentals 2003 180
## 105    100 Republique du Congo  Ornamental fish nei ornamentals 2004  83
## 106    100 Republique du Congo  Ornamental fish nei ornamentals 2005   0
## 107    100 Republique du Congo  Ornamental fish nei ornamentals 2006 131
## 108    100 Republique du Congo  Ornamental fish nei ornamentals 2007   0
## 109    100 Republique du Congo  Ornamental fish nei ornamentals 2008   0
## 110    100 Republique du Congo  Ornamental fish nei ornamentals 2009   0
## 111    100 Republique du Congo  Ornamental fish nei ornamentals 2010   0
## 112    100 Republique du Congo  Ornamental fish nei ornamentals 2011   0
## 113    100 Republique du Congo  Ornamental fish nei ornamentals 2012   0
## 114    100 Republique du Congo  Ornamental fish nei ornamentals 2013   0
old <- read.csv("../v2014_test/intermediate/usd.csv")
filter(old, rgn_id==100) %>%
  arrange(commodity, year)
##     rgn_id            commodity     product year usd            rgn_name
## 1      100  Fish body oils, nei    fish_oil 1976  NA Republique du Congo
## 2      100  Fish body oils, nei    fish_oil 1977  NA Republique du Congo
## 3      100  Fish body oils, nei    fish_oil 1978  NA Republique du Congo
## 4      100  Fish body oils, nei    fish_oil 1979  NA Republique du Congo
## 5      100  Fish body oils, nei    fish_oil 1980  NA Republique du Congo
## 6      100  Fish body oils, nei    fish_oil 1981  NA Republique du Congo
## 7      100  Fish body oils, nei    fish_oil 1982  37 Republique du Congo
## 8      100  Fish body oils, nei    fish_oil 1983   0 Republique du Congo
## 9      100  Fish body oils, nei    fish_oil 1984  42 Republique du Congo
## 10     100  Fish body oils, nei    fish_oil 1985   0 Republique du Congo
## 11     100  Fish body oils, nei    fish_oil 1986   0 Republique du Congo
## 12     100  Fish body oils, nei    fish_oil 1987   0 Republique du Congo
## 13     100  Fish body oils, nei    fish_oil 1988   0 Republique du Congo
## 14     100  Fish body oils, nei    fish_oil 1989   0 Republique du Congo
## 15     100  Fish body oils, nei    fish_oil 1990   0 Republique du Congo
## 16     100  Fish body oils, nei    fish_oil 1991   0 Republique du Congo
## 17     100  Fish body oils, nei    fish_oil 1992   0 Republique du Congo
## 18     100  Fish body oils, nei    fish_oil 1993   0 Republique du Congo
## 19     100  Fish body oils, nei    fish_oil 1994   0 Republique du Congo
## 20     100  Fish body oils, nei    fish_oil 1995   0 Republique du Congo
## 21     100  Fish body oils, nei    fish_oil 1996   0 Republique du Congo
## 22     100  Fish body oils, nei    fish_oil 1997   0 Republique du Congo
## 23     100  Fish body oils, nei    fish_oil 1998   0 Republique du Congo
## 24     100  Fish body oils, nei    fish_oil 1999   0 Republique du Congo
## 25     100  Fish body oils, nei    fish_oil 2000   0 Republique du Congo
## 26     100  Fish body oils, nei    fish_oil 2001   0 Republique du Congo
## 27     100  Fish body oils, nei    fish_oil 2002   0 Republique du Congo
## 28     100  Fish body oils, nei    fish_oil 2003   0 Republique du Congo
## 29     100  Fish body oils, nei    fish_oil 2004   0 Republique du Congo
## 30     100  Fish body oils, nei    fish_oil 2005   0 Republique du Congo
## 31     100  Fish body oils, nei    fish_oil 2006   0 Republique du Congo
## 32     100  Fish body oils, nei    fish_oil 2007   0 Republique du Congo
## 33     100  Fish body oils, nei    fish_oil 2008   0 Republique du Congo
## 34     100  Fish body oils, nei    fish_oil 2009   0 Republique du Congo
## 35     100  Fish body oils, nei    fish_oil 2010   0 Republique du Congo
## 36     100  Fish body oils, nei    fish_oil 2011   0 Republique du Congo
## 37     100 Fish liver oils, nei    fish_oil 1976  NA Republique du Congo
## 38     100 Fish liver oils, nei    fish_oil 1977  NA Republique du Congo
## 39     100 Fish liver oils, nei    fish_oil 1978  NA Republique du Congo
## 40     100 Fish liver oils, nei    fish_oil 1979  NA Republique du Congo
## 41     100 Fish liver oils, nei    fish_oil 1980  NA Republique du Congo
## 42     100 Fish liver oils, nei    fish_oil 1981  NA Republique du Congo
## 43     100 Fish liver oils, nei    fish_oil 1982  NA Republique du Congo
## 44     100 Fish liver oils, nei    fish_oil 1983  NA Republique du Congo
## 45     100 Fish liver oils, nei    fish_oil 1984  NA Republique du Congo
## 46     100 Fish liver oils, nei    fish_oil 1985  NA Republique du Congo
## 47     100 Fish liver oils, nei    fish_oil 1986  NA Republique du Congo
## 48     100 Fish liver oils, nei    fish_oil 1987  NA Republique du Congo
## 49     100 Fish liver oils, nei    fish_oil 1988  NA Republique du Congo
## 50     100 Fish liver oils, nei    fish_oil 1989  NA Republique du Congo
## 51     100 Fish liver oils, nei    fish_oil 1990  NA Republique du Congo
## 52     100 Fish liver oils, nei    fish_oil 1991  NA Republique du Congo
## 53     100 Fish liver oils, nei    fish_oil 1992  NA Republique du Congo
## 54     100 Fish liver oils, nei    fish_oil 1993  NA Republique du Congo
## 55     100 Fish liver oils, nei    fish_oil 1994  NA Republique du Congo
## 56     100 Fish liver oils, nei    fish_oil 1995   1 Republique du Congo
## 57     100 Fish liver oils, nei    fish_oil 1996   0 Republique du Congo
## 58     100 Fish liver oils, nei    fish_oil 1997   0 Republique du Congo
## 59     100 Fish liver oils, nei    fish_oil 1998   0 Republique du Congo
## 60     100 Fish liver oils, nei    fish_oil 1999   0 Republique du Congo
## 61     100 Fish liver oils, nei    fish_oil 2000   0 Republique du Congo
## 62     100 Fish liver oils, nei    fish_oil 2001   0 Republique du Congo
## 63     100 Fish liver oils, nei    fish_oil 2002   0 Republique du Congo
## 64     100 Fish liver oils, nei    fish_oil 2003   0 Republique du Congo
## 65     100 Fish liver oils, nei    fish_oil 2004   0 Republique du Congo
## 66     100 Fish liver oils, nei    fish_oil 2005   0 Republique du Congo
## 67     100 Fish liver oils, nei    fish_oil 2006   0 Republique du Congo
## 68     100 Fish liver oils, nei    fish_oil 2007   0 Republique du Congo
## 69     100 Fish liver oils, nei    fish_oil 2008   0 Republique du Congo
## 70     100 Fish liver oils, nei    fish_oil 2009   0 Republique du Congo
## 71     100 Fish liver oils, nei    fish_oil 2010   0 Republique du Congo
## 72     100 Fish liver oils, nei    fish_oil 2011   0 Republique du Congo
## 73     100  Ornamental fish nei ornamentals 1976  NA Republique du Congo
## 74     100  Ornamental fish nei ornamentals 1977  NA Republique du Congo
## 75     100  Ornamental fish nei ornamentals 1978  NA Republique du Congo
## 76     100  Ornamental fish nei ornamentals 1979  NA Republique du Congo
## 77     100  Ornamental fish nei ornamentals 1980  NA Republique du Congo
## 78     100  Ornamental fish nei ornamentals 1981  NA Republique du Congo
## 79     100  Ornamental fish nei ornamentals 1982  NA Republique du Congo
## 80     100  Ornamental fish nei ornamentals 1983  NA Republique du Congo
## 81     100  Ornamental fish nei ornamentals 1984  NA Republique du Congo
## 82     100  Ornamental fish nei ornamentals 1985  NA Republique du Congo
## 83     100  Ornamental fish nei ornamentals 1986  NA Republique du Congo
## 84     100  Ornamental fish nei ornamentals 1987  NA Republique du Congo
## 85     100  Ornamental fish nei ornamentals 1988  NA Republique du Congo
## 86     100  Ornamental fish nei ornamentals 1989  NA Republique du Congo
## 87     100  Ornamental fish nei ornamentals 1990  NA Republique du Congo
## 88     100  Ornamental fish nei ornamentals 1991  NA Republique du Congo
## 89     100  Ornamental fish nei ornamentals 1992  NA Republique du Congo
## 90     100  Ornamental fish nei ornamentals 1993  NA Republique du Congo
## 91     100  Ornamental fish nei ornamentals 1994  NA Republique du Congo
## 92     100  Ornamental fish nei ornamentals 1995   3 Republique du Congo
## 93     100  Ornamental fish nei ornamentals 1996  85 Republique du Congo
## 94     100  Ornamental fish nei ornamentals 1997  77 Republique du Congo
## 95     100  Ornamental fish nei ornamentals 1998  77 Republique du Congo
## 96     100  Ornamental fish nei ornamentals 1999  82 Republique du Congo
## 97     100  Ornamental fish nei ornamentals 2000  96 Republique du Congo
## 98     100  Ornamental fish nei ornamentals 2001 132 Republique du Congo
## 99     100  Ornamental fish nei ornamentals 2002 187 Republique du Congo
## 100    100  Ornamental fish nei ornamentals 2003 180 Republique du Congo
## 101    100  Ornamental fish nei ornamentals 2004  83 Republique du Congo
## 102    100  Ornamental fish nei ornamentals 2005  NA Republique du Congo
## 103    100  Ornamental fish nei ornamentals 2006 131 Republique du Congo
## 104    100  Ornamental fish nei ornamentals 2007   0 Republique du Congo
## 105    100  Ornamental fish nei ornamentals 2008   0 Republique du Congo
## 106    100  Ornamental fish nei ornamentals 2009   0 Republique du Congo
## 107    100  Ornamental fish nei ornamentals 2010   0 Republique du Congo
## 108    100  Ornamental fish nei ornamentals 2011 117 Republique du Congo
new <- read.csv('output/np_harvest_tonnes.csv')
filter(new, rgn_id==100)
##    rgn_id     product year     tonnes
## 1     100 ornamentals 1995 0.00000000
## 2     100 ornamentals 1996 0.00000000
## 3     100 ornamentals 1997 0.00000000
## 4     100 ornamentals 1998 0.00000000
## 5     100 ornamentals 1999 0.08998214
## 6     100 ornamentals 2000 0.52932202
## 7     100 ornamentals 2001 1.59291462
## 8     100 ornamentals 2002 3.51816926
## 9     100 ornamentals 2003 3.45318712
## 10    100 ornamentals 2004 3.98844747
## 11    100 ornamentals 2005 2.92485486
## 12    100 ornamentals 2006 2.92282047
## 13    100 ornamentals 2007 2.89782047
## 14    100 ornamentals 2008 1.92322024
## 15    100 ornamentals 2009 1.92322024
## 16    100 ornamentals 2010 0.00000000
## 17    100 ornamentals 2011 0.00000000
## 18    100 ornamentals 2012 0.00000000
## 19    100 ornamentals 2013 0.00000000
old <- read.csv('../v2014_test/data/np_harvest_tonnes_eez2014_test-year_max_2011.csv')
filter(old, rgn_id==100)
##    rgn_id     product year      tonnes
## 1     100 ornamentals 1995 0.000000000
## 2     100 ornamentals 1996 0.000000000
## 3     100 ornamentals 1997 0.000000000
## 4     100 ornamentals 1998 0.000000000
## 5     100 ornamentals 1999 0.006764426
## 6     100 ornamentals 2000 0.025950857
## 7     100 ornamentals 2001 0.064707942
## 8     100 ornamentals 2002 0.129209513
## 9     100 ornamentals 2003 0.147445087
## 10    100 ornamentals 2004 0.174712341
## 11    100 ornamentals 2005 0.135955256
## 12    100 ornamentals 2006 0.149250151
## 13    100 ornamentals 2007 0.124250151
## 14    100 ornamentals 2008 0.077796466
## 15    100 ornamentals 2009 0.077796466
## 16    100 ornamentals 2010 0.000000000
## 17    100 ornamentals 2011 0.750000000
## 
new <- read.csv("int/tonnes.csv")
old <- read.csv("../v2014_test/intermediate/tonnes.csv")

filter(new, rgn_id==66) %>%
  arrange(commodity, year)
##     rgn_id rgn_name                                              commodity
## 1       66  Senegal                                     Clupeoid oils, nei
## 2       66  Senegal                                     Clupeoid oils, nei
## 3       66  Senegal                                     Clupeoid oils, nei
## 4       66  Senegal                                     Clupeoid oils, nei
## 5       66  Senegal                                     Clupeoid oils, nei
## 6       66  Senegal                                     Clupeoid oils, nei
## 7       66  Senegal                                     Clupeoid oils, nei
## 8       66  Senegal                                     Clupeoid oils, nei
## 9       66  Senegal                                     Clupeoid oils, nei
## 10      66  Senegal                                     Clupeoid oils, nei
## 11      66  Senegal                                     Clupeoid oils, nei
## 12      66  Senegal                                     Clupeoid oils, nei
## 13      66  Senegal                                     Clupeoid oils, nei
## 14      66  Senegal                                     Clupeoid oils, nei
## 15      66  Senegal                                     Clupeoid oils, nei
## 16      66  Senegal                                     Clupeoid oils, nei
## 17      66  Senegal                                     Clupeoid oils, nei
## 18      66  Senegal                                     Clupeoid oils, nei
## 19      66  Senegal                                     Clupeoid oils, nei
## 20      66  Senegal                                     Clupeoid oils, nei
## 21      66  Senegal                                     Clupeoid oils, nei
## 22      66  Senegal                                     Clupeoid oils, nei
## 23      66  Senegal                                     Clupeoid oils, nei
## 24      66  Senegal                                     Clupeoid oils, nei
## 25      66  Senegal                                     Clupeoid oils, nei
## 26      66  Senegal                                     Clupeoid oils, nei
## 27      66  Senegal                                     Clupeoid oils, nei
## 28      66  Senegal                                     Clupeoid oils, nei
## 29      66  Senegal                                     Clupeoid oils, nei
## 30      66  Senegal                                     Clupeoid oils, nei
## 31      66  Senegal                                     Clupeoid oils, nei
## 32      66  Senegal                                     Clupeoid oils, nei
## 33      66  Senegal                                     Clupeoid oils, nei
## 34      66  Senegal                                     Clupeoid oils, nei
## 35      66  Senegal                                     Clupeoid oils, nei
## 36      66  Senegal                                     Clupeoid oils, nei
## 37      66  Senegal                                     Clupeoid oils, nei
## 38      66  Senegal                                     Clupeoid oils, nei
## 39      66  Senegal                                     Coral and the like
## 40      66  Senegal                                     Coral and the like
## 41      66  Senegal                                     Coral and the like
## 42      66  Senegal                                     Coral and the like
## 43      66  Senegal                                     Coral and the like
## 44      66  Senegal                                     Coral and the like
## 45      66  Senegal                                     Coral and the like
## 46      66  Senegal                                     Coral and the like
## 47      66  Senegal                                     Coral and the like
## 48      66  Senegal                                     Coral and the like
## 49      66  Senegal                                     Coral and the like
## 50      66  Senegal                                     Coral and the like
## 51      66  Senegal                                     Coral and the like
## 52      66  Senegal                                     Coral and the like
## 53      66  Senegal                                     Coral and the like
## 54      66  Senegal                                     Coral and the like
## 55      66  Senegal                                     Coral and the like
## 56      66  Senegal                                     Coral and the like
## 57      66  Senegal                                     Coral and the like
## 58      66  Senegal                                     Coral and the like
## 59      66  Senegal                                     Coral and the like
## 60      66  Senegal                                     Coral and the like
## 61      66  Senegal                                     Coral and the like
## 62      66  Senegal                                     Coral and the like
## 63      66  Senegal                                     Coral and the like
## 64      66  Senegal                                     Coral and the like
## 65      66  Senegal                                     Coral and the like
## 66      66  Senegal                                     Coral and the like
## 67      66  Senegal                                     Coral and the like
## 68      66  Senegal                                     Coral and the like
## 69      66  Senegal                                     Coral and the like
## 70      66  Senegal                                     Coral and the like
## 71      66  Senegal                                     Coral and the like
## 72      66  Senegal                                     Coral and the like
## 73      66  Senegal                                     Coral and the like
## 74      66  Senegal                                     Coral and the like
## 75      66  Senegal                                     Coral and the like
## 76      66  Senegal                                     Coral and the like
## 77      66  Senegal                                    Fish body oils, nei
## 78      66  Senegal                                    Fish body oils, nei
## 79      66  Senegal                                    Fish body oils, nei
## 80      66  Senegal                                    Fish body oils, nei
## 81      66  Senegal                                    Fish body oils, nei
## 82      66  Senegal                                    Fish body oils, nei
## 83      66  Senegal                                    Fish body oils, nei
## 84      66  Senegal                                    Fish body oils, nei
## 85      66  Senegal                                    Fish body oils, nei
## 86      66  Senegal                                    Fish body oils, nei
## 87      66  Senegal                                    Fish body oils, nei
## 88      66  Senegal                                    Fish body oils, nei
## 89      66  Senegal                                    Fish body oils, nei
## 90      66  Senegal                                    Fish body oils, nei
## 91      66  Senegal                                    Fish body oils, nei
## 92      66  Senegal                                    Fish body oils, nei
## 93      66  Senegal                                    Fish body oils, nei
## 94      66  Senegal                                    Fish body oils, nei
## 95      66  Senegal                                    Fish body oils, nei
## 96      66  Senegal                                    Fish body oils, nei
## 97      66  Senegal                                    Fish body oils, nei
## 98      66  Senegal                                    Fish body oils, nei
## 99      66  Senegal                                    Fish body oils, nei
## 100     66  Senegal                                    Fish body oils, nei
## 101     66  Senegal                                    Fish body oils, nei
## 102     66  Senegal                                    Fish body oils, nei
## 103     66  Senegal                                    Fish body oils, nei
## 104     66  Senegal                                    Fish body oils, nei
## 105     66  Senegal                                    Fish body oils, nei
## 106     66  Senegal                                    Fish body oils, nei
## 107     66  Senegal                                    Fish body oils, nei
## 108     66  Senegal                                    Fish body oils, nei
## 109     66  Senegal                                    Fish body oils, nei
## 110     66  Senegal                                    Fish body oils, nei
## 111     66  Senegal                                    Fish body oils, nei
## 112     66  Senegal                                    Fish body oils, nei
## 113     66  Senegal                                    Fish body oils, nei
## 114     66  Senegal                                    Fish body oils, nei
## 115     66  Senegal                                   Fish liver oils, nei
## 116     66  Senegal                                   Fish liver oils, nei
## 117     66  Senegal                                   Fish liver oils, nei
## 118     66  Senegal                                   Fish liver oils, nei
## 119     66  Senegal                                   Fish liver oils, nei
## 120     66  Senegal                                   Fish liver oils, nei
## 121     66  Senegal                                   Fish liver oils, nei
## 122     66  Senegal                                   Fish liver oils, nei
## 123     66  Senegal                                   Fish liver oils, nei
## 124     66  Senegal                                   Fish liver oils, nei
## 125     66  Senegal                                   Fish liver oils, nei
## 126     66  Senegal                                   Fish liver oils, nei
## 127     66  Senegal                                   Fish liver oils, nei
## 128     66  Senegal                                   Fish liver oils, nei
## 129     66  Senegal                                   Fish liver oils, nei
## 130     66  Senegal                                   Fish liver oils, nei
## 131     66  Senegal                                   Fish liver oils, nei
## 132     66  Senegal                                   Fish liver oils, nei
## 133     66  Senegal                                   Fish liver oils, nei
## 134     66  Senegal                                   Fish liver oils, nei
## 135     66  Senegal                                   Fish liver oils, nei
## 136     66  Senegal                                   Fish liver oils, nei
## 137     66  Senegal                                   Fish liver oils, nei
## 138     66  Senegal                                   Fish liver oils, nei
## 139     66  Senegal                                   Fish liver oils, nei
## 140     66  Senegal                                   Fish liver oils, nei
## 141     66  Senegal                                   Fish liver oils, nei
## 142     66  Senegal                                   Fish liver oils, nei
## 143     66  Senegal                                   Fish liver oils, nei
## 144     66  Senegal                                   Fish liver oils, nei
## 145     66  Senegal                                   Fish liver oils, nei
## 146     66  Senegal                                   Fish liver oils, nei
## 147     66  Senegal                                   Fish liver oils, nei
## 148     66  Senegal                                   Fish liver oils, nei
## 149     66  Senegal                                   Fish liver oils, nei
## 150     66  Senegal                                   Fish liver oils, nei
## 151     66  Senegal                                   Fish liver oils, nei
## 152     66  Senegal                                   Fish liver oils, nei
## 153     66  Senegal                                    Ornamental fish nei
## 154     66  Senegal                                    Ornamental fish nei
## 155     66  Senegal                                    Ornamental fish nei
## 156     66  Senegal                                    Ornamental fish nei
## 157     66  Senegal                                    Ornamental fish nei
## 158     66  Senegal                                    Ornamental fish nei
## 159     66  Senegal                                    Ornamental fish nei
## 160     66  Senegal                                    Ornamental fish nei
## 161     66  Senegal                                    Ornamental fish nei
## 162     66  Senegal                                    Ornamental fish nei
## 163     66  Senegal                                    Ornamental fish nei
## 164     66  Senegal                                    Ornamental fish nei
## 165     66  Senegal                                    Ornamental fish nei
## 166     66  Senegal                                    Ornamental fish nei
## 167     66  Senegal                                    Ornamental fish nei
## 168     66  Senegal                                    Ornamental fish nei
## 169     66  Senegal                                    Ornamental fish nei
## 170     66  Senegal                                    Ornamental fish nei
## 171     66  Senegal                                    Ornamental fish nei
## 172     66  Senegal                                    Ornamental fish nei
## 173     66  Senegal                                    Ornamental fish nei
## 174     66  Senegal                                    Ornamental fish nei
## 175     66  Senegal                                    Ornamental fish nei
## 176     66  Senegal                                    Ornamental fish nei
## 177     66  Senegal                                    Ornamental fish nei
## 178     66  Senegal                                    Ornamental fish nei
## 179     66  Senegal                                    Ornamental fish nei
## 180     66  Senegal                                    Ornamental fish nei
## 181     66  Senegal                                    Ornamental fish nei
## 182     66  Senegal                                    Ornamental fish nei
## 183     66  Senegal                                    Ornamental fish nei
## 184     66  Senegal                                    Ornamental fish nei
## 185     66  Senegal                                    Ornamental fish nei
## 186     66  Senegal                                    Ornamental fish nei
## 187     66  Senegal                                    Ornamental fish nei
## 188     66  Senegal                                    Ornamental fish nei
## 189     66  Senegal                                    Ornamental fish nei
## 190     66  Senegal                                    Ornamental fish nei
## 191     66  Senegal Other seaweeds and aquatic plants and products thereof
## 192     66  Senegal Other seaweeds and aquatic plants and products thereof
## 193     66  Senegal Other seaweeds and aquatic plants and products thereof
## 194     66  Senegal Other seaweeds and aquatic plants and products thereof
## 195     66  Senegal Other seaweeds and aquatic plants and products thereof
## 196     66  Senegal Other seaweeds and aquatic plants and products thereof
## 197     66  Senegal Other seaweeds and aquatic plants and products thereof
## 198     66  Senegal Other seaweeds and aquatic plants and products thereof
## 199     66  Senegal Other seaweeds and aquatic plants and products thereof
## 200     66  Senegal Other seaweeds and aquatic plants and products thereof
## 201     66  Senegal Other seaweeds and aquatic plants and products thereof
## 202     66  Senegal Other seaweeds and aquatic plants and products thereof
## 203     66  Senegal Other seaweeds and aquatic plants and products thereof
## 204     66  Senegal Other seaweeds and aquatic plants and products thereof
## 205     66  Senegal Other seaweeds and aquatic plants and products thereof
## 206     66  Senegal Other seaweeds and aquatic plants and products thereof
## 207     66  Senegal Other seaweeds and aquatic plants and products thereof
## 208     66  Senegal Other seaweeds and aquatic plants and products thereof
## 209     66  Senegal Other seaweeds and aquatic plants and products thereof
## 210     66  Senegal Other seaweeds and aquatic plants and products thereof
## 211     66  Senegal Other seaweeds and aquatic plants and products thereof
## 212     66  Senegal Other seaweeds and aquatic plants and products thereof
## 213     66  Senegal Other seaweeds and aquatic plants and products thereof
## 214     66  Senegal Other seaweeds and aquatic plants and products thereof
## 215     66  Senegal Other seaweeds and aquatic plants and products thereof
## 216     66  Senegal Other seaweeds and aquatic plants and products thereof
## 217     66  Senegal Other seaweeds and aquatic plants and products thereof
## 218     66  Senegal Other seaweeds and aquatic plants and products thereof
## 219     66  Senegal Other seaweeds and aquatic plants and products thereof
## 220     66  Senegal Other seaweeds and aquatic plants and products thereof
## 221     66  Senegal Other seaweeds and aquatic plants and products thereof
## 222     66  Senegal Other seaweeds and aquatic plants and products thereof
## 223     66  Senegal Other seaweeds and aquatic plants and products thereof
## 224     66  Senegal Other seaweeds and aquatic plants and products thereof
## 225     66  Senegal Other seaweeds and aquatic plants and products thereof
## 226     66  Senegal Other seaweeds and aquatic plants and products thereof
## 227     66  Senegal Other seaweeds and aquatic plants and products thereof
## 228     66  Senegal Other seaweeds and aquatic plants and products thereof
##         product year tonnes
## 1      fish_oil 1976     NA
## 2      fish_oil 1977     NA
## 3      fish_oil 1978     NA
## 4      fish_oil 1979  374.0
## 5      fish_oil 1980    5.0
## 6      fish_oil 1981  253.0
## 7      fish_oil 1982     NA
## 8      fish_oil 1983     NA
## 9      fish_oil 1984     NA
## 10     fish_oil 1985   15.0
## 11     fish_oil 1986    3.0
## 12     fish_oil 1987   10.0
## 13     fish_oil 1988     NA
## 14     fish_oil 1989   32.0
## 15     fish_oil 1990   45.0
## 16     fish_oil 1991   30.0
## 17     fish_oil 1992   24.0
## 18     fish_oil 1993   19.0
## 19     fish_oil 1994     NA
## 20     fish_oil 1995     NA
## 21     fish_oil 1996     NA
## 22     fish_oil 1997     NA
## 23     fish_oil 1998   21.0
## 24     fish_oil 1999    0.0
## 25     fish_oil 2000   10.0
## 26     fish_oil 2001    0.0
## 27     fish_oil 2002    0.0
## 28     fish_oil 2003    0.0
## 29     fish_oil 2004    0.0
## 30     fish_oil 2005    0.0
## 31     fish_oil 2006    0.0
## 32     fish_oil 2007    0.0
## 33     fish_oil 2008    0.0
## 34     fish_oil 2009    0.0
## 35     fish_oil 2010    0.0
## 36     fish_oil 2011    0.0
## 37     fish_oil 2012    0.0
## 38     fish_oil 2013    0.0
## 39       corals 1976     NA
## 40       corals 1977     NA
## 41       corals 1978     NA
## 42       corals 1979     NA
## 43       corals 1980     NA
## 44       corals 1981     NA
## 45       corals 1982     NA
## 46       corals 1983     NA
## 47       corals 1984     NA
## 48       corals 1985     NA
## 49       corals 1986     NA
## 50       corals 1987     NA
## 51       corals 1988     NA
## 52       corals 1989     NA
## 53       corals 1990     NA
## 54       corals 1991     NA
## 55       corals 1992     NA
## 56       corals 1993     NA
## 57       corals 1994     NA
## 58       corals 1995     NA
## 59       corals 1996     NA
## 60       corals 1997     NA
## 61       corals 1998 1250.0
## 62       corals 1999   23.0
## 63       corals 2000    0.0
## 64       corals 2001    0.0
## 65       corals 2002    4.0
## 66       corals 2003    0.0
## 67       corals 2004    0.0
## 68       corals 2005    0.0
## 69       corals 2006    0.0
## 70       corals 2007    0.0
## 71       corals 2008    0.1
## 72       corals 2009   22.0
## 73       corals 2010    1.0
## 74       corals 2011  202.0
## 75       corals 2012   51.0
## 76       corals 2013   19.0
## 77     fish_oil 1976     NA
## 78     fish_oil 1977     NA
## 79     fish_oil 1978     NA
## 80     fish_oil 1979     NA
## 81     fish_oil 1980     NA
## 82     fish_oil 1981     NA
## 83     fish_oil 1982     NA
## 84     fish_oil 1983     NA
## 85     fish_oil 1984     NA
## 86     fish_oil 1985     NA
## 87     fish_oil 1986     NA
## 88     fish_oil 1987     NA
## 89     fish_oil 1988     NA
## 90     fish_oil 1989     NA
## 91     fish_oil 1990     NA
## 92     fish_oil 1991     NA
## 93     fish_oil 1992     NA
## 94     fish_oil 1993     NA
## 95     fish_oil 1994     NA
## 96     fish_oil 1995     NA
## 97     fish_oil 1996     NA
## 98     fish_oil 1997     NA
## 99     fish_oil 1998     NA
## 100    fish_oil 1999     NA
## 101    fish_oil 2000     NA
## 102    fish_oil 2001     NA
## 103    fish_oil 2002     NA
## 104    fish_oil 2003     NA
## 105    fish_oil 2004   10.0
## 106    fish_oil 2005    0.0
## 107    fish_oil 2006    0.0
## 108    fish_oil 2007   26.0
## 109    fish_oil 2008  400.0
## 110    fish_oil 2009    9.0
## 111    fish_oil 2010    0.0
## 112    fish_oil 2011    0.0
## 113    fish_oil 2012   44.0
## 114    fish_oil 2013  177.0
## 115    fish_oil 1976     NA
## 116    fish_oil 1977     NA
## 117    fish_oil 1978     NA
## 118    fish_oil 1979     NA
## 119    fish_oil 1980     NA
## 120    fish_oil 1981     NA
## 121    fish_oil 1982     NA
## 122    fish_oil 1983     NA
## 123    fish_oil 1984     NA
## 124    fish_oil 1985     NA
## 125    fish_oil 1986     NA
## 126    fish_oil 1987     NA
## 127    fish_oil 1988     NA
## 128    fish_oil 1989     NA
## 129    fish_oil 1990     NA
## 130    fish_oil 1991     NA
## 131    fish_oil 1992     NA
## 132    fish_oil 1993     NA
## 133    fish_oil 1994     NA
## 134    fish_oil 1995  120.0
## 135    fish_oil 1996   84.0
## 136    fish_oil 1997     NA
## 137    fish_oil 1998     NA
## 138    fish_oil 1999    1.0
## 139    fish_oil 2000     NA
## 140    fish_oil 2001     NA
## 141    fish_oil 2002   24.0
## 142    fish_oil 2003     NA
## 143    fish_oil 2004    4.0
## 144    fish_oil 2005     NA
## 145    fish_oil 2006    4.0
## 146    fish_oil 2007   14.0
## 147    fish_oil 2008  628.0
## 148    fish_oil 2009   14.0
## 149    fish_oil 2010    0.0
## 150    fish_oil 2011   30.0
## 151    fish_oil 2012    0.0
## 152    fish_oil 2013   72.0
## 153 ornamentals 1976     NA
## 154 ornamentals 1977     NA
## 155 ornamentals 1978     NA
## 156 ornamentals 1979     NA
## 157 ornamentals 1980     NA
## 158 ornamentals 1981     NA
## 159 ornamentals 1982     NA
## 160 ornamentals 1983     NA
## 161 ornamentals 1984     NA
## 162 ornamentals 1985     NA
## 163 ornamentals 1986     NA
## 164 ornamentals 1987     NA
## 165 ornamentals 1988     NA
## 166 ornamentals 1989     NA
## 167 ornamentals 1990     NA
## 168 ornamentals 1991     NA
## 169 ornamentals 1992     NA
## 170 ornamentals 1993     NA
## 171 ornamentals 1994     NA
## 172 ornamentals 1995     NA
## 173 ornamentals 1996     NA
## 174 ornamentals 1997     NA
## 175 ornamentals 1998     NA
## 176 ornamentals 1999     NA
## 177 ornamentals 2000     NA
## 178 ornamentals 2001     NA
## 179 ornamentals 2002     NA
## 180 ornamentals 2003    0.0
## 181 ornamentals 2004    0.0
## 182 ornamentals 2005    0.0
## 183 ornamentals 2006    0.0
## 184 ornamentals 2007    0.0
## 185 ornamentals 2008    0.0
## 186 ornamentals 2009    0.0
## 187 ornamentals 2010    0.0
## 188 ornamentals 2011    0.0
## 189 ornamentals 2012    0.0
## 190 ornamentals 2013    0.0
## 191    seaweeds 1976     NA
## 192    seaweeds 1977     NA
## 193    seaweeds 1978     NA
## 194    seaweeds 1979     NA
## 195    seaweeds 1980     NA
## 196    seaweeds 1981     NA
## 197    seaweeds 1982     NA
## 198    seaweeds 1983     NA
## 199    seaweeds 1984     NA
## 200    seaweeds 1985     NA
## 201    seaweeds 1986     NA
## 202    seaweeds 1987     NA
## 203    seaweeds 1988     NA
## 204    seaweeds 1989     NA
## 205    seaweeds 1990     NA
## 206    seaweeds 1991     NA
## 207    seaweeds 1992     NA
## 208    seaweeds 1993     NA
## 209    seaweeds 1994     NA
## 210    seaweeds 1995     NA
## 211    seaweeds 1996     NA
## 212    seaweeds 1997     NA
## 213    seaweeds 1998  560.0
## 214    seaweeds 1999     NA
## 215    seaweeds 2000    7.0
## 216    seaweeds 2001   21.0
## 217    seaweeds 2002   66.0
## 218    seaweeds 2003   78.0
## 219    seaweeds 2004   55.0
## 220    seaweeds 2005   14.0
## 221    seaweeds 2006   11.0
## 222    seaweeds 2007    0.1
## 223    seaweeds 2008    0.0
## 224    seaweeds 2009   25.0
## 225    seaweeds 2010   26.0
## 226    seaweeds 2011   19.0
## 227    seaweeds 2012   45.0
## 228    seaweeds 2013   36.0
filter(old, rgn_id==66) %>%
  arrange(commodity, year)
##     rgn_id                                              commodity  product
## 1       66                                     Clupeoid oils, nei fish_oil
## 2       66                                     Clupeoid oils, nei fish_oil
## 3       66                                     Clupeoid oils, nei fish_oil
## 4       66                                     Clupeoid oils, nei fish_oil
## 5       66                                     Clupeoid oils, nei fish_oil
## 6       66                                     Clupeoid oils, nei fish_oil
## 7       66                                     Clupeoid oils, nei fish_oil
## 8       66                                     Clupeoid oils, nei fish_oil
## 9       66                                     Clupeoid oils, nei fish_oil
## 10      66                                     Clupeoid oils, nei fish_oil
## 11      66                                     Clupeoid oils, nei fish_oil
## 12      66                                     Clupeoid oils, nei fish_oil
## 13      66                                     Clupeoid oils, nei fish_oil
## 14      66                                     Clupeoid oils, nei fish_oil
## 15      66                                     Clupeoid oils, nei fish_oil
## 16      66                                     Clupeoid oils, nei fish_oil
## 17      66                                     Clupeoid oils, nei fish_oil
## 18      66                                     Clupeoid oils, nei fish_oil
## 19      66                                     Clupeoid oils, nei fish_oil
## 20      66                                     Clupeoid oils, nei fish_oil
## 21      66                                     Clupeoid oils, nei fish_oil
## 22      66                                     Clupeoid oils, nei fish_oil
## 23      66                                     Clupeoid oils, nei fish_oil
## 24      66                                     Clupeoid oils, nei fish_oil
## 25      66                                     Clupeoid oils, nei fish_oil
## 26      66                                     Clupeoid oils, nei fish_oil
## 27      66                                     Clupeoid oils, nei fish_oil
## 28      66                                     Clupeoid oils, nei fish_oil
## 29      66                                     Clupeoid oils, nei fish_oil
## 30      66                                     Clupeoid oils, nei fish_oil
## 31      66                                     Clupeoid oils, nei fish_oil
## 32      66                                     Clupeoid oils, nei fish_oil
## 33      66                                     Clupeoid oils, nei fish_oil
## 34      66                                     Clupeoid oils, nei fish_oil
## 35      66                                     Clupeoid oils, nei fish_oil
## 36      66                                     Clupeoid oils, nei fish_oil
## 37      66                                     Coral and the like   corals
## 38      66                                     Coral and the like   corals
## 39      66                                     Coral and the like   corals
## 40      66                                     Coral and the like   corals
## 41      66                                     Coral and the like   corals
## 42      66                                     Coral and the like   corals
## 43      66                                     Coral and the like   corals
## 44      66                                     Coral and the like   corals
## 45      66                                     Coral and the like   corals
## 46      66                                     Coral and the like   corals
## 47      66                                     Coral and the like   corals
## 48      66                                     Coral and the like   corals
## 49      66                                     Coral and the like   corals
## 50      66                                     Coral and the like   corals
## 51      66                                     Coral and the like   corals
## 52      66                                     Coral and the like   corals
## 53      66                                     Coral and the like   corals
## 54      66                                     Coral and the like   corals
## 55      66                                     Coral and the like   corals
## 56      66                                     Coral and the like   corals
## 57      66                                     Coral and the like   corals
## 58      66                                     Coral and the like   corals
## 59      66                                     Coral and the like   corals
## 60      66                                     Coral and the like   corals
## 61      66                                     Coral and the like   corals
## 62      66                                     Coral and the like   corals
## 63      66                                     Coral and the like   corals
## 64      66                                     Coral and the like   corals
## 65      66                                     Coral and the like   corals
## 66      66                                     Coral and the like   corals
## 67      66                                     Coral and the like   corals
## 68      66                                     Coral and the like   corals
## 69      66                                     Coral and the like   corals
## 70      66                                     Coral and the like   corals
## 71      66                                     Coral and the like   corals
## 72      66                                     Coral and the like   corals
## 73      66                                    Fish body oils, nei fish_oil
## 74      66                                    Fish body oils, nei fish_oil
## 75      66                                    Fish body oils, nei fish_oil
## 76      66                                    Fish body oils, nei fish_oil
## 77      66                                    Fish body oils, nei fish_oil
## 78      66                                    Fish body oils, nei fish_oil
## 79      66                                    Fish body oils, nei fish_oil
## 80      66                                    Fish body oils, nei fish_oil
## 81      66                                    Fish body oils, nei fish_oil
## 82      66                                    Fish body oils, nei fish_oil
## 83      66                                    Fish body oils, nei fish_oil
## 84      66                                    Fish body oils, nei fish_oil
## 85      66                                    Fish body oils, nei fish_oil
## 86      66                                    Fish body oils, nei fish_oil
## 87      66                                    Fish body oils, nei fish_oil
## 88      66                                    Fish body oils, nei fish_oil
## 89      66                                    Fish body oils, nei fish_oil
## 90      66                                    Fish body oils, nei fish_oil
## 91      66                                    Fish body oils, nei fish_oil
## 92      66                                    Fish body oils, nei fish_oil
## 93      66                                    Fish body oils, nei fish_oil
## 94      66                                    Fish body oils, nei fish_oil
## 95      66                                    Fish body oils, nei fish_oil
## 96      66                                    Fish body oils, nei fish_oil
## 97      66                                    Fish body oils, nei fish_oil
## 98      66                                    Fish body oils, nei fish_oil
## 99      66                                    Fish body oils, nei fish_oil
## 100     66                                    Fish body oils, nei fish_oil
## 101     66                                    Fish body oils, nei fish_oil
## 102     66                                    Fish body oils, nei fish_oil
## 103     66                                    Fish body oils, nei fish_oil
## 104     66                                    Fish body oils, nei fish_oil
## 105     66                                    Fish body oils, nei fish_oil
## 106     66                                    Fish body oils, nei fish_oil
## 107     66                                    Fish body oils, nei fish_oil
## 108     66                                    Fish body oils, nei fish_oil
## 109     66                                   Fish liver oils, nei fish_oil
## 110     66                                   Fish liver oils, nei fish_oil
## 111     66                                   Fish liver oils, nei fish_oil
## 112     66                                   Fish liver oils, nei fish_oil
## 113     66                                   Fish liver oils, nei fish_oil
## 114     66                                   Fish liver oils, nei fish_oil
## 115     66                                   Fish liver oils, nei fish_oil
## 116     66                                   Fish liver oils, nei fish_oil
## 117     66                                   Fish liver oils, nei fish_oil
## 118     66                                   Fish liver oils, nei fish_oil
## 119     66                                   Fish liver oils, nei fish_oil
## 120     66                                   Fish liver oils, nei fish_oil
## 121     66                                   Fish liver oils, nei fish_oil
## 122     66                                   Fish liver oils, nei fish_oil
## 123     66                                   Fish liver oils, nei fish_oil
## 124     66                                   Fish liver oils, nei fish_oil
## 125     66                                   Fish liver oils, nei fish_oil
## 126     66                                   Fish liver oils, nei fish_oil
## 127     66                                   Fish liver oils, nei fish_oil
## 128     66                                   Fish liver oils, nei fish_oil
## 129     66                                   Fish liver oils, nei fish_oil
## 130     66                                   Fish liver oils, nei fish_oil
## 131     66                                   Fish liver oils, nei fish_oil
## 132     66                                   Fish liver oils, nei fish_oil
## 133     66                                   Fish liver oils, nei fish_oil
## 134     66                                   Fish liver oils, nei fish_oil
## 135     66                                   Fish liver oils, nei fish_oil
## 136     66                                   Fish liver oils, nei fish_oil
## 137     66                                   Fish liver oils, nei fish_oil
## 138     66                                   Fish liver oils, nei fish_oil
## 139     66                                   Fish liver oils, nei fish_oil
## 140     66                                   Fish liver oils, nei fish_oil
## 141     66                                   Fish liver oils, nei fish_oil
## 142     66                                   Fish liver oils, nei fish_oil
## 143     66                                   Fish liver oils, nei fish_oil
## 144     66                                   Fish liver oils, nei fish_oil
## 145     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 146     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 147     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 148     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 149     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 150     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 151     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 152     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 153     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 154     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 155     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 156     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 157     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 158     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 159     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 160     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 161     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 162     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 163     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 164     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 165     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 166     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 167     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 168     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 169     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 170     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 171     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 172     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 173     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 174     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 175     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 176     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 177     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 178     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 179     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 180     66 Other seaweeds and aquatic plants and products thereof seaweeds
##     year tonnes rgn_name
## 1   1976     NA  Senegal
## 2   1977     NA  Senegal
## 3   1978     NA  Senegal
## 4   1979  374.0  Senegal
## 5   1980    5.0  Senegal
## 6   1981  253.0  Senegal
## 7   1982     NA  Senegal
## 8   1983     NA  Senegal
## 9   1984     NA  Senegal
## 10  1985   15.0  Senegal
## 11  1986    3.0  Senegal
## 12  1987   10.0  Senegal
## 13  1988     NA  Senegal
## 14  1989   32.0  Senegal
## 15  1990   45.0  Senegal
## 16  1991   30.0  Senegal
## 17  1992   24.0  Senegal
## 18  1993   19.0  Senegal
## 19  1994     NA  Senegal
## 20  1995     NA  Senegal
## 21  1996     NA  Senegal
## 22  1997     NA  Senegal
## 23  1998   21.0  Senegal
## 24  1999    0.0  Senegal
## 25  2000   10.0  Senegal
## 26  2001    0.0  Senegal
## 27  2002    0.0  Senegal
## 28  2003    0.0  Senegal
## 29  2004    0.0  Senegal
## 30  2005    0.0  Senegal
## 31  2006    0.0  Senegal
## 32  2007    0.0  Senegal
## 33  2008    0.0  Senegal
## 34  2009    0.0  Senegal
## 35  2010    0.0  Senegal
## 36  2011    0.0  Senegal
## 37  1976     NA  Senegal
## 38  1977     NA  Senegal
## 39  1978     NA  Senegal
## 40  1979     NA  Senegal
## 41  1980     NA  Senegal
## 42  1981     NA  Senegal
## 43  1982     NA  Senegal
## 44  1983     NA  Senegal
## 45  1984     NA  Senegal
## 46  1985     NA  Senegal
## 47  1986     NA  Senegal
## 48  1987     NA  Senegal
## 49  1988     NA  Senegal
## 50  1989     NA  Senegal
## 51  1990     NA  Senegal
## 52  1991     NA  Senegal
## 53  1992     NA  Senegal
## 54  1993     NA  Senegal
## 55  1994     NA  Senegal
## 56  1995     NA  Senegal
## 57  1996     NA  Senegal
## 58  1997     NA  Senegal
## 59  1998 1250.0  Senegal
## 60  1999   23.0  Senegal
## 61  2000    0.0  Senegal
## 62  2001    0.0  Senegal
## 63  2002    0.0  Senegal
## 64  2003    0.0  Senegal
## 65  2004    0.0  Senegal
## 66  2005    0.0  Senegal
## 67  2006    0.0  Senegal
## 68  2007    0.0  Senegal
## 69  2008    0.1  Senegal
## 70  2009   22.0  Senegal
## 71  2010    1.0  Senegal
## 72  2011  202.0  Senegal
## 73  1976     NA  Senegal
## 74  1977     NA  Senegal
## 75  1978     NA  Senegal
## 76  1979     NA  Senegal
## 77  1980     NA  Senegal
## 78  1981     NA  Senegal
## 79  1982     NA  Senegal
## 80  1983     NA  Senegal
## 81  1984     NA  Senegal
## 82  1985     NA  Senegal
## 83  1986     NA  Senegal
## 84  1987     NA  Senegal
## 85  1988     NA  Senegal
## 86  1989     NA  Senegal
## 87  1990     NA  Senegal
## 88  1991     NA  Senegal
## 89  1992     NA  Senegal
## 90  1993     NA  Senegal
## 91  1994     NA  Senegal
## 92  1995     NA  Senegal
## 93  1996     NA  Senegal
## 94  1997     NA  Senegal
## 95  1998     NA  Senegal
## 96  1999     NA  Senegal
## 97  2000     NA  Senegal
## 98  2001     NA  Senegal
## 99  2002    0.0  Senegal
## 100 2003     NA  Senegal
## 101 2004   10.0  Senegal
## 102 2005    0.0  Senegal
## 103 2006    0.0  Senegal
## 104 2007   26.0  Senegal
## 105 2008  400.0  Senegal
## 106 2009    9.0  Senegal
## 107 2010    0.0  Senegal
## 108 2011    0.0  Senegal
## 109 1976     NA  Senegal
## 110 1977     NA  Senegal
## 111 1978     NA  Senegal
## 112 1979     NA  Senegal
## 113 1980     NA  Senegal
## 114 1981     NA  Senegal
## 115 1982     NA  Senegal
## 116 1983     NA  Senegal
## 117 1984     NA  Senegal
## 118 1985     NA  Senegal
## 119 1986     NA  Senegal
## 120 1987     NA  Senegal
## 121 1988     NA  Senegal
## 122 1989     NA  Senegal
## 123 1990     NA  Senegal
## 124 1991     NA  Senegal
## 125 1992     NA  Senegal
## 126 1993     NA  Senegal
## 127 1994     NA  Senegal
## 128 1995  120.0  Senegal
## 129 1996   84.0  Senegal
## 130 1997     NA  Senegal
## 131 1998     NA  Senegal
## 132 1999    1.0  Senegal
## 133 2000     NA  Senegal
## 134 2001     NA  Senegal
## 135 2002    0.0  Senegal
## 136 2003     NA  Senegal
## 137 2004    4.0  Senegal
## 138 2005     NA  Senegal
## 139 2006    4.0  Senegal
## 140 2007   14.0  Senegal
## 141 2008  628.0  Senegal
## 142 2009   14.0  Senegal
## 143 2010    0.0  Senegal
## 144 2011   30.0  Senegal
## 145 1976     NA  Senegal
## 146 1977     NA  Senegal
## 147 1978     NA  Senegal
## 148 1979     NA  Senegal
## 149 1980     NA  Senegal
## 150 1981     NA  Senegal
## 151 1982     NA  Senegal
## 152 1983     NA  Senegal
## 153 1984     NA  Senegal
## 154 1985     NA  Senegal
## 155 1986     NA  Senegal
## 156 1987     NA  Senegal
## 157 1988     NA  Senegal
## 158 1989     NA  Senegal
## 159 1990     NA  Senegal
## 160 1991     NA  Senegal
## 161 1992     NA  Senegal
## 162 1993     NA  Senegal
## 163 1994     NA  Senegal
## 164 1995     NA  Senegal
## 165 1996     NA  Senegal
## 166 1997     NA  Senegal
## 167 1998  560.0  Senegal
## 168 1999     NA  Senegal
## 169 2000    7.0  Senegal
## 170 2001   21.0  Senegal
## 171 2002   37.0  Senegal
## 172 2003   78.0  Senegal
## 173 2004   55.0  Senegal
## 174 2005   14.0  Senegal
## 175 2006   11.0  Senegal
## 176 2007    0.1  Senegal
## 177 2008    0.0  Senegal
## 178 2009   25.0  Senegal
## 179 2010   26.0  Senegal
## 180 2011   19.0  Senegal
new <- read.csv("int/usd.csv")
filter(new, rgn_id==66) %>%
  arrange(commodity, year)
##     rgn_id rgn_name                                              commodity
## 1       66  Senegal                                     Clupeoid oils, nei
## 2       66  Senegal                                     Clupeoid oils, nei
## 3       66  Senegal                                     Clupeoid oils, nei
## 4       66  Senegal                                     Clupeoid oils, nei
## 5       66  Senegal                                     Clupeoid oils, nei
## 6       66  Senegal                                     Clupeoid oils, nei
## 7       66  Senegal                                     Clupeoid oils, nei
## 8       66  Senegal                                     Clupeoid oils, nei
## 9       66  Senegal                                     Clupeoid oils, nei
## 10      66  Senegal                                     Clupeoid oils, nei
## 11      66  Senegal                                     Clupeoid oils, nei
## 12      66  Senegal                                     Clupeoid oils, nei
## 13      66  Senegal                                     Clupeoid oils, nei
## 14      66  Senegal                                     Clupeoid oils, nei
## 15      66  Senegal                                     Clupeoid oils, nei
## 16      66  Senegal                                     Clupeoid oils, nei
## 17      66  Senegal                                     Clupeoid oils, nei
## 18      66  Senegal                                     Clupeoid oils, nei
## 19      66  Senegal                                     Clupeoid oils, nei
## 20      66  Senegal                                     Clupeoid oils, nei
## 21      66  Senegal                                     Clupeoid oils, nei
## 22      66  Senegal                                     Clupeoid oils, nei
## 23      66  Senegal                                     Clupeoid oils, nei
## 24      66  Senegal                                     Clupeoid oils, nei
## 25      66  Senegal                                     Clupeoid oils, nei
## 26      66  Senegal                                     Clupeoid oils, nei
## 27      66  Senegal                                     Clupeoid oils, nei
## 28      66  Senegal                                     Clupeoid oils, nei
## 29      66  Senegal                                     Clupeoid oils, nei
## 30      66  Senegal                                     Clupeoid oils, nei
## 31      66  Senegal                                     Clupeoid oils, nei
## 32      66  Senegal                                     Clupeoid oils, nei
## 33      66  Senegal                                     Clupeoid oils, nei
## 34      66  Senegal                                     Clupeoid oils, nei
## 35      66  Senegal                                     Clupeoid oils, nei
## 36      66  Senegal                                     Clupeoid oils, nei
## 37      66  Senegal                                     Clupeoid oils, nei
## 38      66  Senegal                                     Clupeoid oils, nei
## 39      66  Senegal                                     Coral and the like
## 40      66  Senegal                                     Coral and the like
## 41      66  Senegal                                     Coral and the like
## 42      66  Senegal                                     Coral and the like
## 43      66  Senegal                                     Coral and the like
## 44      66  Senegal                                     Coral and the like
## 45      66  Senegal                                     Coral and the like
## 46      66  Senegal                                     Coral and the like
## 47      66  Senegal                                     Coral and the like
## 48      66  Senegal                                     Coral and the like
## 49      66  Senegal                                     Coral and the like
## 50      66  Senegal                                     Coral and the like
## 51      66  Senegal                                     Coral and the like
## 52      66  Senegal                                     Coral and the like
## 53      66  Senegal                                     Coral and the like
## 54      66  Senegal                                     Coral and the like
## 55      66  Senegal                                     Coral and the like
## 56      66  Senegal                                     Coral and the like
## 57      66  Senegal                                     Coral and the like
## 58      66  Senegal                                     Coral and the like
## 59      66  Senegal                                     Coral and the like
## 60      66  Senegal                                     Coral and the like
## 61      66  Senegal                                     Coral and the like
## 62      66  Senegal                                     Coral and the like
## 63      66  Senegal                                     Coral and the like
## 64      66  Senegal                                     Coral and the like
## 65      66  Senegal                                     Coral and the like
## 66      66  Senegal                                     Coral and the like
## 67      66  Senegal                                     Coral and the like
## 68      66  Senegal                                     Coral and the like
## 69      66  Senegal                                     Coral and the like
## 70      66  Senegal                                     Coral and the like
## 71      66  Senegal                                     Coral and the like
## 72      66  Senegal                                     Coral and the like
## 73      66  Senegal                                     Coral and the like
## 74      66  Senegal                                     Coral and the like
## 75      66  Senegal                                     Coral and the like
## 76      66  Senegal                                     Coral and the like
## 77      66  Senegal                                    Fish body oils, nei
## 78      66  Senegal                                    Fish body oils, nei
## 79      66  Senegal                                    Fish body oils, nei
## 80      66  Senegal                                    Fish body oils, nei
## 81      66  Senegal                                    Fish body oils, nei
## 82      66  Senegal                                    Fish body oils, nei
## 83      66  Senegal                                    Fish body oils, nei
## 84      66  Senegal                                    Fish body oils, nei
## 85      66  Senegal                                    Fish body oils, nei
## 86      66  Senegal                                    Fish body oils, nei
## 87      66  Senegal                                    Fish body oils, nei
## 88      66  Senegal                                    Fish body oils, nei
## 89      66  Senegal                                    Fish body oils, nei
## 90      66  Senegal                                    Fish body oils, nei
## 91      66  Senegal                                    Fish body oils, nei
## 92      66  Senegal                                    Fish body oils, nei
## 93      66  Senegal                                    Fish body oils, nei
## 94      66  Senegal                                    Fish body oils, nei
## 95      66  Senegal                                    Fish body oils, nei
## 96      66  Senegal                                    Fish body oils, nei
## 97      66  Senegal                                    Fish body oils, nei
## 98      66  Senegal                                    Fish body oils, nei
## 99      66  Senegal                                    Fish body oils, nei
## 100     66  Senegal                                    Fish body oils, nei
## 101     66  Senegal                                    Fish body oils, nei
## 102     66  Senegal                                    Fish body oils, nei
## 103     66  Senegal                                    Fish body oils, nei
## 104     66  Senegal                                    Fish body oils, nei
## 105     66  Senegal                                    Fish body oils, nei
## 106     66  Senegal                                    Fish body oils, nei
## 107     66  Senegal                                    Fish body oils, nei
## 108     66  Senegal                                    Fish body oils, nei
## 109     66  Senegal                                    Fish body oils, nei
## 110     66  Senegal                                    Fish body oils, nei
## 111     66  Senegal                                    Fish body oils, nei
## 112     66  Senegal                                    Fish body oils, nei
## 113     66  Senegal                                    Fish body oils, nei
## 114     66  Senegal                                    Fish body oils, nei
## 115     66  Senegal                                   Fish liver oils, nei
## 116     66  Senegal                                   Fish liver oils, nei
## 117     66  Senegal                                   Fish liver oils, nei
## 118     66  Senegal                                   Fish liver oils, nei
## 119     66  Senegal                                   Fish liver oils, nei
## 120     66  Senegal                                   Fish liver oils, nei
## 121     66  Senegal                                   Fish liver oils, nei
## 122     66  Senegal                                   Fish liver oils, nei
## 123     66  Senegal                                   Fish liver oils, nei
## 124     66  Senegal                                   Fish liver oils, nei
## 125     66  Senegal                                   Fish liver oils, nei
## 126     66  Senegal                                   Fish liver oils, nei
## 127     66  Senegal                                   Fish liver oils, nei
## 128     66  Senegal                                   Fish liver oils, nei
## 129     66  Senegal                                   Fish liver oils, nei
## 130     66  Senegal                                   Fish liver oils, nei
## 131     66  Senegal                                   Fish liver oils, nei
## 132     66  Senegal                                   Fish liver oils, nei
## 133     66  Senegal                                   Fish liver oils, nei
## 134     66  Senegal                                   Fish liver oils, nei
## 135     66  Senegal                                   Fish liver oils, nei
## 136     66  Senegal                                   Fish liver oils, nei
## 137     66  Senegal                                   Fish liver oils, nei
## 138     66  Senegal                                   Fish liver oils, nei
## 139     66  Senegal                                   Fish liver oils, nei
## 140     66  Senegal                                   Fish liver oils, nei
## 141     66  Senegal                                   Fish liver oils, nei
## 142     66  Senegal                                   Fish liver oils, nei
## 143     66  Senegal                                   Fish liver oils, nei
## 144     66  Senegal                                   Fish liver oils, nei
## 145     66  Senegal                                   Fish liver oils, nei
## 146     66  Senegal                                   Fish liver oils, nei
## 147     66  Senegal                                   Fish liver oils, nei
## 148     66  Senegal                                   Fish liver oils, nei
## 149     66  Senegal                                   Fish liver oils, nei
## 150     66  Senegal                                   Fish liver oils, nei
## 151     66  Senegal                                   Fish liver oils, nei
## 152     66  Senegal                                   Fish liver oils, nei
## 153     66  Senegal                                    Ornamental fish nei
## 154     66  Senegal                                    Ornamental fish nei
## 155     66  Senegal                                    Ornamental fish nei
## 156     66  Senegal                                    Ornamental fish nei
## 157     66  Senegal                                    Ornamental fish nei
## 158     66  Senegal                                    Ornamental fish nei
## 159     66  Senegal                                    Ornamental fish nei
## 160     66  Senegal                                    Ornamental fish nei
## 161     66  Senegal                                    Ornamental fish nei
## 162     66  Senegal                                    Ornamental fish nei
## 163     66  Senegal                                    Ornamental fish nei
## 164     66  Senegal                                    Ornamental fish nei
## 165     66  Senegal                                    Ornamental fish nei
## 166     66  Senegal                                    Ornamental fish nei
## 167     66  Senegal                                    Ornamental fish nei
## 168     66  Senegal                                    Ornamental fish nei
## 169     66  Senegal                                    Ornamental fish nei
## 170     66  Senegal                                    Ornamental fish nei
## 171     66  Senegal                                    Ornamental fish nei
## 172     66  Senegal                                    Ornamental fish nei
## 173     66  Senegal                                    Ornamental fish nei
## 174     66  Senegal                                    Ornamental fish nei
## 175     66  Senegal                                    Ornamental fish nei
## 176     66  Senegal                                    Ornamental fish nei
## 177     66  Senegal                                    Ornamental fish nei
## 178     66  Senegal                                    Ornamental fish nei
## 179     66  Senegal                                    Ornamental fish nei
## 180     66  Senegal                                    Ornamental fish nei
## 181     66  Senegal                                    Ornamental fish nei
## 182     66  Senegal                                    Ornamental fish nei
## 183     66  Senegal                                    Ornamental fish nei
## 184     66  Senegal                                    Ornamental fish nei
## 185     66  Senegal                                    Ornamental fish nei
## 186     66  Senegal                                    Ornamental fish nei
## 187     66  Senegal                                    Ornamental fish nei
## 188     66  Senegal                                    Ornamental fish nei
## 189     66  Senegal                                    Ornamental fish nei
## 190     66  Senegal                                    Ornamental fish nei
## 191     66  Senegal Other seaweeds and aquatic plants and products thereof
## 192     66  Senegal Other seaweeds and aquatic plants and products thereof
## 193     66  Senegal Other seaweeds and aquatic plants and products thereof
## 194     66  Senegal Other seaweeds and aquatic plants and products thereof
## 195     66  Senegal Other seaweeds and aquatic plants and products thereof
## 196     66  Senegal Other seaweeds and aquatic plants and products thereof
## 197     66  Senegal Other seaweeds and aquatic plants and products thereof
## 198     66  Senegal Other seaweeds and aquatic plants and products thereof
## 199     66  Senegal Other seaweeds and aquatic plants and products thereof
## 200     66  Senegal Other seaweeds and aquatic plants and products thereof
## 201     66  Senegal Other seaweeds and aquatic plants and products thereof
## 202     66  Senegal Other seaweeds and aquatic plants and products thereof
## 203     66  Senegal Other seaweeds and aquatic plants and products thereof
## 204     66  Senegal Other seaweeds and aquatic plants and products thereof
## 205     66  Senegal Other seaweeds and aquatic plants and products thereof
## 206     66  Senegal Other seaweeds and aquatic plants and products thereof
## 207     66  Senegal Other seaweeds and aquatic plants and products thereof
## 208     66  Senegal Other seaweeds and aquatic plants and products thereof
## 209     66  Senegal Other seaweeds and aquatic plants and products thereof
## 210     66  Senegal Other seaweeds and aquatic plants and products thereof
## 211     66  Senegal Other seaweeds and aquatic plants and products thereof
## 212     66  Senegal Other seaweeds and aquatic plants and products thereof
## 213     66  Senegal Other seaweeds and aquatic plants and products thereof
## 214     66  Senegal Other seaweeds and aquatic plants and products thereof
## 215     66  Senegal Other seaweeds and aquatic plants and products thereof
## 216     66  Senegal Other seaweeds and aquatic plants and products thereof
## 217     66  Senegal Other seaweeds and aquatic plants and products thereof
## 218     66  Senegal Other seaweeds and aquatic plants and products thereof
## 219     66  Senegal Other seaweeds and aquatic plants and products thereof
## 220     66  Senegal Other seaweeds and aquatic plants and products thereof
## 221     66  Senegal Other seaweeds and aquatic plants and products thereof
## 222     66  Senegal Other seaweeds and aquatic plants and products thereof
## 223     66  Senegal Other seaweeds and aquatic plants and products thereof
## 224     66  Senegal Other seaweeds and aquatic plants and products thereof
## 225     66  Senegal Other seaweeds and aquatic plants and products thereof
## 226     66  Senegal Other seaweeds and aquatic plants and products thereof
## 227     66  Senegal Other seaweeds and aquatic plants and products thereof
## 228     66  Senegal Other seaweeds and aquatic plants and products thereof
##         product year    usd
## 1      fish_oil 1976     NA
## 2      fish_oil 1977     NA
## 3      fish_oil 1978     NA
## 4      fish_oil 1979  150.0
## 5      fish_oil 1980   16.0
## 6      fish_oil 1981   69.0
## 7      fish_oil 1982     NA
## 8      fish_oil 1983     NA
## 9      fish_oil 1984     NA
## 10     fish_oil 1985    4.0
## 11     fish_oil 1986    1.0
## 12     fish_oil 1987   30.0
## 13     fish_oil 1988     NA
## 14     fish_oil 1989   90.0
## 15     fish_oil 1990   42.0
## 16     fish_oil 1991   60.0
## 17     fish_oil 1992   33.0
## 18     fish_oil 1993    3.0
## 19     fish_oil 1994     NA
## 20     fish_oil 1995     NA
## 21     fish_oil 1996     NA
## 22     fish_oil 1997     NA
## 23     fish_oil 1998   24.0
## 24     fish_oil 1999    0.0
## 25     fish_oil 2000    2.0
## 26     fish_oil 2001    0.0
## 27     fish_oil 2002    0.0
## 28     fish_oil 2003    0.0
## 29     fish_oil 2004    0.0
## 30     fish_oil 2005    0.0
## 31     fish_oil 2006    0.0
## 32     fish_oil 2007    0.0
## 33     fish_oil 2008    0.0
## 34     fish_oil 2009    0.0
## 35     fish_oil 2010    0.0
## 36     fish_oil 2011    0.0
## 37     fish_oil 2012    0.0
## 38     fish_oil 2013    0.0
## 39       corals 1976     NA
## 40       corals 1977     NA
## 41       corals 1978     NA
## 42       corals 1979     NA
## 43       corals 1980     NA
## 44       corals 1981     NA
## 45       corals 1982     NA
## 46       corals 1983     NA
## 47       corals 1984     NA
## 48       corals 1985     NA
## 49       corals 1986     NA
## 50       corals 1987     NA
## 51       corals 1988     NA
## 52       corals 1989     NA
## 53       corals 1990     NA
## 54       corals 1991     NA
## 55       corals 1992     NA
## 56       corals 1993     NA
## 57       corals 1994     NA
## 58       corals 1995     NA
## 59       corals 1996     NA
## 60       corals 1997     NA
## 61       corals 1998 2106.0
## 62       corals 1999   22.0
## 63       corals 2000    0.0
## 64       corals 2001    0.0
## 65       corals 2002   32.0
## 66       corals 2003    0.0
## 67       corals 2004    0.0
## 68       corals 2005    0.0
## 69       corals 2006    0.0
## 70       corals 2007    0.0
## 71       corals 2008    0.1
## 72       corals 2009    1.0
## 73       corals 2010    2.0
## 74       corals 2011   32.0
## 75       corals 2012    8.0
## 76       corals 2013    4.0
## 77     fish_oil 1976     NA
## 78     fish_oil 1977     NA
## 79     fish_oil 1978     NA
## 80     fish_oil 1979     NA
## 81     fish_oil 1980     NA
## 82     fish_oil 1981     NA
## 83     fish_oil 1982     NA
## 84     fish_oil 1983     NA
## 85     fish_oil 1984     NA
## 86     fish_oil 1985     NA
## 87     fish_oil 1986     NA
## 88     fish_oil 1987     NA
## 89     fish_oil 1988     NA
## 90     fish_oil 1989     NA
## 91     fish_oil 1990     NA
## 92     fish_oil 1991     NA
## 93     fish_oil 1992     NA
## 94     fish_oil 1993     NA
## 95     fish_oil 1994     NA
## 96     fish_oil 1995     NA
## 97     fish_oil 1996     NA
## 98     fish_oil 1997     NA
## 99     fish_oil 1998     NA
## 100    fish_oil 1999     NA
## 101    fish_oil 2000     NA
## 102    fish_oil 2001     NA
## 103    fish_oil 2002     NA
## 104    fish_oil 2003     NA
## 105    fish_oil 2004   35.0
## 106    fish_oil 2005    0.0
## 107    fish_oil 2006    0.0
## 108    fish_oil 2007  124.0
## 109    fish_oil 2008  187.0
## 110    fish_oil 2009    7.0
## 111    fish_oil 2010    0.0
## 112    fish_oil 2011    0.0
## 113    fish_oil 2012    9.0
## 114    fish_oil 2013  212.0
## 115    fish_oil 1976     NA
## 116    fish_oil 1977     NA
## 117    fish_oil 1978     NA
## 118    fish_oil 1979     NA
## 119    fish_oil 1980     NA
## 120    fish_oil 1981     NA
## 121    fish_oil 1982     NA
## 122    fish_oil 1983     NA
## 123    fish_oil 1984     NA
## 124    fish_oil 1985     NA
## 125    fish_oil 1986     NA
## 126    fish_oil 1987     NA
## 127    fish_oil 1988     NA
## 128    fish_oil 1989     NA
## 129    fish_oil 1990     NA
## 130    fish_oil 1991     NA
## 131    fish_oil 1992     NA
## 132    fish_oil 1993     NA
## 133    fish_oil 1994     NA
## 134    fish_oil 1995  100.0
## 135    fish_oil 1996  109.0
## 136    fish_oil 1997     NA
## 137    fish_oil 1998     NA
## 138    fish_oil 1999    3.0
## 139    fish_oil 2000     NA
## 140    fish_oil 2001     NA
## 141    fish_oil 2002   40.0
## 142    fish_oil 2003     NA
## 143    fish_oil 2004   16.0
## 144    fish_oil 2005     NA
## 145    fish_oil 2006   19.0
## 146    fish_oil 2007  256.0
## 147    fish_oil 2008  287.0
## 148    fish_oil 2009   71.0
## 149    fish_oil 2010    0.0
## 150    fish_oil 2011   80.0
## 151    fish_oil 2012    0.0
## 152    fish_oil 2013  134.0
## 153 ornamentals 1976     NA
## 154 ornamentals 1977     NA
## 155 ornamentals 1978     NA
## 156 ornamentals 1979     NA
## 157 ornamentals 1980     NA
## 158 ornamentals 1981     NA
## 159 ornamentals 1982     NA
## 160 ornamentals 1983     NA
## 161 ornamentals 1984     NA
## 162 ornamentals 1985     NA
## 163 ornamentals 1986     NA
## 164 ornamentals 1987     NA
## 165 ornamentals 1988     NA
## 166 ornamentals 1989     NA
## 167 ornamentals 1990     NA
## 168 ornamentals 1991     NA
## 169 ornamentals 1992     NA
## 170 ornamentals 1993     NA
## 171 ornamentals 1994     NA
## 172 ornamentals 1995     NA
## 173 ornamentals 1996     NA
## 174 ornamentals 1997     NA
## 175 ornamentals 1998     NA
## 176 ornamentals 1999     NA
## 177 ornamentals 2000     NA
## 178 ornamentals 2001     NA
## 179 ornamentals 2002   11.0
## 180 ornamentals 2003    0.0
## 181 ornamentals 2004    0.0
## 182 ornamentals 2005    0.0
## 183 ornamentals 2006    0.0
## 184 ornamentals 2007    0.0
## 185 ornamentals 2008    0.0
## 186 ornamentals 2009    0.0
## 187 ornamentals 2010    0.0
## 188 ornamentals 2011    0.0
## 189 ornamentals 2012    0.0
## 190 ornamentals 2013    0.0
## 191    seaweeds 1976     NA
## 192    seaweeds 1977     NA
## 193    seaweeds 1978     NA
## 194    seaweeds 1979     NA
## 195    seaweeds 1980     NA
## 196    seaweeds 1981     NA
## 197    seaweeds 1982     NA
## 198    seaweeds 1983     NA
## 199    seaweeds 1984     NA
## 200    seaweeds 1985     NA
## 201    seaweeds 1986     NA
## 202    seaweeds 1987     NA
## 203    seaweeds 1988     NA
## 204    seaweeds 1989     NA
## 205    seaweeds 1990     NA
## 206    seaweeds 1991     NA
## 207    seaweeds 1992     NA
## 208    seaweeds 1993     NA
## 209    seaweeds 1994     NA
## 210    seaweeds 1995     NA
## 211    seaweeds 1996     NA
## 212    seaweeds 1997     NA
## 213    seaweeds 1998  343.0
## 214    seaweeds 1999     NA
## 215    seaweeds 2000   13.0
## 216    seaweeds 2001   35.0
## 217    seaweeds 2002   76.0
## 218    seaweeds 2003  169.0
## 219    seaweeds 2004  124.0
## 220    seaweeds 2005   30.0
## 221    seaweeds 2006   22.0
## 222    seaweeds 2007    2.0
## 223    seaweeds 2008    0.0
## 224    seaweeds 2009   51.0
## 225    seaweeds 2010   37.0
## 226    seaweeds 2011   20.0
## 227    seaweeds 2012  118.0
## 228    seaweeds 2013   20.0
old <- read.csv("../v2014_test/intermediate/usd.csv")
filter(old, rgn_id==66) %>%
  arrange(commodity, year)
##     rgn_id                                              commodity  product
## 1       66                                     Clupeoid oils, nei fish_oil
## 2       66                                     Clupeoid oils, nei fish_oil
## 3       66                                     Clupeoid oils, nei fish_oil
## 4       66                                     Clupeoid oils, nei fish_oil
## 5       66                                     Clupeoid oils, nei fish_oil
## 6       66                                     Clupeoid oils, nei fish_oil
## 7       66                                     Clupeoid oils, nei fish_oil
## 8       66                                     Clupeoid oils, nei fish_oil
## 9       66                                     Clupeoid oils, nei fish_oil
## 10      66                                     Clupeoid oils, nei fish_oil
## 11      66                                     Clupeoid oils, nei fish_oil
## 12      66                                     Clupeoid oils, nei fish_oil
## 13      66                                     Clupeoid oils, nei fish_oil
## 14      66                                     Clupeoid oils, nei fish_oil
## 15      66                                     Clupeoid oils, nei fish_oil
## 16      66                                     Clupeoid oils, nei fish_oil
## 17      66                                     Clupeoid oils, nei fish_oil
## 18      66                                     Clupeoid oils, nei fish_oil
## 19      66                                     Clupeoid oils, nei fish_oil
## 20      66                                     Clupeoid oils, nei fish_oil
## 21      66                                     Clupeoid oils, nei fish_oil
## 22      66                                     Clupeoid oils, nei fish_oil
## 23      66                                     Clupeoid oils, nei fish_oil
## 24      66                                     Clupeoid oils, nei fish_oil
## 25      66                                     Clupeoid oils, nei fish_oil
## 26      66                                     Clupeoid oils, nei fish_oil
## 27      66                                     Clupeoid oils, nei fish_oil
## 28      66                                     Clupeoid oils, nei fish_oil
## 29      66                                     Clupeoid oils, nei fish_oil
## 30      66                                     Clupeoid oils, nei fish_oil
## 31      66                                     Clupeoid oils, nei fish_oil
## 32      66                                     Clupeoid oils, nei fish_oil
## 33      66                                     Clupeoid oils, nei fish_oil
## 34      66                                     Clupeoid oils, nei fish_oil
## 35      66                                     Clupeoid oils, nei fish_oil
## 36      66                                     Clupeoid oils, nei fish_oil
## 37      66                                     Coral and the like   corals
## 38      66                                     Coral and the like   corals
## 39      66                                     Coral and the like   corals
## 40      66                                     Coral and the like   corals
## 41      66                                     Coral and the like   corals
## 42      66                                     Coral and the like   corals
## 43      66                                     Coral and the like   corals
## 44      66                                     Coral and the like   corals
## 45      66                                     Coral and the like   corals
## 46      66                                     Coral and the like   corals
## 47      66                                     Coral and the like   corals
## 48      66                                     Coral and the like   corals
## 49      66                                     Coral and the like   corals
## 50      66                                     Coral and the like   corals
## 51      66                                     Coral and the like   corals
## 52      66                                     Coral and the like   corals
## 53      66                                     Coral and the like   corals
## 54      66                                     Coral and the like   corals
## 55      66                                     Coral and the like   corals
## 56      66                                     Coral and the like   corals
## 57      66                                     Coral and the like   corals
## 58      66                                     Coral and the like   corals
## 59      66                                     Coral and the like   corals
## 60      66                                     Coral and the like   corals
## 61      66                                     Coral and the like   corals
## 62      66                                     Coral and the like   corals
## 63      66                                     Coral and the like   corals
## 64      66                                     Coral and the like   corals
## 65      66                                     Coral and the like   corals
## 66      66                                     Coral and the like   corals
## 67      66                                     Coral and the like   corals
## 68      66                                     Coral and the like   corals
## 69      66                                     Coral and the like   corals
## 70      66                                     Coral and the like   corals
## 71      66                                     Coral and the like   corals
## 72      66                                     Coral and the like   corals
## 73      66                                    Fish body oils, nei fish_oil
## 74      66                                    Fish body oils, nei fish_oil
## 75      66                                    Fish body oils, nei fish_oil
## 76      66                                    Fish body oils, nei fish_oil
## 77      66                                    Fish body oils, nei fish_oil
## 78      66                                    Fish body oils, nei fish_oil
## 79      66                                    Fish body oils, nei fish_oil
## 80      66                                    Fish body oils, nei fish_oil
## 81      66                                    Fish body oils, nei fish_oil
## 82      66                                    Fish body oils, nei fish_oil
## 83      66                                    Fish body oils, nei fish_oil
## 84      66                                    Fish body oils, nei fish_oil
## 85      66                                    Fish body oils, nei fish_oil
## 86      66                                    Fish body oils, nei fish_oil
## 87      66                                    Fish body oils, nei fish_oil
## 88      66                                    Fish body oils, nei fish_oil
## 89      66                                    Fish body oils, nei fish_oil
## 90      66                                    Fish body oils, nei fish_oil
## 91      66                                    Fish body oils, nei fish_oil
## 92      66                                    Fish body oils, nei fish_oil
## 93      66                                    Fish body oils, nei fish_oil
## 94      66                                    Fish body oils, nei fish_oil
## 95      66                                    Fish body oils, nei fish_oil
## 96      66                                    Fish body oils, nei fish_oil
## 97      66                                    Fish body oils, nei fish_oil
## 98      66                                    Fish body oils, nei fish_oil
## 99      66                                    Fish body oils, nei fish_oil
## 100     66                                    Fish body oils, nei fish_oil
## 101     66                                    Fish body oils, nei fish_oil
## 102     66                                    Fish body oils, nei fish_oil
## 103     66                                    Fish body oils, nei fish_oil
## 104     66                                    Fish body oils, nei fish_oil
## 105     66                                    Fish body oils, nei fish_oil
## 106     66                                    Fish body oils, nei fish_oil
## 107     66                                    Fish body oils, nei fish_oil
## 108     66                                    Fish body oils, nei fish_oil
## 109     66                                   Fish liver oils, nei fish_oil
## 110     66                                   Fish liver oils, nei fish_oil
## 111     66                                   Fish liver oils, nei fish_oil
## 112     66                                   Fish liver oils, nei fish_oil
## 113     66                                   Fish liver oils, nei fish_oil
## 114     66                                   Fish liver oils, nei fish_oil
## 115     66                                   Fish liver oils, nei fish_oil
## 116     66                                   Fish liver oils, nei fish_oil
## 117     66                                   Fish liver oils, nei fish_oil
## 118     66                                   Fish liver oils, nei fish_oil
## 119     66                                   Fish liver oils, nei fish_oil
## 120     66                                   Fish liver oils, nei fish_oil
## 121     66                                   Fish liver oils, nei fish_oil
## 122     66                                   Fish liver oils, nei fish_oil
## 123     66                                   Fish liver oils, nei fish_oil
## 124     66                                   Fish liver oils, nei fish_oil
## 125     66                                   Fish liver oils, nei fish_oil
## 126     66                                   Fish liver oils, nei fish_oil
## 127     66                                   Fish liver oils, nei fish_oil
## 128     66                                   Fish liver oils, nei fish_oil
## 129     66                                   Fish liver oils, nei fish_oil
## 130     66                                   Fish liver oils, nei fish_oil
## 131     66                                   Fish liver oils, nei fish_oil
## 132     66                                   Fish liver oils, nei fish_oil
## 133     66                                   Fish liver oils, nei fish_oil
## 134     66                                   Fish liver oils, nei fish_oil
## 135     66                                   Fish liver oils, nei fish_oil
## 136     66                                   Fish liver oils, nei fish_oil
## 137     66                                   Fish liver oils, nei fish_oil
## 138     66                                   Fish liver oils, nei fish_oil
## 139     66                                   Fish liver oils, nei fish_oil
## 140     66                                   Fish liver oils, nei fish_oil
## 141     66                                   Fish liver oils, nei fish_oil
## 142     66                                   Fish liver oils, nei fish_oil
## 143     66                                   Fish liver oils, nei fish_oil
## 144     66                                   Fish liver oils, nei fish_oil
## 145     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 146     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 147     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 148     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 149     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 150     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 151     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 152     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 153     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 154     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 155     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 156     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 157     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 158     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 159     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 160     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 161     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 162     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 163     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 164     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 165     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 166     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 167     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 168     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 169     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 170     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 171     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 172     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 173     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 174     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 175     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 176     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 177     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 178     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 179     66 Other seaweeds and aquatic plants and products thereof seaweeds
## 180     66 Other seaweeds and aquatic plants and products thereof seaweeds
##     year    usd rgn_name
## 1   1976     NA  Senegal
## 2   1977     NA  Senegal
## 3   1978     NA  Senegal
## 4   1979  150.0  Senegal
## 5   1980   16.0  Senegal
## 6   1981   69.0  Senegal
## 7   1982     NA  Senegal
## 8   1983     NA  Senegal
## 9   1984     NA  Senegal
## 10  1985    4.0  Senegal
## 11  1986    1.0  Senegal
## 12  1987   30.0  Senegal
## 13  1988     NA  Senegal
## 14  1989   90.0  Senegal
## 15  1990   42.0  Senegal
## 16  1991   60.0  Senegal
## 17  1992   33.0  Senegal
## 18  1993    3.0  Senegal
## 19  1994     NA  Senegal
## 20  1995     NA  Senegal
## 21  1996     NA  Senegal
## 22  1997     NA  Senegal
## 23  1998   24.0  Senegal
## 24  1999    0.0  Senegal
## 25  2000    2.0  Senegal
## 26  2001    0.0  Senegal
## 27  2002    0.0  Senegal
## 28  2003    0.0  Senegal
## 29  2004    0.0  Senegal
## 30  2005    0.0  Senegal
## 31  2006    0.0  Senegal
## 32  2007    0.0  Senegal
## 33  2008    0.0  Senegal
## 34  2009    0.0  Senegal
## 35  2010    0.0  Senegal
## 36  2011    0.0  Senegal
## 37  1976     NA  Senegal
## 38  1977     NA  Senegal
## 39  1978     NA  Senegal
## 40  1979     NA  Senegal
## 41  1980     NA  Senegal
## 42  1981     NA  Senegal
## 43  1982     NA  Senegal
## 44  1983     NA  Senegal
## 45  1984     NA  Senegal
## 46  1985     NA  Senegal
## 47  1986     NA  Senegal
## 48  1987     NA  Senegal
## 49  1988     NA  Senegal
## 50  1989     NA  Senegal
## 51  1990     NA  Senegal
## 52  1991     NA  Senegal
## 53  1992     NA  Senegal
## 54  1993     NA  Senegal
## 55  1994     NA  Senegal
## 56  1995     NA  Senegal
## 57  1996     NA  Senegal
## 58  1997     NA  Senegal
## 59  1998 2106.0  Senegal
## 60  1999   22.0  Senegal
## 61  2000    0.0  Senegal
## 62  2001    0.0  Senegal
## 63  2002    0.0  Senegal
## 64  2003    0.0  Senegal
## 65  2004    0.0  Senegal
## 66  2005    0.0  Senegal
## 67  2006    0.0  Senegal
## 68  2007    0.0  Senegal
## 69  2008    0.1  Senegal
## 70  2009    1.0  Senegal
## 71  2010    2.0  Senegal
## 72  2011   32.0  Senegal
## 73  1976     NA  Senegal
## 74  1977     NA  Senegal
## 75  1978     NA  Senegal
## 76  1979     NA  Senegal
## 77  1980     NA  Senegal
## 78  1981     NA  Senegal
## 79  1982     NA  Senegal
## 80  1983     NA  Senegal
## 81  1984     NA  Senegal
## 82  1985     NA  Senegal
## 83  1986     NA  Senegal
## 84  1987     NA  Senegal
## 85  1988     NA  Senegal
## 86  1989     NA  Senegal
## 87  1990     NA  Senegal
## 88  1991     NA  Senegal
## 89  1992     NA  Senegal
## 90  1993     NA  Senegal
## 91  1994     NA  Senegal
## 92  1995     NA  Senegal
## 93  1996     NA  Senegal
## 94  1997     NA  Senegal
## 95  1998     NA  Senegal
## 96  1999     NA  Senegal
## 97  2000     NA  Senegal
## 98  2001     NA  Senegal
## 99  2002    0.0  Senegal
## 100 2003     NA  Senegal
## 101 2004   35.0  Senegal
## 102 2005    0.0  Senegal
## 103 2006    0.0  Senegal
## 104 2007  124.0  Senegal
## 105 2008  187.0  Senegal
## 106 2009    7.0  Senegal
## 107 2010    0.0  Senegal
## 108 2011    0.0  Senegal
## 109 1976     NA  Senegal
## 110 1977     NA  Senegal
## 111 1978     NA  Senegal
## 112 1979     NA  Senegal
## 113 1980     NA  Senegal
## 114 1981     NA  Senegal
## 115 1982     NA  Senegal
## 116 1983     NA  Senegal
## 117 1984     NA  Senegal
## 118 1985     NA  Senegal
## 119 1986     NA  Senegal
## 120 1987     NA  Senegal
## 121 1988     NA  Senegal
## 122 1989     NA  Senegal
## 123 1990     NA  Senegal
## 124 1991     NA  Senegal
## 125 1992     NA  Senegal
## 126 1993     NA  Senegal
## 127 1994     NA  Senegal
## 128 1995  100.0  Senegal
## 129 1996  109.0  Senegal
## 130 1997     NA  Senegal
## 131 1998     NA  Senegal
## 132 1999    3.0  Senegal
## 133 2000     NA  Senegal
## 134 2001     NA  Senegal
## 135 2002    0.0  Senegal
## 136 2003     NA  Senegal
## 137 2004   16.0  Senegal
## 138 2005     NA  Senegal
## 139 2006   19.0  Senegal
## 140 2007  256.0  Senegal
## 141 2008  287.0  Senegal
## 142 2009   71.0  Senegal
## 143 2010    0.0  Senegal
## 144 2011   80.0  Senegal
## 145 1976     NA  Senegal
## 146 1977     NA  Senegal
## 147 1978     NA  Senegal
## 148 1979     NA  Senegal
## 149 1980     NA  Senegal
## 150 1981     NA  Senegal
## 151 1982     NA  Senegal
## 152 1983     NA  Senegal
## 153 1984     NA  Senegal
## 154 1985     NA  Senegal
## 155 1986     NA  Senegal
## 156 1987     NA  Senegal
## 157 1988     NA  Senegal
## 158 1989     NA  Senegal
## 159 1990     NA  Senegal
## 160 1991     NA  Senegal
## 161 1992     NA  Senegal
## 162 1993     NA  Senegal
## 163 1994     NA  Senegal
## 164 1995     NA  Senegal
## 165 1996     NA  Senegal
## 166 1997     NA  Senegal
## 167 1998  343.0  Senegal
## 168 1999     NA  Senegal
## 169 2000   13.0  Senegal
## 170 2001   35.0  Senegal
## 171 2002   29.0  Senegal
## 172 2003  169.0  Senegal
## 173 2004  124.0  Senegal
## 174 2005   30.0  Senegal
## 175 2006   22.0  Senegal
## 176 2007    2.0  Senegal
## 177 2008    0.0  Senegal
## 178 2009   51.0  Senegal
## 179 2010   37.0  Senegal
## 180 2011   20.0  Senegal
new <- read.csv('output/np_harvest_tonnes.csv') %>%
filter(rgn_id==66)
old <- read.csv('../v2014_test/data/np_harvest_tonnes_eez2014_test-year_max_2011.csv') %>%
filter(rgn_id==66)
left_join(old, new, by=c("rgn_id", "product", "year"))
##    rgn_id  product year  tonnes.x  tonnes.y
## 1      66   corals 1998 1250.0000 1250.0000
## 2      66   corals 1999  636.5000  636.5000
## 3      66   corals 2000  424.3333  424.3333
## 4      66   corals 2001  318.2500  318.2500
## 5      66   corals 2002    5.7500    6.7500
## 6      66   corals 2003    0.0000    1.0000
## 7      66   corals 2004    0.0000    1.0000
## 8      66   corals 2005    0.0000    1.0000
## 9      66   corals 2006    0.0000    0.0000
## 10     66   corals 2007    0.0000    0.0000
## 11     66   corals 2008    0.0250    0.0250
## 12     66   corals 2009    5.5250    5.5250
## 13     66   corals 2010    5.7750    5.7750
## 14     66   corals 2011   56.2750   56.2750
## 15     66 fish_oil 1979  374.0000  374.0000
## 16     66 fish_oil 1980  189.5000  189.5000
## 17     66 fish_oil 1981  210.6667  210.6667
## 18     66 fish_oil 1982  158.0000  158.0000
## 19     66 fish_oil 1983   64.5000   64.5000
## 20     66 fish_oil 1984   63.2500   63.2500
## 21     66 fish_oil 1985    3.7500    3.7500
## 22     66 fish_oil 1986    4.5000    4.5000
## 23     66 fish_oil 1987    7.0000    7.0000
## 24     66 fish_oil 1988    7.0000    7.0000
## 25     66 fish_oil 1989   11.2500   11.2500
## 26     66 fish_oil 1990   21.7500   21.7500
## 27     66 fish_oil 1991   26.7500   26.7500
## 28     66 fish_oil 1992   32.7500   32.7500
## 29     66 fish_oil 1993   29.5000   29.5000
## 30     66 fish_oil 1994   18.2500   18.2500
## 31     66 fish_oil 1995   40.7500   40.7500
## 32     66 fish_oil 1996   55.7500   55.7500
## 33     66 fish_oil 1997   51.0000   51.0000
## 34     66 fish_oil 1998   56.2500   56.2500
## 35     66 fish_oil 1999   26.5000   26.5000
## 36     66 fish_oil 2000    8.0000    8.0000
## 37     66 fish_oil 2001    8.0000    8.0000
## 38     66 fish_oil 2002    2.7500    8.7500
## 39     66 fish_oil 2003    2.5000    8.5000
## 40     66 fish_oil 2004    3.5000    9.5000
## 41     66 fish_oil 2005    3.5000    9.5000
## 42     66 fish_oil 2006    4.5000    4.5000
## 43     66 fish_oil 2007   14.5000   14.5000
## 44     66 fish_oil 2008  268.0000  268.0000
## 45     66 fish_oil 2009  273.7500  273.7500
## 46     66 fish_oil 2010  272.7500  272.7500
## 47     66 fish_oil 2011  270.2500  270.2500
## 48     66 seaweeds 1998  560.0000  560.0000
## 49     66 seaweeds 1999  280.0000  280.0000
## 50     66 seaweeds 2000  189.0000  189.0000
## 51     66 seaweeds 2001  147.0000  147.0000
## 52     66 seaweeds 2002   16.2500   23.5000
## 53     66 seaweeds 2003   35.7500   43.0000
## 54     66 seaweeds 2004   47.7500   55.0000
## 55     66 seaweeds 2005   46.0000   53.2500
## 56     66 seaweeds 2006   39.5000   39.5000
## 57     66 seaweeds 2007   20.0250   20.0250
## 58     66 seaweeds 2008    6.2750    6.2750
## 59     66 seaweeds 2009    9.0250    9.0250
## 60     66 seaweeds 2010   12.7750   12.7750
## 61     66 seaweeds 2011   17.5000   17.5000