Description Usage Arguments Value Examples
load a JSON file from the comtrade API in the temp directory The API is documented at http://comtrade.un.org/data/doc/api/ Converts the file to a dataframe Further information for developers is available at https://comtrade.un.org/Data/Doc/API
1 2 | loadcomtradebycode(productcode, reportercode, year, freq = "A",
px = "HS", max = 50000, logfile = FALSE)
|
productcode |
code of the product |
reportercode |
geographical area or country code |
year |
a vector of years (maximum 5), or the chain of character "recent" |
freq |
the frequency: "A" Annual, "M" Monthly |
px |
Trade data classification scheme |
max |
maximum records returned |
a dataframe
1 2 3 4 5 6 7 | ## Not run:
library(tradeflows)
# Load trade data from Comtrade
# "other sawnwood" trade France in 2018
loadcomtradebycode(440799, 251, 2018)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.