Merchandise imports by the reporting economy (current US$)

Source: worldbank.org, 03.09.2025

Year: 2023

Flag Country Value Value change, % Rank
Aruba Aruba 1,532,723,549 +4.31% 170
Afghanistan Afghanistan 4,080,476,484 +0.295% 146
Angola Angola 15,688,909,725 -3.31% 93
Albania Albania 8,687,186,629 +3.5% 117
United Arab Emirates United Arab Emirates 391,795,376,230 +18.4% 17
Argentina Argentina 72,797,792,000 -9.59% 46
Armenia Armenia 12,464,781,698 +45% 101
American Samoa American Samoa 208,316,745 -4.25% 201
Antigua & Barbuda Antigua & Barbuda 668,064,980 +6.65% 185
Australia Australia 287,887,347,807 -4.72% 22
Austria Austria 226,250,305,050 -3.11% 28
Azerbaijan Azerbaijan 17,284,754,000 +18.9% 86
Burundi Burundi 959,119,049 -8% 182
Belgium Belgium 555,299,352,686 -9.39% 14
Benin Benin 3,905,058,926 +7.36% 149
Burkina Faso Burkina Faso 5,879,933,434 +6.28% 132
Bangladesh Bangladesh 61,311,067,158 -23.3% 53
Bulgaria Bulgaria 53,422,051,421 -7.45% 57
Bahrain Bahrain 15,247,874,718 -1.35% 97
Bahamas Bahamas 4,125,456,161 +9.53% 143
Bosnia & Herzegovina Bosnia & Herzegovina 15,344,941,036 -0.219% 96
Belarus Belarus 57,113,753,617 +30.1% 55
Belize Belize 1,327,521,363 -2.17% 176
Bermuda Bermuda 1,430,185,818 +15.8% 173
Bolivia Bolivia 11,487,986,289 -3.21% 109
Brazil Brazil 254,857,368,587 -11.7% 26
Barbados Barbados 2,122,718,860 -0.955% 163
Brunei Brunei 5,689,208,966 -38.3% 133
Bhutan Bhutan 3,819,490,676 -6.82% 151
Botswana Botswana 5,888,884,627 -20.5% 131
Central African Republic Central African Republic 736,209,534 +18.3% 184
Canada Canada 585,790,261,364 -1.96% 13
Switzerland Switzerland 364,049,585,245 +2.11% 19
Chile Chile 82,013,482,828 -18.6% 43
China China 2,456,060,333,998 -5.19% 2
Côte d’Ivoire Côte d’Ivoire 18,384,507,273 +6.2% 82
Cameroon Cameroon 8,619,293,238 +2.6% 119
Congo - Kinshasa Congo - Kinshasa 25,492,453,555 +123% 74
Congo - Brazzaville Congo - Brazzaville 5,960,130,536 +64.1% 130
Colombia Colombia 61,564,231,820 -18.9% 52
Comoros Comoros 354,395,754 +1.15% 195
Cape Verde Cape Verde 1,739,796,380 -0.793% 167
Costa Rica Costa Rica 22,456,147,776 +5.2% 79
Cuba Cuba 6,815,649,722 +8.25% 126
Curaçao Curaçao 1,336,184,706 +1.79% 175
Cyprus Cyprus 13,192,950,059 +10.8% 99
Czechia Czechia 229,432,030,081 -1.13% 27
Germany Germany 1,466,851,108,919 -7.34% 3
Djibouti Djibouti 5,321,906,756 +3.96% 137
Dominica Dominica 298,141,857 +12.5% 198
Denmark Denmark 120,450,340,899 -6.55% 36
Dominican Republic Dominican Republic 28,617,892,220 -8.94% 71
Algeria Algeria 42,561,016,859 +5.09% 63
Ecuador Ecuador 30,897,578,173 -6.45% 68
Egypt Egypt 73,567,733,317 -6.96% 45
Eritrea Eritrea 436,688,960 -4.07% 192
Spain Spain 468,467,479,988 -4.94% 15
Estonia Estonia 22,811,557,144 -14.3% 78
Ethiopia Ethiopia 17,050,095,316 +3.1% 88
Finland Finland 82,823,884,939 -14.2% 42
Fiji Fiji 2,987,662,061 +3.38% 157
France France 783,355,756,161 -4.31% 6
Faroe Islands Faroe Islands 1,929,975,880 -1.4% 166
Micronesia (Federated States of) Micronesia (Federated States of) 516,777,319 +10.4% 189
Gabon Gabon 4,090,337,790 +3.37% 144
United Kingdom United Kingdom 721,751,331,983 -9.01% 7
Georgia Georgia 15,602,966,666 +15.2% 95
Ghana Ghana 16,385,196,102 -10.6% 90
Gibraltar Gibraltar 12,124,194,991 -10.7% 104
Guinea Guinea 5,416,974,065 +5.97% 136
Gambia Gambia 2,446,464,740 +167% 160
Guinea-Bissau Guinea-Bissau 322,029,381 +30.5% 197
Equatorial Guinea Equatorial Guinea 1,119,366,035 +9.39% 181
Greece Greece 88,367,830,575 -9.88% 41
Grenada Grenada 540,487,608 +13.8% 188
Greenland Greenland 1,208,985,986 +8.73% 179
Guatemala Guatemala 30,316,737,954 -5.52% 70
Guam Guam 1,454,941,405 +4.94% 172
Guyana Guyana 4,996,059,323 +38.4% 138
Hong Kong SAR China Hong Kong SAR China 655,421,461,853 -2% 9
Honduras Honduras 16,028,490,523 -1.68% 92
Croatia Croatia 43,245,290,886 -2.6% 62
Haiti Haiti 2,143,725,289 -6.83% 162
Hungary Hungary 153,872,037,096 -6.8% 32
Indonesia Indonesia 221,779,130,981 -6.57% 29
India India 666,533,665,809 -8.92% 8
Ireland Ireland 150,129,801,303 +2.71% 33
Iran Iran 52,731,923,673 -9.49% 58
Iraq Iraq 54,763,144,132 +6.85% 56
Iceland Iceland 9,482,351,930 -2.31% 114
Israel Israel 81,212,700,000 -12.7% 44
Italy Italy 634,517,493,701 -7.93% 11
Jamaica Jamaica 7,587,549,614 -1.82% 122
Jordan Jordan 25,429,172,401 -6.08% 75
Japan Japan 785,513,129,030 -12.4% 5
Kazakhstan Kazakhstan 61,160,395,122 +97.6% 54
Kenya Kenya 18,585,379,078 -11.8% 81
Kyrgyzstan Kyrgyzstan 12,517,195,181 +30% 100
Cambodia Cambodia 23,508,407,932 -19.5% 77
Kiribati Kiribati 198,073,408 +9.53% 202
St. Kitts & Nevis St. Kitts & Nevis 330,594,189 -2.84% 196
South Korea South Korea 640,405,756,000 -11.7% 10
Kuwait Kuwait 37,446,018,064 +4.32% 66
Laos Laos 5,471,059,518 +25.4% 134
Lebanon Lebanon 18,016,960,749 -6.94% 84
Liberia Liberia 2,167,548,132 +26% 161
Libya Libya 18,195,176,003 +12.8% 83
St. Lucia St. Lucia 1,318,059,489 -6.55% 177
Sri Lanka Sri Lanka 16,102,581,130 -6.59% 91
Lesotho Lesotho 1,644,824,260 -8.58% 169
Lithuania Lithuania 48,377,331,879 -12.1% 61
Luxembourg Luxembourg 26,220,453,564 -2.86% 73
Latvia Latvia 27,341,064,956 -7.22% 72
Macao SAR China Macao SAR China 17,520,573,284 +1.7% 85
Morocco Morocco 70,368,564,180 -2.83% 48
Moldova Moldova 8,664,036,187 -5.88% 118
Madagascar Madagascar 4,700,063,142 -13% 140
Maldives Maldives 3,497,089,453 -0.525% 152
Mexico Mexico 633,525,701,360 -1.04% 12
Marshall Islands Marshall Islands 19,524,005,836 +10.4% 80
North Macedonia North Macedonia 12,052,112,295 -5.52% 105
Mali Mali 9,870,853,854 +17.1% 113
Malta Malta 8,268,109,175 +0.642% 120
Myanmar (Burma) Myanmar (Burma) 16,440,422,363 -5.53% 89
Montenegro Montenegro 4,080,477,198 +10.4% 145
Mongolia Mongolia 9,265,327,087 +6.22% 115
Mozambique Mozambique 10,089,815,000 -31.2% 112
Mauritania Mauritania 4,815,452,684 -5.91% 139
Mauritius Mauritius 4,510,604,100 -5.64% 141
Malawi Malawi 3,138,640,145 +98.1% 154
Malaysia Malaysia 266,535,463,757 -9.63% 24
Namibia Namibia 7,186,702,059 +9.89% 124
New Caledonia New Caledonia 2,838,967,422 -3.83% 158
Niger Niger 3,147,101,261 -16.7% 153
Nigeria Nigeria 64,304,882,433 +2.35% 49
Nicaragua Nicaragua 8,063,194,788 +2.92% 121
Netherlands Netherlands 838,011,532,460 -5.91% 4
Norway Norway 96,773,953,828 -9.52% 40
Nepal Nepal 12,041,375,757 -12.2% 106
Nauru Nauru 71,294,029 -9.31% 205
New Zealand New Zealand 50,397,718,490 -7.79% 59
Oman Oman 38,702,075,207 +0.204% 65
Pakistan Pakistan 49,447,125,610 -29% 60
Panama Panama 10,366,735,653 -7.24% 110
Peru Peru 64,054,170,156 -11.5% 50
Philippines Philippines 126,105,122,495 -11.8% 35
Palau Palau 269,216,466 +14.9% 199
Papua New Guinea Papua New Guinea 6,323,422,276 -3.52% 129
Poland Poland 367,300,454,083 -3.18% 18
North Korea North Korea 2,649,493,225 +50.2% 159
Portugal Portugal 113,585,647,939 -0.654% 37
Paraguay Paraguay 17,055,497,991 +1.71% 87
Palestinian Territories Palestinian Territories 6,682,440,302 -26.5% 127
French Polynesia French Polynesia 645,754,452 -70.8% 187
Qatar Qatar 30,543,792,909 -6.19% 69
Romania Romania 131,914,675,612 -0.405% 34
Russia Russia 262,126,467,987 +9.33% 25
Rwanda Rwanda 3,824,459,170 +2.34% 150
Saudi Arabia Saudi Arabia 210,678,505,214 +14.8% 30
Sudan Sudan 5,441,474,362 -50.4% 135
Senegal Senegal 11,721,883,231 -2.05% 107
Singapore Singapore 423,282,439,729 -11% 16
Solomon Islands Solomon Islands 655,241,402 +5.15% 186
Sierra Leone Sierra Leone 1,938,583,016 +3.28% 165
El Salvador El Salvador 15,630,065,264 -8.53% 94
San Marino San Marino 432,262,056 -10.7% 193
Somalia Somalia 4,020,170,723 -3.24% 148
Serbia Serbia 39,760,828,092 -3.32% 64
South Sudan South Sudan 1,281,877,629 -4.98% 178
São Tomé & Príncipe São Tomé & Príncipe 181,647,312 -5.56% 203
Suriname Suriname 1,658,817,883 -7.64% 168
Slovakia Slovakia 113,385,394,262 +0.872% 38
Slovenia Slovenia 71,372,550,584 +2.81% 47
Sweden Sweden 192,821,133,885 -4.79% 31
Eswatini Eswatini 2,038,494,826 -4.01% 164
Sint Maarten Sint Maarten 1,172,328,555 +21% 180
Seychelles Seychelles 1,464,729,495 -26.7% 171
Syria Syria 3,066,845,155 -8.39% 155
Chad Chad 1,388,510,922 +9.15% 174
Togo Togo 3,050,194,049 +10.5% 156
Thailand Thailand 284,282,045,712 -4.34% 23
Tajikistan Tajikistan 7,059,245,232 +36.7% 125
Turkmenistan Turkmenistan 4,021,345,626 +16.4% 147
Timor-Leste Timor-Leste 897,221,457 -2.55% 183
Tonga Tonga 257,534,000 -0.166% 200
Trinidad & Tobago Trinidad & Tobago 8,921,308,654 +43.1% 116
Tunisia Tunisia 25,046,102,749 -3.52% 76
Turkey Turkey 337,272,808,047 +2.48% 20
Tuvalu Tuvalu 72,734,149 -11.9% 204
Tanzania Tanzania 15,116,577,045 -3.42% 98
Uganda Uganda 11,499,641,571 +18.7% 108
Ukraine Ukraine 63,491,653,338 +15% 51
Uruguay Uruguay 12,363,880,273 +28.8% 102
United States United States 3,083,938,008,546 -4.89% 1
Uzbekistan Uzbekistan 35,987,798,588 +27.7% 67
St. Vincent & Grenadines St. Vincent & Grenadines 456,037,719 +4.2% 191
Venezuela Venezuela 12,266,998,968 +5.21% 103
Vietnam Vietnam 318,466,938,556 -9.23% 21
Vanuatu Vanuatu 424,379,230 +16.3% 194
Samoa Samoa 462,211,601 +6.76% 190
Kosovo Kosovo 6,451,164,719 +8.9% 128
Yemen Yemen 4,410,667,734 -14.2% 142
South Africa South Africa 112,463,984,247 -3.35% 39
Zambia Zambia 10,124,460,433 +12% 111
Zimbabwe Zimbabwe 7,256,254,423 +11.7% 123

The indicator of merchandise imports by the reporting economy, measured in current US dollars, serves as a critical gauge of a nation's trade activities. This metric encompasses the total value of goods that an economy purchases from foreign countries over a specified period, usually measured annually. It reflects the strength of an economy's demand for foreign products and can reveal insights into consumption trends, economic health, and a country’s involvement in international trade.

The importance of tracking merchandise imports lies in its ability to provide comprehensive insights into the economic framework of a country. High import values can indicate a robust domestic demand and consumer spending capability, while also suggesting a dependency on foreign goods, which can be both a strength and a vulnerability. On the opposite end of the spectrum, low import levels might indicate a more self-reliant economy but could also signal issues such as low consumer confidence or economic stagnation.

This indicator is intricately connected with other crucial financial metrics, including Gross Domestic Product (GDP), balance of trade, and foreign exchange rates. A surge in imports can lead to a trade deficit—when a country imports more than it exports—which can subsequently affect the currency value. This is particularly evident in economies where consumer demand is high, compelling countries to rely heavily on foreign goods, as seen in the top five areas based on the latest available data from 2020.

In 2020, the United States recorded the highest merchandise imports at approximately \$2.34 trillion, followed closely by China at \$2.06 trillion. Germany, Japan, and the United Kingdom rounded out the top five, with imports valued at \$1.17 trillion, \$631 billion, and \$628 billion, respectively. Such immense import values underscore not only the size of these economies but also their significant roles in global trade networks. In contrast, the bottom five areas, including Tuvalu, Nauru, Kiribati, São Tomé and Príncipe, and American Samoa, reported imports that barely broke \$200 million, indicating they are either developing economies with limited access to global markets or isolated locales with minimal trade activities.

Examining global values of merchandise imports reveals a substantial increase over the decades. From just over \$106 billion in 1960 to nearly \$17.39 trillion in 2020, the trend depicts the rapid expansion of global trade. This growth corresponds with increased globalization, technological advancements, and the liberalization of trade policies throughout the world. However, this modern interdependence has also raised concerns regarding economic vulnerabilities, particularly in the face of global crises like the COVID-19 pandemic.

Several factors affect merchandise import levels, including economic policies, exchange rates, global demand, and geopolitical events. Currency strength is a critical aspect; for instance, a weaker local currency can make imports more expensive, thereby potentially reducing import volumes. Conversely, robust economic growth often leads to increased imports as consumers and businesses seek foreign products.

Strategies to optimize merchandise imports can vary greatly. For countries or economies seeking to enhance their import values responsibly, trade agreements can cultivate robust trade partnerships and reduce tariffs, easing the flow of goods. Furthermore, fostering domestic industries while encouraging foreign investments can create a balanced approach towards imports and exports, ensuring sustained economic growth.

However, a heavy reliance on imported goods can present significant flaws. Economies that prioritize imports may weaken domestic production capabilities, leading to potential job losses in local industries. Additionally, such dependency can create vulnerabilities due to market fluctuations and trade disputes, causing disruptions in supply chains. This scenario highlights the importance of developing a diversified economic base while strategically managing import levels.

In conclusion, merchandise imports by the reporting economy, as an indicator, provides critical insights into an economy’s health and its relationship with the global market. The data from 2020 vividly illustrates the disparities in global trade, showcasing the dominance of major economies alongside less active participants in international trade. Understanding this indicator allows nations to navigate their economic strategies better while balancing their reliance on foreign goods versus domestic production.

                    
# Install missing packages
import sys
import subprocess

def install(package):
subprocess.check_call([sys.executable, "-m", "pip", "install", package])

# Required packages
for package in ['wbdata', 'country_converter']:
try:
__import__(package)
except ImportError:
install(package)

# Import libraries
import wbdata
import country_converter as coco
from datetime import datetime

# Define World Bank indicator code
dataset_code = 'TM.VAL.MRCH.WL.CD'

# Download data from World Bank API
data = wbdata.get_dataframe({dataset_code: 'value'},
date=(datetime(1960, 1, 1), datetime.today()),
parse_dates=True,
keep_levels=True).reset_index()

# Extract year
data['year'] = data['date'].dt.year

# Convert country names to ISO codes using country_converter
cc = coco.CountryConverter()
data['iso2c'] = cc.convert(names=data['country'], to='ISO2', not_found=None)
data['iso3c'] = cc.convert(names=data['country'], to='ISO3', not_found=None)

# Filter out rows where ISO codes could not be matched — likely not real countries
data = data[data['iso2c'].notna() & data['iso3c'].notna()]

# Sort for calculation
data = data.sort_values(['iso3c', 'year'])

# Calculate YoY absolute and percent change
data['value_change'] = data.groupby('iso3c')['value'].diff()
data['value_change_percent'] = data.groupby('iso3c')['value'].pct_change() * 100

# Calculate ranks (higher GDP per capita = better rank)
data['rank'] = data.groupby('year')['value'].rank(ascending=False, method='dense')

# Calculate rank change from previous year
data['rank_change'] = data.groupby('iso3c')['rank'].diff()

# Select desired columns
final_df = data[['country', 'iso2c', 'iso3c', 'year', 'value',
'value_change', 'value_change_percent', 'rank', 'rank_change']].copy()

# Optional: Add labels as metadata (could be useful for export or UI)
column_labels = {
'country': 'Country name',
'iso2c': 'ISO 2-letter country code',
'iso3c': 'ISO 3-letter country code',
'year': 'Year',
'value': 'GDP per capita (current US$)',
'value_change': 'Year-over-Year change in value',
'value_change_percent': 'Year-over-Year percent change in value',
'rank': 'Country rank by GDP per capita (higher = richer)',
'rank_change': 'Change in rank from previous year'
}

# Display first few rows
print(final_df.head(10))

# Optional: Save to CSV
#final_df.to_csv("gdp_per_capita_cleaned.csv", index=False)
                    
                
                    
# Check and install required packages
required_packages <- c("WDI", "countrycode", "dplyr")

for (pkg in required_packages) {
  if (!requireNamespace(pkg, quietly = TRUE)) {
    install.packages(pkg)
  }
}

# Load the necessary libraries
library(WDI)
library(dplyr)
library(countrycode)

# Define the dataset code (World Bank indicator code)
dataset_code <- 'TM.VAL.MRCH.WL.CD'

# Download data using WDI package
dat <- WDI(indicator = dataset_code)

# Filter only countries using 'is_country' from countrycode
# This uses iso2c to identify whether the entry is a recognized country
dat <- dat %>%
  filter(countrycode(iso2c, origin = 'iso2c', destination = 'country.name', warn = FALSE) %in%
           countrycode::codelist$country.name.en)

# Ensure dataset is ordered by country and year
dat <- dat %>%
  arrange(iso3c, year)

# Rename the dataset_code column to "value" for easier manipulation
dat <- dat %>%
  rename(value = !!dataset_code)

# Calculate year-over-year (YoY) change and percentage change
dat <- dat %>%
  group_by(iso3c) %>%
  mutate(
    value_change = value - lag(value),                              # Absolute change from previous year
    value_change_percent = 100 * (value - lag(value)) / lag(value) # Percent change from previous year
  ) %>%
  ungroup()

# Calculate rank by year (higher value => higher rank)
dat <- dat %>%
  group_by(year) %>%
  mutate(rank = dense_rank(desc(value))) %>% # Rank countries by descending value
  ungroup()

# Calculate rank change (positive = moved up, negative = moved down)
dat <- dat %>%
  group_by(iso3c) %>%
  mutate(rank_change = rank - lag(rank)) %>% # Change in rank compared to previous year
  ungroup()

# Select and reorder final columns
final_data <- dat %>%
  select(
    country,
    iso2c,
    iso3c,
    year,
    value,
    value_change,
    value_change_percent,
    rank,
    rank_change
  )

# Add labels (variable descriptions)
attr(final_data$country, "label") <- "Country name"
attr(final_data$iso2c, "label") <- "ISO 2-letter country code"
attr(final_data$iso3c, "label") <- "ISO 3-letter country code"
attr(final_data$year, "label") <- "Year"
attr(final_data$value, "label") <- "GDP per capita (current US$)"
attr(final_data$value_change, "label") <- "Year-over-Year change in value"
attr(final_data$value_change_percent, "label") <- "Year-over-Year percent change in value"
attr(final_data$rank, "label") <- "Country rank by GDP per capita (higher = richer)"
attr(final_data$rank_change, "label") <- "Change in rank from previous year"

# Print the first few rows of the final dataset
print(head(final_data, 10))