API (Application Program Interface) は,ソフトウェア間で機能を共有する仕組み (命令,関数等の集合) のことをいう.APIを用いることで,遠隔地にあるコンピュータやサーバーが提供する機能・データを,他のソフトウェア (ここではR) で利用できる.
近年の大規模なデータベースでは,「クリック」してデータセット (の一部) をダウンロードするサービスに加えて,APIを用いてデータセットを取得できることが多い. 昨日の授業で利用したUN ComtradeでもAPIが利用可能で,これを利用すれば「ポチポチ」ではなくRを通してデータを取得し解析に進むことができる.
以下ではAPI一般の技術的な解説は省略し,UN ComtradeのAPIを利用してデータを取得するRコードの解説に集中する.
Rのデフォルト環境ではこうした作業を行なうことはできないので,必要なパッケージを読み込む.
library(pathological)
library(RCurl)
library(RJSONIO)
library(stringr)
library(tidyverse)
また,ファイルをダウンロードした先が分からなくなると (あるいは,意図していない場所に保存されると) いけないので,ダウンロードしたファイルを保存するディレクトリを設定する. 下記のパスは教員 (伊藤) のMacにあわせてあるので,各自実行する際にはdir_path
に指定するディレクトリを自分のPC/Macにあわせて変更しなくてはならない.
dir_path <- "/Users/Gaku/Dropbox/040-ToyamaNIHU/090-ToyamaTeaching/010-Intro2econometrics/020-data/02010-ComtradeSample"
create_dirs(dir_path)
## /Users/Gaku/Dropbox/040-ToyamaNIHU/090-ToyamaTeaching/010-Intro2econometrics/020-data/02010-ComtradeSample
## FALSE
1行目では,dir_path
に作業ディレクトリへのパスを格納している.
2行目のcreate_dirs(dir_path)
では,dir_path
のディレクトリを新たに作成している.「ディレクトリ (フォルダ) を作る」というと右クリックしたくなるかもしれないが,そんなことをしなくてもこのpathological::create_dirs
で簡単に作成 (自動化) できる. pathological::create_dirs
関数は,存在しないディレクトリが指定された場合はディレクトリを作成し,既に存在するディレクトリへのパスが引数に指定された場合はFALSE
を返す (ここではFALSE
が返ってきている).?pathological
とRのコンソールに打てば,このパッケージが提供する他の便利な関数の解説が表示されるので,時間があるときに一読を勧める.
素晴らしいことに,UN ComtradeではAPIを用いてデータセットを取得するRの関数を提供している (公式サイト).ただし,このRコードは一部が既に利用できず,また関数にも改善点があるので修正を加えた新たな関数を定義しよう.
Comtradeをはじめ,複数の国家 (で) の観測値を含むデータセットの多くは,2~3の数字・文字列からなる国コード (country code) を用いて個々の国家を区別することが多い.一般的に用いられる国コードは複数の種類があるが,国コードを用いることで別々のデータセットを簡単に接合することもできる.
まず,Comtradeが用いる国コードを取得しよう.
# Pull out info from json
json_file = file.path(dir_path, "reporters.json")
json_url = "https://comtrade.un.org/data/cache/partnerAreas.json"
curl = getCurlHandle()
reporters = RJSONIO::fromJSON(getURL(json_url, curl=curl))
reporters = t(sapply(reporters$results,rbind))
reporters_df = as.data.frame(reporters)
reporters_df = data_frame(ccode = unlist(reporters_df[,1]), country = unlist(reporters_df[,2]))
## Save as csv
csv_path = file.path(dir_path, "reporters.csv") # 修正
write_csv(reporters_df, path = csv_path) # 修正
## Read info from local csv
reporters = read_csv(csv_path, skip=1) # 修正
names(reporters) = c("ccode", "cname")
reporters
## # A tibble: 292 × 2
## ccode cname
## <int> <chr>
## 1 0 World
## 2 4 Afghanistan
## 3 472 Africa CAMEU region, nes
## 4 8 Albania
## 5 12 Algeria
## 6 16 American Samoa
## 7 20 Andorra
## 8 24 Angola
## 9 660 Anguilla
## 10 10 Antarctica
## # ... with 282 more rows
reporters
というtibbleオブジェクトには,Comtrade (UNの) 国コード (1列目) と国名 (2列目) が記録されている.なお,1行目には「全国家・地域」を示す“all”という値が保持されているので,これは不要なので読み込みの際にskip=1
として読み飛ばしている
さて,準備が整ったところで,Comtradeのデータを取得するためのget.Comtrade.data()
関数を定義する.
get.Comtrade.data <- function (
reporter, ## reporter country
partner = "all", ## partner country
url.prefix = "http://comtrade.un.org/api/get?", maxrec = 50000,
type = "C", ## commodity (C) or service (S)
freq = "A", ## A=annually, M=monthly
trade.code = "HS", ## HS=HS code as reported, S1=SITC code rev.1
period = "now",
trade.flow = "all", ## trade flows
commodity.code = "TOTAL", ## commodity code
return.url = FALSE, ## return url or not
output.format = "csv", ## output file-format: jason or csv
agent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.86 Safari/537.36"
) {
require(RCurl)
require(RJSONIO)
require(tidyverse)
## check output format argument
if (!output.format %in% c("csv", "json", "url")) {
stop("Type must be either 'csv,' 'json', 'url'")
}
## generate url
string <- str_c(url.prefix, "max=", maxrec, "&", "type=", type,
"&freq=", freq, "&", "px=", trade.code, "&", "ps=", period, "&",
"r=", reporter, "&", "p=", partner, "&", "rg=", trade.flow, "&", "cc=", commodity.code,
"&", "fmt=", output.format,
"&head=M" ## header as in json query
)
## extract data
curl = getCurlHandle()
curlSetOpt(cookiejar="cookies.txt", useragent=agent, followlocation=TRUE, curl=curl)
firstPage <- getURL("http://comtrade.un.org", curl=curl)
# ------------------------------------------------------------
if (output.format == "csv") {
if (return.url) {
return(getURL(string, curl=curl))
} else {
tmp.data <- read_csv(getURL(string, curl=curl), col_types = cols(.default = "c"))
return(list(validation = NULL, data = tmp.data))
}
} else {
if (return.url) {
return(getURL(string, curl=curl))
} else {
tmp.data <- RJSONIO::fromJSON(getURL(string, curl=curl))
data <- tmp.data$dataset
validation <- unlist(tmp.data$validation, recursive = TRUE)
ndata <- NULL
if (length(data) > 0) {
var.names <- names(data[[1]])
data <- as.data.frame(t(sapply(data, rbind)))
ndata <- NULL
for (i in 1:ncol(data)) {
data[sapply(data[, i], is.null), i] <- NA
ndata <- cbind(ndata, unlist(data[, i]))
}
ndata <- as.data.frame(ndata, stringsAsFactors=FALSE)
colnames(ndata) <- var.names
ndata <- ndata %>%
tbl_df %>%
mutate_each(funs(type.convert(as.character(.))))
}
return(list(validation = validation, data = ndata))
}
}
on.exit(close(string))
}
この関数をRコードとして完全に理解する必要はなく,背後にある仕組みと使い方を理解すればよい.Comtradeのウェブページに解説がある通り,Comtradeのデータは一定の一定のパラメータ (e.g., 年,国,フローの種類) を指定してやると,その条件でフィルタリングしたデータセットの一部を,jsonあるいはcsv形式で返してくれる.
get.Comtrade.data()
関数はこの仕組み (API) を利用して,引数として与えられたパラメータを利用してComtradeのデータベースにアクセスする.その上で,(1) Comtradeのデータを (jsonあるいはcsv形式で) Rに直接読み込むか (return.url = FALSE
; デフォルト),(2) csvファイルダウンロード用のurlを生成する (return.url = TRUE
).return.url = FALSE
の場合,get.Comtrade.data()
関数はリストオブジェクトを返し,1つ目の要素にはデータ取得日時や指定されたデータを問題なく取得できたか等の情報が,2つ目の要素にはデータセットが格納される.return.url = TRUE
とした場合は,ダウンロード用のurlを格納した文字列ベクトルを返す.return.url = TRUE
として取得したurlにブラウザでアクセスしても,指定したデータを取得することができる.
では,get.Comtrade.data()
関数を利用してComtradeのデータを取得してみよう.この関数を用いてデータを取得するためには,最低限reporter
になる国・地域の国コードを指定してやる必要がある.大まかに言うと,デフォルトではHSコードの最新のデータを取得するが,その他の引数を変更することで細かな指定ができる.引数はComtradeのAPIの解説ページ を見て変更すればよい.
試しに,reporter
変数を日本に設定し,「他のすべての国との,日本の貿易データ最新版.貿易コードはHSコード」としたデータを取得しよう.
jp_ccode = reporters$ccode[reporters$cname %in% c("Japan")] # 日本の国コードを取得する
jp_sample = get.Comtrade.data(jp_ccode, output.format = "json")
jp_sample
## $validation
## status.name
## "Ok"
## status.value
## "0"
## status.category
## "0"
## status.description
## ""
## status.helpUrl
## "For more reference visit http://comtrade.un.org/data/dev/portal/"
## count.value
## "433"
## count.started
## "2017-02-16T01:39:20.4498897-05:00"
## count.finished
## "2017-02-16T01:39:20.7059153-05:00"
## count.durationSeconds
## "0.2560256"
## datasetTimer.started
## "2017-02-16T01:39:20.4498897-05:00"
## datasetTimer.finished
## "2017-02-16T01:39:21.4609908-05:00"
## datasetTimer.durationSeconds
## "1.0111011"
##
## $data
## # A tibble: 433 × 35
## pfCode yr period periodDesc aggrLevel IsLeaf rgCode rgDesc rtCode
## <fctr> <int> <int> <int> <int> <int> <int> <fctr> <int>
## 1 H4 2016 2016 2016 0 0 1 Import 392
## 2 H4 2016 2016 2016 0 0 2 Export 392
## 3 H4 2016 2016 2016 0 0 1 Import 392
## 4 H4 2016 2016 2016 0 0 2 Export 392
## 5 H4 2016 2016 2016 0 0 1 Import 392
## 6 H4 2016 2016 2016 0 0 2 Export 392
## 7 H4 2016 2016 2016 0 0 1 Import 392
## 8 H4 2016 2016 2016 0 0 2 Export 392
## 9 H4 2016 2016 2016 0 0 1 Import 392
## 10 H4 2016 2016 2016 0 0 2 Export 392
## # ... with 423 more rows, and 26 more variables: rtTitle <fctr>,
## # rt3ISO <fctr>, ptCode <int>, ptTitle <fctr>, pt3ISO <fctr>,
## # ptCode2 <lgl>, ptTitle2 <lgl>, pt3ISO2 <lgl>, cstCode <lgl>,
## # cstDesc <lgl>, motCode <lgl>, motDesc <lgl>, cmdCode <fctr>,
## # cmdDescE <fctr>, qtCode <int>, qtDesc <fctr>, qtAltCode <lgl>,
## # qtAltDesc <lgl>, TradeQuantity <lgl>, AltQuantity <lgl>,
## # NetWeight <lgl>, GrossWeight <lgl>, TradeValue <dbl>, CIFValue <lgl>,
## # FOBValue <lgl>, estCode <int>
これだけで,Comtradeのデータを取得できた.さて,上述の通り,(return.url = TRUE
と指定しない限り) get.Comtrade.data()
関数はリストオブジェクトを返し,2つ目の要素にデータをtibbleクラスとして格納している (データが見つからなかったり取得できなかったりした場合はnull
になる). たとえば,上で取得したjp_sample
というオブジェクトの2つ目の要素には,取得した日本の貿易データがtibbleクラスで格納されている. したがって,次のコードでjp_sample
の2番目の要素を取得すれば,jp_tibble
にtibbleを取り出すことができる.
(jp_tibble = jp_sample[[2]])
## # A tibble: 433 × 35
## pfCode yr period periodDesc aggrLevel IsLeaf rgCode rgDesc rtCode
## <fctr> <int> <int> <int> <int> <int> <int> <fctr> <int>
## 1 H4 2016 2016 2016 0 0 1 Import 392
## 2 H4 2016 2016 2016 0 0 2 Export 392
## 3 H4 2016 2016 2016 0 0 1 Import 392
## 4 H4 2016 2016 2016 0 0 2 Export 392
## 5 H4 2016 2016 2016 0 0 1 Import 392
## 6 H4 2016 2016 2016 0 0 2 Export 392
## 7 H4 2016 2016 2016 0 0 1 Import 392
## 8 H4 2016 2016 2016 0 0 2 Export 392
## 9 H4 2016 2016 2016 0 0 1 Import 392
## 10 H4 2016 2016 2016 0 0 2 Export 392
## # ... with 423 more rows, and 26 more variables: rtTitle <fctr>,
## # rt3ISO <fctr>, ptCode <int>, ptTitle <fctr>, pt3ISO <fctr>,
## # ptCode2 <lgl>, ptTitle2 <lgl>, pt3ISO2 <lgl>, cstCode <lgl>,
## # cstDesc <lgl>, motCode <lgl>, motDesc <lgl>, cmdCode <fctr>,
## # cmdDescE <fctr>, qtCode <int>, qtDesc <fctr>, qtAltCode <lgl>,
## # qtAltDesc <lgl>, TradeQuantity <lgl>, AltQuantity <lgl>,
## # NetWeight <lgl>, GrossWeight <lgl>, TradeValue <dbl>, CIFValue <lgl>,
## # FOBValue <lgl>, estCode <int>
他方,return.url = TRUE
と引数を指定すれば,次のようにcsv形式で指定したデータをダウンロードできるurlを取得できる.
jp_url = get.Comtrade.data(jp_ccode, output.format = "csv", return.url = TRUE)
jp_url # 人間がみても意味不明
## [1] "pfCode,yr,period,periodDesc,aggrLevel,IsLeaf,rgCode,rgDesc,rtCode,rtTitle,rt3ISO,ptCode,ptTitle,pt3ISO,ptCode2,ptTitle2,pt3ISO2,cstCode,cstDesc,motCode,motDesc,cmdCode,cmdDescE,qtCode,qtDesc,qtAltCode,qtAltDesc,TradeQuantity,AltQuantity,NetWeight,GrossWeight,TradeValue,CIFValue,FOBValue,estCode\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,0,World,WLD,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,616548965938,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,0,World,WLD,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,655500004481,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,4,Afghanistan,AFG,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,423112,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,4,Afghanistan,AFG,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,81607438,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,8,Albania,ALB,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,8309706,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,8,Albania,ALB,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,5465759,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,12,Algeria,DZA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,331521396,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,12,Algeria,DZA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,225184980,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,16,American Samoa,ASM,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,999555,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,16,American Samoa,ASM,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1586912,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,20,Andorra,AND,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,23225,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,20,Andorra,AND,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,251729,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,24,Angola,AGO,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,21249281,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,24,Angola,AGO,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,32022286,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,28,Antigua and Barbuda,ATG,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,2514,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,28,Antigua and Barbuda,ATG,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,17746264,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,31,Azerbaijan,AZE,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,3299316,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,31,Azerbaijan,AZE,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,101994925,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,32,Argentina,ARG,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,765087682,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,32,Argentina,ARG,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,641975682,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,36,Australia,AUS,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,30915212138,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,36,Australia,AUS,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,14335579237,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,40,Austria,AUT,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1713016929,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,40,Austria,AUT,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1034464477,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,44,Bahamas,BHS,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,41015613,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,44,Bahamas,BHS,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1031650310,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,48,Bahrain,BHR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,278404900,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,48,Bahrain,BHR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,762392030,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,50,Bangladesh,BGD,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1235724522,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,50,Bangladesh,BGD,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1608908713,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,51,Armenia,ARM,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,12414198,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,51,Armenia,ARM,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,19587002,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,52,Barbados,BRB,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,77011,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,52,Barbados,BRB,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,37382073,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,56,Belgium,BEL,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,2532128257,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,56,Belgium,BEL,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,5813344694,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,60,Bermuda,BMU,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,27991,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,60,Bermuda,BMU,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,280589147,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,64,Bhutan,BTN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1051958,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,64,Bhutan,BTN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,11329575,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,68,Bolivia (Plurinational State of),BOL,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,270789396,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,68,Bolivia (Plurinational State of),BOL,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,174991746,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,70,Bosnia Herzegovina,BIH,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,6893759,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,70,Bosnia Herzegovina,BIH,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,4128433,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,72,Botswana,BWA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,25196321,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,72,Botswana,BWA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,25096430,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,76,Brazil,BRA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,6845379399,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,76,Brazil,BRA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,2837436819,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,84,Belize,BLZ,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,7217140,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,84,Belize,BLZ,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,11026521,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,86,Br. Indian Ocean Terr.,IOT,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,18879,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,86,Br. Indian Ocean Terr.,IOT,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,5606,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,90,Solomon Isds,SLB,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,5254658,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,90,Solomon Isds,SLB,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,21446411,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,92,Br. Virgin Isds,VGB,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,44936,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,92,Br. Virgin Isds,VGB,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,9798218,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,96,Brunei Darussalam,BRN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1776992364,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,96,Brunei Darussalam,BRN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,84887038,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,100,Bulgaria,BGR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,107184666,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,100,Bulgaria,BGR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,85292320,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,104,Myanmar,MMR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,949677033,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,104,Myanmar,MMR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1052599421,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,108,Burundi,BDI,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1124137,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,108,Burundi,BDI,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,5265270,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,112,Belarus,BLR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,18327973,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,112,Belarus,BLR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,23980304,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,116,Cambodia,KHM,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1223328212,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,116,Cambodia,KHM,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,311737892,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,120,Cameroon,CMR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,4586269,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,120,Cameroon,CMR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,27580842,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,124,Canada,CAN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,9325927082,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,124,Canada,CAN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,8296090331,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,132,Cabo Verde,CPV,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,91432,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,132,Cabo Verde,CPV,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,5238251,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,136,Cayman Isds,CYM,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,48207,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,136,Cayman Isds,CYM,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,255197403,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,140,Central African Rep.,CAF,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1638344,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,140,Central African Rep.,CAF,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,2877499,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,144,Sri Lanka,LKA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,244841695,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,144,Sri Lanka,LKA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,711709395,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,148,Chad,TCD,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,70815810,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,148,Chad,TCD,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,8512198,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,152,Chile,CHL,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,5433353260,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,152,Chile,CHL,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1593072237,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,156,China,CHN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,159035275830,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,156,China,CHN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,115695403330,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,170,Colombia,COL,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,655367670,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,170,Colombia,COL,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,966101877,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,174,Comoros,COM,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,38477,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,174,Comoros,COM,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1249352,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,178,Congo,COG,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,23465610,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,178,Congo,COG,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,13231071,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,180,Dem. Rep. of the Congo,COD,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,10438473,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,180,Dem. Rep. of the Congo,COD,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,42617872,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,184,Cook Isds,COK,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,13888418,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,184,Cook Isds,COK,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,5854672,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,188,Costa Rica,CRI,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,308586518,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,188,Costa Rica,CRI,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,327047279,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,191,Croatia,HRV,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,59226069,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,191,Croatia,HRV,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,39892494,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,192,Cuba,CUB,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,16431922,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,192,Cuba,CUB,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,45307948,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,196,Cyprus,CYP,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,678744,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,196,Cyprus,CYP,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,190308938,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,203,Czechia,CZE,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,778250785,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,203,Czechia,CZE,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1255806418,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,204,Benin,BEN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1204961,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,204,Benin,BEN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,10711244,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,208,Denmark,DNK,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,2089640878,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,208,Denmark,DNK,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,424517239,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,212,Dominica,DMA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,664744,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,212,Dominica,DMA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,5734811,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,214,Dominican Rep.,DOM,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,90227742,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,214,Dominican Rep.,DOM,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,277017453,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,218,Ecuador,ECU,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,517181864,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,218,Ecuador,ECU,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,254393006,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,222,El Salvador,SLV,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,21965567,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,222,El Salvador,SLV,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,133202595,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,226,Equatorial Guinea,GNQ,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,129062961,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,226,Equatorial Guinea,GNQ,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1302576,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,231,Ethiopia,ETH,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,77728747,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,231,Ethiopia,ETH,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,104135983,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,232,Eritrea,ERI,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,22851,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,232,Eritrea,ERI,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1189389,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,233,Estonia,EST,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,96793148,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,233,Estonia,EST,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,120624969,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,238,Falkland Isds (Malvinas),FLK,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,342951,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,238,Falkland Isds (Malvinas),FLK,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,84736,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,242,Fiji,FJI,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,38353778,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,242,Fiji,FJI,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,116034333,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,246,Finland,FIN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1417229234,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,246,Finland,FIN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,373614762,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,251,France,FRA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,10380993704,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,251,France,FRA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,6341978506,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,258,French Polynesia,PYF,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,84978038,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,258,French Polynesia,PYF,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,19143114,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,262,Djibouti,DJI,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,326755,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,262,Djibouti,DJI,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,34525070,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,266,Gabon,GAB,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,55804564,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,266,Gabon,GAB,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,27569153,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,268,Georgia,GEO,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,9330056,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,268,Georgia,GEO,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,177843359,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,270,Gambia,GMB,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1649589,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,275,State of Palestine,PSE,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,623098,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,275,State of Palestine,PSE,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,2777002,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,276,Germany,DEU,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,22371699568,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,276,Germany,DEU,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,17941982839,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,288,Ghana,GHA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,187574099,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,288,Ghana,GHA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,126805185,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,292,Gibraltar,GIB,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,167985,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,292,Gibraltar,GIB,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,73435178,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,296,Kiribati,KIR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,7428771,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,296,Kiribati,KIR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,18464175,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,300,Greece,GRC,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,107041832,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,300,Greece,GRC,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,218434661,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,304,Greenland,GRL,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,53809969,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,304,Greenland,GRL,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,81798,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,308,Grenada,GRD,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,11757,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,308,Grenada,GRD,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,9952679,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,316,Guam,GUM,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,7472080,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,316,Guam,GUM,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,222287340,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,320,Guatemala,GTM,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,220793128,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,320,Guatemala,GTM,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,280471607,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,324,Guinea,GIN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1135932,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,324,Guinea,GIN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,7601043,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,328,Guyana,GUY,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,3372252,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,328,Guyana,GUY,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,42853092,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,332,Haiti,HTI,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,4204438,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,332,Haiti,HTI,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,38413566,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,340,Honduras,HND,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,23580678,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,340,Honduras,HND,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,78939515,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,344,\"China, Hong Kong SAR\",HKG,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1981349308,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,344,\"China, Hong Kong SAR\",HKG,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,34175290605,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,348,Hungary,HUN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1250726160,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,348,Hungary,HUN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1483837966,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,352,Iceland,ISL,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,162601175,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,352,Iceland,ISL,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,68495620,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,360,Indonesia,IDN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,18503682016,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,360,Indonesia,IDN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,11513125026,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,364,Iran,IRN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,3383686682,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,364,Iran,IRN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,591159644,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,368,Iraq,IRQ,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1103225336,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,368,Iraq,IRQ,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,351488495,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,372,Ireland,IRL,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,6330796284,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,372,Ireland,IRL,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,772979557,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,376,Israel,ISR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1322896982,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,376,Israel,ISR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,2004535974,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,381,Italy,ITA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,8891740530,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,381,Italy,ITA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,4785910454,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,384,Côte d'Ivoire,CIV,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,14716511,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,384,Côte d'Ivoire,CIV,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,51847447,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,388,Jamaica,JAM,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,25752679,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,388,Jamaica,JAM,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,214649208,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,398,Kazakhstan,KAZ,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,601037494,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,398,Kazakhstan,KAZ,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,193685095,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,400,Jordan,JOR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,37242333,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,400,Jordan,JOR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,643155431,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,404,Kenya,KEN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,59292772,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,404,Kenya,KEN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,755688103,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,410,Rep. of Korea,KOR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,25416303978,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,410,Rep. of Korea,KOR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,46992826911,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,414,Kuwait,KWT,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,4308760781,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,414,Kuwait,KWT,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1724508273,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,417,Kyrgyzstan,KGZ,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,358223,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,417,Kyrgyzstan,KGZ,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,8592030,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,418,Lao People's Dem. Rep.,LAO,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,117085875,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,418,Lao People's Dem. Rep.,LAO,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,118088811,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,422,Lebanon,LBN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,27157588,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,422,Lebanon,LBN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,569961041,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,426,Lesotho,LSO,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,368840,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,426,Lesotho,LSO,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,5868757,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,428,Latvia,LVA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,86816181,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,428,Latvia,LVA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,51685171,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,430,Liberia,LBR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,185331,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,430,Liberia,LBR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1115282353,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,434,Libya,LBY,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,13205057,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,434,Libya,LBY,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,21440458,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,440,Lithuania,LTU,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,544645907,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,440,Lithuania,LTU,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,55507976,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,442,Luxembourg,LUX,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,74233624,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,442,Luxembourg,LUX,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,366879763,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,446,\"China, Macao SAR\",MAC,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,27955325,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,446,\"China, Macao SAR\",MAC,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,306073348,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,450,Madagascar,MDG,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,102307419,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,450,Madagascar,MDG,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,12793837,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,454,Malawi,MWI,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,12369179,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,454,Malawi,MWI,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,19096618,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,458,Malaysia,MYS,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,17609309892,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,458,Malaysia,MYS,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,12338283002,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,462,Maldives,MDV,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,4901304,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,462,Maldives,MDV,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,17432101,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,466,Mali,MLI,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,182939,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,466,Mali,MLI,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,7919801,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,470,Malta,MLT,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,142760141,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,470,Malta,MLT,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,495117333,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,478,Mauritania,MRT,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,130287950,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,478,Mauritania,MRT,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,11658768,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,480,Mauritius,MUS,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,5922467,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,480,Mauritius,MUS,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,120876445,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,484,Mexico,MEX,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,5833094755,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,484,Mexico,MEX,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,10837784949,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,490,\"Other Asia, nes\",,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,23321895267,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,490,\"Other Asia, nes\",,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,39940905915,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,496,Mongolia,MNG,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,17768185,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,496,Mongolia,MNG,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,282152886,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,498,Rep. of Moldova,MDA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,15028480,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,498,Rep. of Moldova,MDA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,4126720,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,499,Montenegro,MNE,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,2812959,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,499,Montenegro,MNE,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,4977313,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,500,Montserrat,MSR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,4271,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,500,Montserrat,MSR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,807401,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,504,Morocco,MAR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,274979937,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,504,Morocco,MAR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,342209645,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,508,Mozambique,MOZ,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,129700349,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,508,Mozambique,MOZ,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,51999727,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,512,Oman,OMN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1786770785,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,512,Oman,OMN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,2593916996,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,516,Namibia,NAM,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,8854756,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,516,Namibia,NAM,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,28478323,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,520,Nauru,NRU,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,5009867,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,520,Nauru,NRU,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,2085859,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,524,Nepal,NPL,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,13111494,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,524,Nepal,NPL,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,46242173,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,527,\"Oceania, nes\",,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,7963,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,527,\"Oceania, nes\",,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1112280,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,528,Netherlands,NLD,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,2399010151,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,528,Netherlands,NLD,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,12008800858,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,531,Curaçao,CUW,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,476478,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,531,Curaçao,CUW,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,25324883,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,540,New Caledonia,NCL,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,172108646,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,540,New Caledonia,NCL,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,32785326,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,548,Vanuatu,VUT,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,72690328,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,548,Vanuatu,VUT,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,35391555,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,554,New Zealand,NZL,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,2377639036,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,554,New Zealand,NZL,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,2224548113,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,558,Nicaragua,NIC,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,27721563,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,558,Nicaragua,NIC,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,88056089,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,562,Niger,NER,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,631079,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,562,Niger,NER,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,7517130,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,566,Nigeria,NGA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,878685966,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,566,Nigeria,NGA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,333311566,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,570,Niue,NIU,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,18412,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,570,Niue,NIU,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,5615540,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,577,\"Other Africa, nes\",,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,216080,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,577,\"Other Africa, nes\",,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1499864,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,579,Norway,NOR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1787410060,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,579,Norway,NOR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1004335731,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,580,N. Mariana Isds,MNP,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,116432,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,580,N. Mariana Isds,MNP,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,39119179,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,583,FS Micronesia,FSM,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,6160547,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,583,FS Micronesia,FSM,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,12475154,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,584,Marshall Isds,MHL,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,9629754,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,584,Marshall Isds,MHL,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1483415754,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,585,Palau,PLW,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,14604779,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,585,Palau,PLW,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,28367840,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,586,Pakistan,PAK,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,267929735,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,586,Pakistan,PAK,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1963312143,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,591,Panama,PAN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,356579835,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,591,Panama,PAN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,5756247016,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,598,Papua New Guinea,PNG,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,2040594490,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,598,Papua New Guinea,PNG,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,163057496,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,600,Paraguay,PRY,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,42645069,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,600,Paraguay,PRY,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,78981088,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,604,Peru,PER,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1343110015,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,604,Peru,PER,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,727466797,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,608,Philippines,PHL,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,9169266196,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,608,Philippines,PHL,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,10514849780,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,616,Poland,POL,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1166621534,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,616,Poland,POL,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1721988372,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,620,Portugal,PRT,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,288814587,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,620,Portugal,PRT,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,373164004,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,624,Guinea-Bissau,GNB,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1807036,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,626,Timor-Leste,TLS,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1045733,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,626,Timor-Leste,TLS,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,5260282,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,634,Qatar,QAT,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,11052996095,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,634,Qatar,QAT,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1564509542,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,637,\"North America and Central America, nes\",,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,164088,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,637,\"North America and Central America, nes\",,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,22695453,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,642,Romania,ROU,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,485191880,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,642,Romania,ROU,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,393612717,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,643,Russian Federation,RUS,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,11451948330,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,643,Russian Federation,RUS,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,5183894807,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,646,Rwanda,RWA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,8043448,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,646,Rwanda,RWA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,6349127,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,654,Saint Helena,SHN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,4408938,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,654,Saint Helena,SHN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,50819,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,659,Saint Kitts and Nevis,KNA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,17589,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,659,Saint Kitts and Nevis,KNA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,10495052,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,660,Anguilla,AIA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,3692,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,660,Anguilla,AIA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,3113973,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,662,Saint Lucia,LCA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,5019,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,662,Saint Lucia,LCA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,12866510,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,670,Saint Vincent and the Grenadines,VCT,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,4909267,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,670,Saint Vincent and the Grenadines,VCT,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,6701914,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,678,Sao Tome and Principe,STP,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,51048,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,678,Sao Tome and Principe,STP,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1207058,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,682,Saudi Arabia,SAU,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,19880609766,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,682,Saudi Arabia,SAU,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,5112888626,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,686,Senegal,SEN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,7846070,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,686,Senegal,SEN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,55621529,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,688,Serbia,SRB,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,259780379,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,688,Serbia,SRB,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,16218286,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,690,Seychelles,SYC,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,52406396,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,690,Seychelles,SYC,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,18799302,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,694,Sierra Leone,SLE,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1820825,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,694,Sierra Leone,SLE,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,14547573,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,699,India,IND,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,4748548671,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,699,India,IND,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,8322936463,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,702,Singapore,SGP,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,7583488403,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,702,Singapore,SGP,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,20167108000,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,703,Slovakia,SVK,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,229628949,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,703,Slovakia,SVK,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,259393473,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,704,Viet Nam,VNM,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,16495307459,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,704,Viet Nam,VNM,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,13203199760,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,705,Slovenia,SVN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,144563199,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,705,Slovenia,SVN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,122154370,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,706,Somalia,SOM,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,8381726,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,706,Somalia,SOM,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,3714222,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,710,South Africa,ZAF,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,4278778982,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,710,South Africa,ZAF,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,2267056756,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,716,Zimbabwe,ZWE,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,13799547,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,716,Zimbabwe,ZWE,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,16944685,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,724,Spain,ESP,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,3749924235,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,724,Spain,ESP,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,2905150035,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,728,South Sudan,SSD,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,421177,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,728,South Sudan,SSD,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,9323286,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,729,Sudan,SDN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,25954571,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,729,Sudan,SDN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,50462221,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,732,Western Sahara,ESH,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,155106,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,732,Western Sahara,ESH,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,86009,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,740,Suriname,SUR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,6526471,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,740,Suriname,SUR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,34922790,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,748,Swaziland,SWZ,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,592695,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,748,Swaziland,SWZ,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,11113747,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,752,Sweden,SWE,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,2244548388,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,752,Sweden,SWE,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1465670266,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,757,Switzerland,CHE,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,7773097883,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,757,Switzerland,CHE,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,3178794804,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,760,Syria,SYR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,948946,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,760,Syria,SYR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,23154465,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,762,Tajikistan,TJK,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1180372,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,762,Tajikistan,TJK,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,3647698,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,764,Thailand,THA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,20458585584,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,764,Thailand,THA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,27846981339,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,768,Togo,TGO,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,3994050,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,768,Togo,TGO,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,43825679,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,772,Tokelau,TKL,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,2019,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,776,Tonga,TON,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,2886867,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,776,Tonga,TON,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,5258111,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,780,Trinidad and Tobago,TTO,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,77407320,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,780,Trinidad and Tobago,TTO,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,159216506,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,784,United Arab Emirates,ARE,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,17572882006,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,784,United Arab Emirates,ARE,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,8127629472,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,788,Tunisia,TUN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,98592963,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,788,Tunisia,TUN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,89082032,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,792,Turkey,TUR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,572260711,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,792,Turkey,TUR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,2907930604,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,795,Turkmenistan,TKM,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,110264,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,795,Turkmenistan,TKM,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,403808449,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,796,Turks and Caicos Isds,TCA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,44403,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,796,Turks and Caicos Isds,TCA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,6710394,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,798,Tuvalu,TUV,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,2082579,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,798,Tuvalu,TUV,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,16033717,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,800,Uganda,UGA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,10489343,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,800,Uganda,UGA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,165290918,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,804,Ukraine,UKR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,584595244,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,804,Ukraine,UKR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,316362801,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,807,TFYR of Macedonia,MKD,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,6771242,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,807,TFYR of Macedonia,MKD,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,10279598,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,818,Egypt,EGY,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,143029754,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,818,Egypt,EGY,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1162158823,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,826,United Kingdom,GBR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,6614290754,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,826,United Kingdom,GBR,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,13882834785,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,834,United Rep. of Tanzania,TZA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,171424650,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,834,United Rep. of Tanzania,TZA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,224709038,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,842,USA,USA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,70319345244,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,842,USA,USA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,132725586145,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,854,Burkina Faso,BFA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,13549550,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,854,Burkina Faso,BFA,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,29794339,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,858,Uruguay,URY,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,59116600,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,858,Uruguay,URY,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,57260112,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,860,Uzbekistan,UZB,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,2641974,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,860,Uzbekistan,UZB,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,162890934,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,862,Venezuela,VEN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,79198602,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,862,Venezuela,VEN,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,105151388,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,882,Samoa,WSM,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,886898,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,882,Samoa,WSM,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,15101785,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,887,Yemen,YEM,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,4214317,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,887,Yemen,YEM,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,117974828,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,894,Zambia,ZMB,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,25031429,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,894,Zambia,ZMB,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,48860503,,,0\r\nH4,2016,2016,2016,0,0,1,Import,392,Japan,JPN,899,\"Areas, nes\",,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1715206,,,0\r\nH4,2016,2016,2016,0,0,2,Export,392,Japan,JPN,899,\"Areas, nes\",,,,,,,,,TOTAL,All Commodities,1,No Quantity,,,,,,,1,,,0\r\n"
(jp_tibble_2 = read_csv(jp_url)) # でもちゃんと読み込める
## # A tibble: 433 × 35
## pfCode yr period periodDesc aggrLevel IsLeaf rgCode rgDesc rtCode
## <chr> <int> <int> <int> <int> <int> <int> <chr> <int>
## 1 H4 2016 2016 2016 0 0 1 Import 392
## 2 H4 2016 2016 2016 0 0 2 Export 392
## 3 H4 2016 2016 2016 0 0 1 Import 392
## 4 H4 2016 2016 2016 0 0 2 Export 392
## 5 H4 2016 2016 2016 0 0 1 Import 392
## 6 H4 2016 2016 2016 0 0 2 Export 392
## 7 H4 2016 2016 2016 0 0 1 Import 392
## 8 H4 2016 2016 2016 0 0 2 Export 392
## 9 H4 2016 2016 2016 0 0 1 Import 392
## 10 H4 2016 2016 2016 0 0 2 Export 392
## # ... with 423 more rows, and 26 more variables: rtTitle <chr>,
## # rt3ISO <chr>, ptCode <int>, ptTitle <chr>, pt3ISO <chr>,
## # ptCode2 <chr>, ptTitle2 <chr>, pt3ISO2 <chr>, cstCode <chr>,
## # cstDesc <chr>, motCode <chr>, motDesc <chr>, cmdCode <chr>,
## # cmdDescE <chr>, qtCode <int>, qtDesc <chr>, qtAltCode <chr>,
## # qtAltDesc <chr>, TradeQuantity <chr>, AltQuantity <chr>,
## # NetWeight <chr>, GrossWeight <chr>, TradeValue <dbl>, CIFValue <chr>,
## # FOBValue <chr>, estCode <int>
上記の例では,日本の国コードをreporters
オブジェクトから取得した.このコードは貿易相手国をpartner
という引数で指定する際にも用いることができる.たとえば,カナダと中国の国コードを取得したければc("Japan")
を変更すればよい.
jp_ccode = reporters$ccode[reporters$cname %in% c("Japan")] # 日本の国コードを取得する
cc_ccode = reporters$ccode[reporters$cname %in% c("Canada", "China")] # カナダ,中国の国コードを取得する
もし日本とカナダ・中国との2014年の貿易データのみを取得したければ,cc_ccode
を用いて
cc_ccode = str_c(cc_ccode, collapse=",")
jp_cc_sample = get.Comtrade.data(jp_ccode, partner = cc_ccode, output.format = "json", period = 2014)
とすれば,指定したデータを取得できる.なお,輸出・輸入や貿易コード,特定の品目コードも同様に指定できる. どのような値を取得できるかは関数に適宜コメントを入れているが,詳細はComtradeのウェブページ を参照すること.
このように,APIを用いれば「ポチポチ」して取得しなければならないデータを簡単に取得できる.この関数とComtradeは本講義の課題や卒論等に用いても構わないが,使用したい場合は次の点に十分注意すること.
get.Comtrade.data()
関数のクセを理解して使用しないと,誤ったデータを取得する可能性があるfor
文を使って繰り返しアクセスする際には,1回データを取得する度にSys.sleep(1)
等を用いて時間を空けることが望ましい (Sys.sleep(1)
は「1秒ポーズ」.Sys.sleep(0.5)
なら0.5秒)