getdata: Downloads and processes the data from the API

Description Usage Arguments Examples

Description

Downloads and processes the data from the API

Usage

1
getdata(origin, destination, classification, year)

Arguments

origin

is the country code of origin (e.g. "chl" for Chile)

destination

is the country code of origin (e.g. "chn" for China)

classification

refers to the trade classification that can be "6" (HS92 6 characters) or "8" (HS92 8 characters) for the year 1995 and going or "4" (SITC rev.2 4 characters) for the year 1962 and ongoing

year

is the year and the OEC's API ranges from 1962 to 2014

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Run countries_list() to display the full list of countries
# Chile is "chl" and China is "chn"

# Download Chile (chl) and China (chn) trade data (imports, export and trade balance)
getdata("chl", "chn", 6, 2010)

# Download trade data from OEC's API (HS92 6 characters product lists)
getdata("chl", "chn", 6, 2010)

# Download trade data from OEC's API (SITC rev.2 4 characters product lists)
getdata("chl", "chn", 4, 2010)


Search within the oec package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.