Exports of goods and services (current US$)

Source: worldbank.org, 03.09.2025

Year: 2024

Flag Country Value Value change, % Rank
Angola Angola 30,456,566,854 -12.1% 68
Albania Albania 9,813,761,314 +7.79% 94
Argentina Argentina 97,106,594,824 +17.9% 44
Armenia Armenia 19,687,315,204 +37.5% 78
Australia Australia 432,883,024,043 -6.53% 19
Austria Austria 296,936,817,992 -2.41% 28
Azerbaijan Azerbaijan 34,112,882,353 -3.87% 64
Belgium Belgium 526,467,154,049 -2.99% 16
Benin Benin 4,047,363,787 +2.85% 117
Burkina Faso Burkina Faso 6,623,364,848 +12.9% 103
Bangladesh Bangladesh 47,087,839,407 -18.2% 55
Bulgaria Bulgaria 62,622,308,255 -1.18% 51
Bahamas Bahamas 5,982,200,000 +3.6% 107
Bosnia & Herzegovina Bosnia & Herzegovina 12,136,912,441 +0.125% 89
Belarus Belarus 49,423,786,393 +3.28% 54
Bermuda Bermuda 5,056,800,000 +17.3% 111
Brazil Brazil 392,614,111,879 -0.284% 20
Brunei Brunei 11,488,843,570 -0.774% 91
Botswana Botswana 5,053,318,552 -19.3% 112
Central African Republic Central African Republic 425,305,517 +15.2% 128
Canada Canada 727,540,727,212 +0.377% 12
Switzerland Switzerland 675,814,842,375 +3.03% 14
Chile Chile 111,377,047,470 +7.74% 40
China China 3,753,056,083,354 +7.53% 1
Côte d’Ivoire Côte d’Ivoire 23,882,965,562 +23.7% 75
Cameroon Cameroon 7,564,122,758 -7.61% 101
Congo - Kinshasa Congo - Kinshasa 32,984,602,138 +12.3% 66
Congo - Brazzaville Congo - Brazzaville 8,296,952,545 -4.82% 99
Colombia Colombia 66,852,963,831 +2.35% 46
Comoros Comoros 153,247,726 +3.46% 132
Cape Verde Cape Verde 1,158,441,590 +19% 125
Costa Rica Costa Rica 36,740,228,685 +9.15% 61
Cyprus Cyprus 35,130,903,030 +6.7% 62
Czechia Czechia 238,901,185,203 +0.914% 29
Germany Germany 1,961,842,741,502 -0.123% 3
Djibouti Djibouti 6,570,593,565 +11.8% 104
Denmark Denmark 299,447,624,010 +8.24% 27
Dominican Republic Dominican Republic 28,296,491,456 +10.2% 71
Ecuador Ecuador 37,750,170,800 +9.08% 60
Egypt Egypt 63,713,393,368 -15.8% 49
Spain Spain 642,459,915,792 +4.19% 15
Estonia Estonia 32,617,706,442 +1.46% 67
Finland Finland 124,585,239,095 -1.99% 37
France France 1,051,204,231,156 +0.481% 5
Micronesia (Federated States of) Micronesia (Federated States of) 129,500,000 +2.95% 133
Gabon Gabon 13,621,520,025 +5.85% 87
United Kingdom United Kingdom 1,116,387,681,450 +3.59% 4
Georgia Georgia 16,335,736,849 +7.73% 82
Ghana Ghana 29,197,465,999 +14.1% 70
Guinea Guinea 11,156,668,290 +12.8% 92
Gambia Gambia 164,275,376 -28.6% 131
Guinea-Bissau Guinea-Bissau 264,469,400 -6.98% 130
Equatorial Guinea Equatorial Guinea 4,488,990,305 -0.594% 114
Greece Greece 107,947,859,589 +1.43% 41
Guatemala Guatemala 17,990,664,453 +3.8% 80
Hong Kong SAR China Hong Kong SAR China 739,831,054,816 +9.82% 11
Honduras Honduras 12,444,557,871 -3.07% 88
Croatia Croatia 46,077,395,486 +3.14% 57
Haiti Haiti 857,816,740 -18% 126
Hungary Hungary 166,429,200,440 -3.8% 32
Indonesia Indonesia 309,745,619,367 +3.84% 25
India India 828,633,462,822 +6.18% 9
Ireland Ireland 852,093,091,981 +14.4% 8
Iran Iran 100,031,086,882 +2.15% 43
Iraq Iraq 104,886,427,210 -1.57% 42
Iceland Iceland 13,916,763,091 +1.85% 85
Israel Israel 153,655,742,279 -1.35% 33
Italy Italy 776,676,933,964 +0.496% 10
Jordan Jordan 22,734,507,042 +2.26% 77
Kenya Kenya 13,865,029,448 +9.82% 86
Cambodia Cambodia 33,078,910,280 +16.8% 65
Kiribati Kiribati 19,305,909 +13% 135
Libya Libya 34,896,676,633 -9.08% 63
Sri Lanka Sri Lanka 19,680,136,462 +13.6% 79
Lithuania Lithuania 62,899,954,052 +3.08% 50
Luxembourg Luxembourg 200,842,485,749 +5.31% 31
Latvia Latvia 28,123,865,141 -0.6% 72
Macao SAR China Macao SAR China 45,040,514,103 +7.64% 58
Morocco Morocco 66,846,859,293 +8.27% 47
Moldova Moldova 5,717,372,649 -2.57% 109
Madagascar Madagascar 4,115,674,395 -3.96% 116
Mexico Mexico 681,537,898,901 +5.05% 13
North Macedonia North Macedonia 10,457,925,476 -2.18% 93
Mali Mali 5,986,892,001 -2.33% 106
Malta Malta 30,029,427,943 +8.51% 69
Montenegro Montenegro 3,621,062,630 -3.74% 118
Mongolia Mongolia 16,306,989,868 +5.21% 83
Mozambique Mozambique 9,579,549,359 +0.966% 96
Mauritius Mauritius 6,908,978,680 +3.07% 102
Malaysia Malaysia 301,096,580,804 +9.84% 26
Namibia Namibia 5,568,765,490 +2.87% 110
Niger Niger 6,086,748,350 +53.8% 105
Nicaragua Nicaragua 7,968,788,635 -2.39% 100
Netherlands Netherlands 1,032,789,042,813 +1.05% 6
Norway Norway 230,048,794,106 -0.58% 30
Nepal Nepal 3,270,882,001 +13.7% 119
Nauru Nauru 63,300,439 -3.77% 134
Pakistan Pakistan 38,809,744,691 +9.59% 59
Peru Peru 82,536,982,274 +13.9% 45
Philippines Philippines 118,974,717,245 +2.2% 39
Poland Poland 478,651,059,352 +1.78% 17
Puerto Rico Puerto Rico 65,368,200,000 +2.84% 48
Portugal Portugal 143,474,926,799 +4.25% 34
Paraguay Paraguay 16,539,167,594 -8.81% 81
Palestinian Territories Palestinian Territories 2,884,800,000 -8.92% 120
Romania Romania 136,250,695,894 -0.791% 35
Russia Russia 476,430,904,567 +2.25% 18
Rwanda Rwanda 4,392,652,633 +22.6% 115
Saudi Arabia Saudi Arabia 360,914,400,000 -2.07% 23
Sudan Sudan 595,475,102 +34.7% 127
Senegal Senegal 9,053,082,116 +27.6% 98
Singapore Singapore 978,597,520,043 +6.64% 7
Sierra Leone Sierra Leone 1,580,505,941 +14.5% 124
El Salvador El Salvador 11,585,810,000 +9% 90
Somalia Somalia 2,424,022,460 +12% 121
Serbia Serbia 46,940,372,435 +4.78% 56
Slovakia Slovakia 120,825,540,747 -1.14% 38
Slovenia Slovenia 59,100,412,197 +2.66% 52
Sweden Sweden 333,132,297,068 +2.74% 24
Seychelles Seychelles 1,845,801,876 +1.17% 123
Chad Chad 5,799,422,119 +1.75% 108
Togo Togo 2,420,208,427 +10.4% 122
Thailand Thailand 368,824,202,323 +9.24% 22
Tunisia Tunisia 25,869,112,802 +0.00222% 74
Turkey Turkey 371,107,726,343 +3.98% 21
Tanzania Tanzania 15,622,427,610 +14.9% 84
Uganda Uganda 9,069,963,314 +60.3% 97
Ukraine Ukraine 56,097,413,814 +9.38% 53
Uruguay Uruguay 23,285,155,540 +6.1% 76
United States United States 3,180,241,000,000 +4.19% 2
Uzbekistan Uzbekistan 26,172,759,004 +4.4% 73
Samoa Samoa 313,097,034 +16.1% 129
Kosovo Kosovo 4,673,577,702 +12.6% 113
South Africa South Africa 127,482,421,006 +2.23% 36
Zimbabwe Zimbabwe 9,767,991,415 +28.5% 95

Exports of goods and services (current US$) is a critical economic indicator that measures the monetary value of goods and services sold by a country to the rest of the world during a specified period, reflecting a nation's economic health and trade competitiveness. This indicator is not only pivotal in gauging national economic performance but it also plays a significant role in assessing foreign exchange flows, establishing currency valuation, and determining a country’s balance of trade.

The importance of exports of goods and services lies in its direct correlation with a nation’s GDP, provided that exports are a significant component of the overall economic activity. A thriving export sector typically suggests that domestic industries are competitive on a global scale, leading to increased production, job creation, and overall economic growth. Furthermore, countries that successfully export more than they import tend to enjoy surplus balances, which can strengthen their currency and provide additional resources for investment in infrastructure, education, and technology.

This indicator is closely related to various other economic metrics, including GDP, trade balance, employment rates, and foreign direct investment (FDI). For instance, a rise in exports contributes positively to GDP growth, while a deficit in the trade balance may trigger devaluation of a currency, leading to inflationary pressures. Moreover, robust export activity often attracts foreign direct investment, as multinational companies are more likely to invest in markets that exhibit strong growth potential.

Several factors affect the exports of goods and services, including domestic production capabilities, global economic conditions, and international trade policies. For instance, an increase in production efficiency or adoption of innovative technologies can enhance the competitiveness of exporters. Conversely, global economic downturns or trade restrictions such as tariffs can adversely impact export levels. Additionally, exchange rates play a crucial role; a weaker domestic currency can make exports cheaper for foreign buyers, potentially boosting sales overseas.

Strategies to enhance exports may include investing in technology, improving supply chain efficiencies, and fostering trade relationships through negotiations and trade agreements. Countries may also focus on promoting diversification of their export products and expanding into emerging markets, thus reducing dependence on a narrow range of trading partners or products.

While the indicators of export performance are typically positive, it is essential to acknowledge potential flaws. An over-reliance on export markets can make an economy vulnerable to global economic fluctuations, resulting in significant volatility in domestic economic conditions. Furthermore, certain industries may experience adverse effects if their growth is prioritized at the expense of local consumption and industries.

In 2023, exports of goods and services reached approximately $31.13 trillion, indicating a slight decline from the previous year’s total of $31.54 trillion. The median export figure across various countries during this period stood at about $25.83 billion, illustrating considerable disparities in export volumes across different nations.

Among the leading exporters, China topped the list with exports amounting to over $3.5 trillion, followed by the United States at approximately $3.05 trillion, and Germany with around $1.96 trillion. Other notable exporters include the United Kingdom and France, with figures of about $1.07 trillion and $1.05 trillion, respectively. The dominance of these nations can be attributed to their diversified and advanced industrial bases, significant global market engagement, and robust trade agreements.

Conversely, the bottom five areas in terms of export indicators include Kiribati ($20.57 million), Nauru ($65.78 million), Marshall Islands ($100.93 million), Federated States of Micronesia ($125.79 million), and Burundi ($139.07 million). These figures highlight the challenges faced by smaller or less developed economies in competing within the global market, often stemming from poor infrastructure, limited production capabilities, and a narrowed economic base reliant on a few commodities or sectors.

Reviewing the historical trends of exports from 1970 to 2023, one can observe a remarkable increase from approximately $387.3 billion in 1970 to $31.13 trillion in 2023. This growth reveals the significant expansion of global trade and the increased interconnectedness of national economies. Despite fluctuations during economic crises—such as the drop observed in the 2008 financial crisis—the overall trend remains upward as globalization continues and the world becomes more integrated economically.

In conclusion, exports of goods and services (current US$) serve as a vital indicator of economic health, influencing a broad spectrum of financial outcomes for nations. Fostering robust export levels can drive growth, increase employment, and position countries favorably within the global economy. While pursuing export growth, policymakers must remain vigilant in addressing potential vulnerabilities, ensuring that domestic economic stability is maintained alongside their global trading aspirations.

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