Imports of goods and services (current US$)

Source: worldbank.org, 03.09.2025

Year: 2024

Flag Country Value Value change, % Rank
Angola Angola 19,627,446,976 -11.6% 80
Albania Albania 11,675,880,655 +13.1% 97
Argentina Argentina 81,217,515,280 -9.5% 47
Armenia Armenia 19,544,455,733 +34.7% 81
Australia Australia 396,153,730,163 +2.22% 18
Austria Austria 279,663,095,102 -4.7% 26
Azerbaijan Azerbaijan 27,338,823,529 +9.28% 73
Belgium Belgium 526,554,393,915 -3.66% 16
Benin Benin 4,683,140,137 -3.47% 118
Burkina Faso Burkina Faso 8,123,862,055 +11.2% 106
Bangladesh Bangladesh 73,445,483,737 -5.81% 49
Bulgaria Bulgaria 60,012,834,086 +1.43% 52
Bahamas Bahamas 6,564,100,000 +11% 110
Bosnia & Herzegovina Bosnia & Herzegovina 16,199,212,310 +5.43% 88
Belarus Belarus 50,783,533,445 +6.88% 57
Bermuda Bermuda 2,173,900,000 +8.47% 125
Brazil Brazil 381,757,594,590 +11% 20
Brunei Brunei 9,111,641,748 +0.335% 101
Botswana Botswana 7,940,453,017 +11.9% 108
Central African Republic Central African Republic 890,571,762 +20% 128
Canada Canada 733,286,478,033 +1.37% 9
Switzerland Switzerland 580,072,309,989 +4.63% 14
Chile Chile 99,531,074,993 -0.832% 43
China China 3,219,342,570,132 +3.63% 2
Côte d’Ivoire Côte d’Ivoire 23,424,926,856 +6.02% 76
Cameroon Cameroon 10,855,090,029 +6.91% 99
Congo - Kinshasa Congo - Kinshasa 35,992,232,447 +15.3% 61
Congo - Brazzaville Congo - Brazzaville 6,352,207,282 +5.46% 111
Colombia Colombia 87,541,726,134 +5.95% 46
Comoros Comoros 532,834,545 +5.43% 132
Cape Verde Cape Verde 1,473,401,025 +3.15% 126
Costa Rica Costa Rica 31,274,194,800 +7.75% 67
Cyprus Cyprus 33,828,768,576 +3.87% 63
Czechia Czechia 216,255,331,979 -1.51% 29
Germany Germany 1,782,162,171,787 -0.0459% 3
Djibouti Djibouti 6,058,490,621 +15% 113
Denmark Denmark 253,019,229,667 +3.92% 28
Dominican Republic Dominican Republic 36,061,223,105 +4.97% 60
Ecuador Ecuador 33,568,458,200 -2.54% 64
Egypt Egypt 90,357,257,459 +6.92% 45
Spain Spain 568,717,334,456 +2.85% 15
Estonia Estonia 32,376,456,824 +1.83% 66
Finland Finland 122,652,107,577 -2.8% 37
France France 1,074,439,259,727 -2.96% 5
Micronesia (Federated States of) Micronesia (Federated States of) 325,900,000 +4.9% 133
Gabon Gabon 6,093,717,009 +13.3% 112
United Kingdom United Kingdom 1,157,638,190,815 +3.93% 4
Georgia Georgia 18,904,731,215 +6.11% 83
Ghana Ghana 28,244,066,026 +7.51% 71
Guinea Guinea 14,201,251,809 +22.6% 90
Gambia Gambia 932,484,700 +18.5% 127
Guinea-Bissau Guinea-Bissau 597,496,108 +2.97% 130
Equatorial Guinea Equatorial Guinea 3,239,596,744 +5.7% 123
Greece Greece 121,725,115,813 +3.18% 38
Guatemala Guatemala 35,602,767,957 +7.64% 62
Hong Kong SAR China Hong Kong SAR China 723,319,425,211 +7.73% 10
Honduras Honduras 21,351,448,804 +1.18% 79
Croatia Croatia 48,961,993,910 +5.93% 58
Haiti Haiti 4,754,024,349 -6.14% 117
Hungary Hungary 154,057,662,552 -5.62% 34
Indonesia Indonesia 284,696,296,711 +6.03% 25
India India 919,206,200,071 +7.3% 6
Ireland Ireland 608,488,214,162 +8.02% 13
Iran Iran 117,176,432,836 +3.5% 41
Iraq Iraq 104,107,446,824 +29.8% 42
Iceland Iceland 14,299,702,783 +5.03% 89
Israel Israel 140,591,934,051 -0.473% 35
Italy Italy 722,349,227,572 -2.37% 11
Jordan Jordan 30,446,760,563 +4.87% 68
Kenya Kenya 23,849,730,392 +8.18% 75
Cambodia Cambodia 33,412,575,810 +17.2% 65
Kiribati Kiribati 292,099,738 -0.45% 134
Libya Libya 27,562,617,338 -13.4% 72
Sri Lanka Sri Lanka 22,277,780,976 +16.5% 78
Lithuania Lithuania 58,504,093,078 +1.04% 53
Luxembourg Luxembourg 170,295,309,284 +4.16% 31
Latvia Latvia 29,238,158,515 -2.13% 70
Macao SAR China Macao SAR China 22,767,680,445 -1.86% 77
Morocco Morocco 81,032,641,419 +9.94% 48
Moldova Moldova 10,420,162,581 +5.89% 100
Madagascar Madagascar 5,460,799,873 +0.82% 115
Mexico Mexico 702,660,930,830 +4.17% 12
North Macedonia North Macedonia 12,647,479,772 -0.769% 95
Mali Mali 7,546,509,682 -6.44% 109
Malta Malta 25,801,319,891 +7.69% 74
Montenegro Montenegro 5,450,935,181 +5.53% 116
Mongolia Mongolia 16,452,028,122 +21.5% 87
Mozambique Mozambique 11,866,866,093 -6.16% 96
Mauritius Mauritius 8,641,318,721 +6.45% 104
Malaysia Malaysia 278,551,056,971 +9.78% 27
Namibia Namibia 9,091,147,220 +9.12% 102
Niger Niger 4,066,640,600 +6.96% 119
Nicaragua Nicaragua 11,434,873,062 +8.56% 98
Netherlands Netherlands 884,311,337,252 -0.985% 7
Norway Norway 162,844,978,674 +3.9% 32
Nepal Nepal 14,122,194,838 -0.463% 91
Nauru Nauru 190,360,799 +25.1% 135
Pakistan Pakistan 63,703,262,471 +4.04% 51
Peru Peru 66,342,594,208 +5.08% 50
Philippines Philippines 185,164,160,350 +3.88% 30
Poland Poland 441,992,190,984 +4.33% 17
Puerto Rico Puerto Rico 53,898,400,000 -5.26% 55
Portugal Portugal 137,862,232,055 +2.66% 36
Paraguay Paraguay 17,618,518,950 +1.29% 85
Palestinian Territories Palestinian Territories 8,264,200,000 -25.1% 105
Romania Romania 159,597,446,938 +3.55% 33
Russia Russia 382,411,727,676 +0.649% 19
Rwanda Rwanda 5,577,000,114 -2.47% 114
Saudi Arabia Saudi Arabia 317,307,466,667 +8.83% 23
Sudan Sudan 633,066,206 +16.2% 129
Senegal Senegal 13,920,844,420 -6.08% 92
Singapore Singapore 786,020,626,642 +7.9% 8
Sierra Leone Sierra Leone 3,286,177,120 +49.2% 122
El Salvador El Salvador 18,354,040,000 +7.75% 84
Somalia Somalia 9,001,608,010 +12.5% 103
Serbia Serbia 52,352,957,449 +8.32% 56
Slovakia Slovakia 120,539,756,585 +0.299% 39
Slovenia Slovenia 54,325,910,723 +2.23% 54
Sweden Sweden 306,338,226,156 +1.88% 24
Seychelles Seychelles 2,236,609,631 +4.96% 124
Chad Chad 3,556,943,112 +8.74% 121
Togo Togo 3,780,817,642 +9.87% 120
Thailand Thailand 351,173,464,106 +7.4% 22
Tunisia Tunisia 30,205,800,694 +5.79% 69
Turkey Turkey 367,556,720,372 -4.34% 21
Tanzania Tanzania 17,081,552,801 +2.8% 86
Uganda Uganda 13,178,548,058 +24.3% 94
Ukraine Ukraine 92,209,662,586 +3.4% 44
Uruguay Uruguay 19,191,233,873 -0.662% 82
United States United States 4,083,292,000,000 +6.06% 1
Uzbekistan Uzbekistan 43,642,721,046 +2.01% 59
Samoa Samoa 574,770,111 -1.03% 131
Kosovo Kosovo 8,064,858,979 +9.57% 107
South Africa South Africa 119,488,844,845 -3.2% 40
Zimbabwe Zimbabwe 13,507,004,092 +31.2% 93

The measurement of imports of goods and services, expressed in current US dollars, serves as a crucial economic indicator reflecting the economic activity of a nation. This indicator encompasses all goods and services purchased from other countries and is pivotal in understanding a country's trade dynamics. In 2023, global imports stood at approximately $30.25 trillion, signifying the interconnectedness of economies and the significance of international trade in contemporary economic frameworks.

To comprehend the role and importance of imports, one must recognize their direct correlation with a nation's economic growth. High levels of imports can indicate robust domestic demand, suggesting a healthy economy that seeks foreign goods and services to satisfy its needs. Conversely, too high an import figure relative to exports might signal trade imbalances, leading to concerns regarding dependence on foreign goods or potential economic vulnerabilities. The median value of imports, recorded at approximately $26.78 billion, can serve as a benchmark for many nations, indicating both the scale of economic activity and the level of integration into the global market.

On examining the top importing nations in 2023, it becomes clear that the United States leads significantly with imports of around $3.85 trillion, followed by China at $3.13 trillion. Germany, France, and the United Kingdom also feature prominently, with their imports valued at approximately $1.78 trillion, $1.11 trillion, and $1.09 trillion, respectively. These statistics showcase not only the economic might of these nations but also their reliance on global supply chains. The dominance of these countries in import figures can be attributed to numerous factors including high consumer demand, diverse economies, and established trade relationships.

Conversely, the bottom five areas in terms of imports highlight smaller economies, with Nauru leading this category with a modest $152 million in imports. The Marshall Islands, Kiribati, Federated States of Micronesia, and Comoros follow, reflecting economies that may be less integrated into international trade networks. Low import values in these instances typically correlate with limited domestic production capabilities, smaller populations, or geographical isolation, which inherently restrict the breadth of goods and services accessible to these nations.

The historical trends in global imports from 1970 to 2023 reveal a compelling narrative of economic development. In 1970, total world imports were approximately $384.72 billion, a figure that has shown a consistent upward trajectory, peaking at around $30.25 trillion in 2023. This exponential growth illustrates the rise of globalization and the increasing significance of international trade within global economics. The sharp increase in imports during the early 2000s signifies a pivotal shift as markets became increasingly interconnected and countries expanded their trade agreements.

Import levels do not exist in a vacuum; they relate closely to various economic indicators, including Gross Domestic Product (GDP), trade balances, and exchange rates. Understanding these relationships can provide insights into overall economic health. For instance, a country experiencing significant growth in GDP may simultaneously see a rise in imports as local consumers demand more foreign goods. However, if imports grow at a faster rate than exports, a trade deficit may arise, which could prompt policymakers to consider strategies for balancing trade through measures like tariffs or promoting local industries.

Several factors influence a nation’s import levels. Economic growth, consumer preferences, currency strength, and trade agreements all play vital roles. For example, favorable exchange rates can make imported goods cheaper, thus increasing their demand. Furthermore, ongoing trade agreements can facilitate easier access to foreign markets, enhancing import capacities. Additionally, international events such as political turmoil, global pandemics, or changes in environmental policies can disrupt supply chains, which may impact import volumes adversely.

To enhance positive outcomes associated with imports, countries may employ strategies focused on fostering economic resilience. This could include diversifying supply chains to mitigate risks from relying on a single country or region for goods. Investment in local production capabilities can also strengthen economies by ensuring that basic needs are met domestically, potentially reducing dependence on imports for essential goods.

While the increasing trend in imports suggests a growing global economy, this situation is not without its flaws. A heavy reliance on imports can lead to vulnerabilities, particularly during economic downturns or geopolitical instability. Countries must remain vigilant, ensuring that their economies can withstand shocks to the international trade system. A balanced economic strategy incorporating both imports and local industry support can create more sustainable growth patterns.

In summary, the import of goods and services in current US$ is a complex, multifaceted indicator of economic health. As of 2023, the global figure underscores the importance of international trade. By examining the dynamics of imports among various nations, from economic giants to smaller economies, we gain insight into the broader patterns that define global economic relations. Moving forward, understanding the interplay of imports with other economic indicators, addressing the factors affecting them, and promoting balanced strategies can enhance countries' economic resilience and sustainability.

                    
# 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 = 'NE.IMP.GNFS.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 <- 'NE.IMP.GNFS.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))