Learn R Programming

oec (version 2.5.2)

network: Creates a network of exports for a given year

Description

Creates a network of exports for a given year

Usage

network(origin, dest, year, classification)

Arguments

origin

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

dest

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

year

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

classification

Trade classification that can be "1" (HS92 4 characters since year 1995) or "2" (SITC rev.2 4 characters since year 1962)

Value

Creates an HTML file with a network visualization for a given year.

Examples

Run this code
# NOT RUN {
# Run countries_list() to display the full list of countries
# For the example Chile is "chl" and China is "chn"

# What are the export opportunities of Chile?
# Year 2015, trade with China (HS92 4 characters)
# network("chl", "chn", 2015)
# network("chl", "chn", 2015, 1) # equivalent to last command
# }

Run the code above in your browser using DataLab