Merchandise imports from high-income economies (% of total merchandise imports)

Source: worldbank.org, 03.09.2025

Year: 2023

Flag Country Value Value change, % Rank
Aruba Aruba 81.6 -0.333% 36
Afghanistan Afghanistan 13.3 0.00000% 198
Angola Angola 57.5 -6.14% 108
Albania Albania 62.3 -3.07% 90
United Arab Emirates United Arab Emirates 40.3 -2.23% 164
Argentina Argentina 36 -7.73% 177
Armenia Armenia 62.1 +5.5% 93
American Samoa American Samoa 68.3 +7.89% 73
Antigua & Barbuda Antigua & Barbuda 79.4 -4.27% 43
Australia Australia 54 +1.89% 118
Austria Austria 89.3 +0.527% 14
Azerbaijan Azerbaijan 50.1 +7.69% 135
Burundi Burundi 44.8 -8.33% 149
Belgium Belgium 84.6 +0.194% 24
Benin Benin 41.4 -5.7% 163
Burkina Faso Burkina Faso 41.7 -15% 160
Bangladesh Bangladesh 34 +0.719% 182
Bulgaria Bulgaria 72.8 +0.595% 56
Bahrain Bahrain 62.6 +4.96% 88
Bahamas Bahamas 93.5 -0.387% 6
Bosnia & Herzegovina Bosnia & Herzegovina 66.9 +1.81% 79
Belarus Belarus 83.5 +1.1% 30
Belize Belize 55 -1.73% 114
Bermuda Bermuda 96.6 +8.86% 3
Bolivia Bolivia 34.1 +0.261% 181
Brazil Brazil 56.4 -0.377% 112
Barbados Barbados 87.1 +1.37% 20
Brunei Brunei 46.4 -0.114% 145
Bhutan Bhutan 4.9 +36.5% 204
Botswana Botswana 9.3 -40.6% 201
Central African Republic Central African Republic 38.4 +8.95% 168
Canada Canada 71.6 +1.95% 61
Switzerland Switzerland 76.3 -0.874% 49
Chile Chile 44.4 +3.91% 153
China China 68.1 -1.89% 74
Côte d’Ivoire Côte d’Ivoire 44.5 +4.58% 152
Cameroon Cameroon 49.8 -0.839% 137
Congo - Kinshasa Congo - Kinshasa 43.8 +15.9% 155
Congo - Brazzaville Congo - Brazzaville 28.4 -27.1% 187
Colombia Colombia 53.5 +7.57% 121
Comoros Comoros 62.2 -0.402% 92
Cape Verde Cape Verde 83.8 +10.3% 29
Costa Rica Costa Rica 61.4 -0.426% 96
Cuba Cuba 52.2 -0.469% 128
Curaçao Curaçao 76.1 -0.629% 50
Cyprus Cyprus 84.7 +2.2% 23
Czechia Czechia 81.2 +1.58% 38
Germany Germany 83.2 +1.88% 32
Djibouti Djibouti 37.5 -9.78% 172
Dominica Dominica 75.8 -5.75% 51
Denmark Denmark 87.2 +3.95% 19
Dominican Republic Dominican Republic 60.2 -1.26% 100
Algeria Algeria 53.3 -10.5% 123
Ecuador Ecuador 51.8 +0.592% 131
Egypt Egypt 62.2 -0.612% 91
Eritrea Eritrea 44.7 +6.93% 151
Spain Spain 70.9 +3.58% 64
Estonia Estonia 91.9 +0.671% 8
Ethiopia Ethiopia 38.6 +28.3% 166
Finland Finland 89.8 +0.716% 12
Fiji Fiji 72.5 +4.16% 59
France France 83.2 +0.762% 31
Faroe Islands Faroe Islands 84.1 -4.21% 27
Micronesia (Federated States of) Micronesia (Federated States of) 86.5 +2.02% 21
Gabon Gabon 67.9 +9.58% 77
United Kingdom United Kingdom 79.6 +3.13% 42
Georgia Georgia 59.7 +11.6% 101
Ghana Ghana 56.4 -0.163% 111
Gibraltar Gibraltar 80.9 -3.15% 40
Guinea Guinea 57 -3.41% 109
Gambia Gambia 77.7 +161% 46
Guinea-Bissau Guinea-Bissau 37.3 -22.5% 173
Equatorial Guinea Equatorial Guinea 53.8 +7.13% 120
Greece Greece 62.3 -1.71% 89
Grenada Grenada 84 -1.12% 28
Greenland Greenland 98.3 -0.27% 1
Guatemala Guatemala 51.9 -1.6% 130
Guam Guam 87.3 -6.67% 18
Guyana Guyana 69.4 -4.37% 69
Hong Kong SAR China Hong Kong SAR China 47.4 +2.29% 141
Honduras Honduras 46.4 -4.31% 146
Croatia Croatia 82.5 +1.81% 34
Haiti Haiti 42.3 +10.5% 158
Hungary Hungary 84.6 +0.806% 26
Indonesia Indonesia 47.2 +2.27% 142
India India 61.4 +4.26% 95
Ireland Ireland 88.2 +3.29% 17
Iran Iran 50.6 -1.34% 133
Iraq Iraq 26.9 +12.4% 190
Iceland Iceland 81.4 +2.78% 37
Israel Israel 73.9 +0.999% 54
Italy Italy 72.5 +3.34% 58
Jamaica Jamaica 67.1 +1.17% 78
Jordan Jordan 56.3 -5.67% 113
Japan Japan 57.7 -1.94% 107
Kazakhstan Kazakhstan 52.4 -26.3% 127
Kenya Kenya 49.4 +1.7% 138
Kyrgyzstan Kyrgyzstan 38.3 +8.64% 169
Cambodia Cambodia 17.6 -42.1% 193
Kiribati Kiribati 62.9 +10.2% 87
St. Kitts & Nevis St. Kitts & Nevis 80.9 -6.48% 39
South Korea South Korea 58.5 -1.3% 104
Kuwait Kuwait 60.3 -1.18% 98
Laos Laos 17.4 0.00000% 194
Lebanon Lebanon 61.3 +13.9% 97
Liberia Liberia 20.5 -16.2% 192
Libya Libya 51.5 -10.8% 132
St. Lucia St. Lucia 89 -2.08% 15
Sri Lanka Sri Lanka 44.9 +23.9% 148
Lesotho Lesotho 5.79 -26.2% 203
Lithuania Lithuania 90.8 +1.68% 9
Luxembourg Luxembourg 97.2 -0.164% 2
Latvia Latvia 90.7 -0.377% 10
Macao SAR China Macao SAR China 63.5 -1.06% 85
Morocco Morocco 72.8 +1.52% 57
Moldova Moldova 58.5 -10.4% 103
Madagascar Madagascar 46.2 +9.04% 147
Maldives Maldives 53.8 -3.74% 119
Mexico Mexico 68 +0.0966% 75
Marshall Islands Marshall Islands 76.4 +2.94% 48
North Macedonia North Macedonia 68.7 -1.72% 70
Mali Mali 16 -17.9% 195
Malta Malta 84.6 -1.47% 25
Myanmar (Burma) Myanmar (Burma) 34.3 -2.55% 180
Montenegro Montenegro 52 -1.64% 129
Mongolia Mongolia 52.6 -8.74% 125
Mozambique Mozambique 42.4 -33.1% 157
Mauritania Mauritania 65.3 -3.82% 82
Mauritius Mauritius 58.1 -0.437% 106
Malawi Malawi 37 -14.3% 175
Malaysia Malaysia 58.4 +0.752% 105
Namibia Namibia 32.6 +16% 184
New Caledonia New Caledonia 89.4 +0.382% 13
Niger Niger 41.9 +8.2% 159
Nigeria Nigeria 65.4 +7.98% 81
Nicaragua Nicaragua 37.3 -10.6% 174
Netherlands Netherlands 69.6 +1.14% 67
Norway Norway 77.9 -0.0183% 45
Nepal Nepal 12.6 -0.148% 199
Nauru Nauru 76.6 -0.583% 47
New Zealand New Zealand 63 +3.98% 86
Oman Oman 71 +2.8% 63
Pakistan Pakistan 52.9 +2.98% 124
Panama Panama 50 -7.32% 136
Peru Peru 47 0.00000% 144
Philippines Philippines 48 -8.6% 140
Palau Palau 84.8 +9.46% 22
Papua New Guinea Papua New Guinea 58.9 +4.04% 102
Poland Poland 82.4 +2.39% 35
North Korea North Korea 0.18 -48% 205
Portugal Portugal 82.5 +2.95% 33
Paraguay Paraguay 27.5 -12.8% 188
Palestinian Territories Palestinian Territories 71.8 +0.509% 60
French Polynesia French Polynesia 68 -6.81% 76
Qatar Qatar 65.9 +6.67% 80
Romania Romania 78.9 +0.252% 44
Russia Russia 22 -33.7% 191
Rwanda Rwanda 38.9 +15.7% 165
Saudi Arabia Saudi Arabia 57 +1.74% 110
Sudan Sudan 62.1 0.00000% 94
Senegal Senegal 54.2 -4.24% 116
Singapore Singapore 60.3 +1.92% 99
Solomon Islands Solomon Islands 43.4 +5.88% 156
Sierra Leone Sierra Leone 35.2 -7.77% 178
El Salvador El Salvador 44.8 -0.851% 150
San Marino San Marino 95 -0.109% 5
Somalia Somalia 15.8 -0.568% 196
Serbia Serbia 68.7 -0.823% 71
South Sudan South Sudan 14.2 +12.9% 197
São Tomé & Príncipe São Tomé & Príncipe 50.1 -7.3% 134
Suriname Suriname 74.1 -1.4% 53
Slovakia Slovakia 90.1 +0.879% 11
Slovenia Slovenia 70.1 -5.68% 65
Sweden Sweden 88.8 +2.14% 16
Eswatini Eswatini 10.8 -0.943% 200
Sint Maarten Sint Maarten 95.6 -1.39% 4
Seychelles Seychelles 71 -10.8% 62
Syria Syria 37.8 0.00000% 170
Chad Chad 29.6 -14.9% 186
Togo Togo 38.5 -12.2% 167
Thailand Thailand 54.2 +1.04% 117
Tajikistan Tajikistan 44.2 +0.00322% 154
Turkmenistan Turkmenistan 27.2 +13.4% 189
Timor-Leste Timor-Leste 36.8 +0.976% 176
Tonga Tonga 69.9 -5.38% 66
Trinidad & Tobago Trinidad & Tobago 73.7 +13.6% 55
Tunisia Tunisia 64.3 +2.8% 84
Turkey Turkey 69.5 +2.1% 68
Tuvalu Tuvalu 92.7 -2.57% 7
Tanzania Tanzania 41.7 -7.26% 161
Uganda Uganda 35 -16.2% 179
Ukraine Ukraine 65 +0.861% 83
Uruguay Uruguay 29.7 +6.64% 185
United States United States 52.5 +3.99% 126
Uzbekistan Uzbekistan 41.6 -8.59% 162
St. Vincent & Grenadines St. Vincent & Grenadines 80.6 +0.519% 41
Venezuela Venezuela 32.7 +3.92% 183
Vietnam Vietnam 48 -1.82% 139
Vanuatu Vanuatu 68.3 +1.34% 72
Samoa Samoa 75.2 -3.49% 52
Kosovo Kosovo 47.1 -8.07% 143
Yemen Yemen 54.7 -13% 115
South Africa South Africa 53.3 +1.91% 122
Zambia Zambia 37.6 +31.4% 171
Zimbabwe Zimbabwe 8.71 +10.5% 202

The indicator of 'Merchandise imports from high-income economies (% of total merchandise imports)' provides valuable insights into the economic and trade interactions between countries classified as high-income and other economies. This metric reflects the share of a country’s merchandise imports that comes from nations with higher income levels, categorically grouped by the World Bank based on gross national income (GNI) per capita. Understanding this indicator is crucial as it reveals dependencies in trade and can serve as an indicator of a nation’s position in the global economy.

In 2020, the global average of merchandise imports from high-income economies stood at 62.31%, a slight decline from previous years. The median value across various regions was 55.06%. This decline may signal shifting trade dynamics, influenced by various factors, including economic shocks, trade policies, and global events such as the COVID-19 pandemic. In this context, understanding changes in import patterns is key for policymakers aiming to navigate and stabilize their economies.

The top five areas with the highest percentages of merchandise imports from high-income economies include Greenland (97.94%), Guam (97.31%), Luxembourg (97.03%), San Marino (96.66%), and Bermuda (93.41%). These areas often reflect a heavy reliance on trade with wealthier nations, indicating that their local economies might be substantially dependent on imported goods or services from these high-income countries. This reliance may be due to limited domestic production capabilities or the strategic choice of sourcing high-quality goods that are typically produced in wealthier economies.

Conversely, the bottom five areas—North Korea (1.13%), Bhutan (6.07%), Lesotho (9.5%), Laos (9.7%), and Afghanistan (10.28%)—demonstrate a markedly different picture. Their low percentages suggest a more insular trade approach, either due to strict trade regulations, limited access to global markets, or an emphasis on self-sufficiency in local production. This stark contrast underscores how economic integration with high-income nations can be a critical driver for growth for some areas while others remain isolated by political or structural barriers.

The relationship between merchandise imports from high-income economies and various other economic indicators is profound. For instance, countries with high import shares from wealthier nations may experience greater foreign direct investment (FDI), technology transfers, and access to better goods and services. This forms a symbiotic relationship fueling economic growth and development. However, an over-dependence on high-income economies can also expose countries to vulnerabilities, especially in times of global economic downturns or geopolitical tensions.

Factors affecting the levels of merchandise imports from high-income economies include political relationships, trade agreements, currency fluctuations, and local production capabilities. For example, countries that are part of free trade agreements with high-income nations significantly benefit from reduced tariffs and trade barriers, leading to increased import levels. Key to understanding changes in this indicator is evaluating the interplay of these factors, as they can shift quickly and dramatically impact trade flow.

To address the complexities surrounding this indicator, countries can consider implementing strategies aimed at diversifying their sources of imports. This could involve developing trade relationships with emerging markets or enhancing local production capabilities to produce goods that are currently being imported from high-income economies. Such a multifaceted approach could help mitigate risks associated with over-dependence on specific economies while also supporting domestic industries.

Solutions to improve trade dynamics include enhancing local industries through investments in technology and skills training, which can help elevate domestic production. This self-reliance can reduce vulnerabilities tied to high-income imports. Additionally, establishing partnerships with other developing countries can facilitate access to alternative goods that are of comparable quality but sourced from a broader range of economies.

Despite its utility, analyzing merchandise imports from high-income economies does come with certain flaws. Data quality and availability can vary significantly between regions, influencing analysis accuracy. Behavioral responses to economic changes can also skew perceptions of the data if policymakers misinterpret trends or ineffectively communicate the importance of this indicator. Therefore, it's vital for industry stakeholders and policymakers to conduct comprehensive analyses and monitor changes in this sector consistently.

In summary, the indicator 'Merchandise imports from high-income economies (% of total merchandise imports)' serves as a critical tool for understanding trade dynamics globally. The values observed in 2020, such as the median of 55.06% and notable extremes in both high and low import areas, provide a nuanced view into global economic relations. As nations navigate the challenges of shifting trade patterns, balancing dependencies and promoting local economic resilience will be paramount in formulating effective trade strategies for the future.

                    
# 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.HI.ZS'

# 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.HI.ZS'

# 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))