Exports of goods and services (constant 2015 US$)

Source: worldbank.org, 03.09.2025

Year: 2024

Flag Country Value Value change, % Rank
Angola Angola 18,005,046,630 +5.05% 72
Albania Albania 5,644,897,064 -0.764% 98
Argentina Argentina 81,097,758,532 +23.2% 41
Armenia Armenia 12,358,222,643 +35.6% 77
Australia Australia 327,232,632,074 +3.88% 17
Austria Austria 246,107,221,704 -4.27% 25
Belgium Belgium 430,004,587,120 -3.42% 15
Benin Benin 4,103,098,785 +4.38% 107
Burkina Faso Burkina Faso 4,287,084,375 -4.92% 104
Bangladesh Bangladesh 41,879,972,086 -17.1% 51
Bulgaria Bulgaria 44,105,810,725 -0.821% 50
Bahamas Bahamas 4,811,815,669 +6.18% 102
Bosnia & Herzegovina Bosnia & Herzegovina 8,638,697,085 -3.07% 87
Belarus Belarus 38,752,815,511 +2.95% 53
Bermuda Bermuda 4,009,937,865 +11.7% 108
Brazil Brazil 301,455,244,775 +2.89% 21
Brunei Brunei 9,677,900,278 +3.98% 85
Botswana Botswana 5,053,046,398 -10.4% 100
Central African Republic Central African Republic 188,285,925 +24.7% 127
Canada Canada 559,861,647,659 +0.627% 11
Switzerland Switzerland 551,596,182,022 -0.276% 12
Chile Chile 75,698,831,724 +6.64% 42
Côte d’Ivoire Côte d’Ivoire 20,331,621,557 +0.2% 70
Cameroon Cameroon 6,791,031,251 -4.04% 93
Congo - Kinshasa Congo - Kinshasa 23,339,369,962 +11.9% 64
Congo - Brazzaville Congo - Brazzaville 5,651,853,701 -0.487% 97
Colombia Colombia 51,266,664,188 +2% 47
Comoros Comoros 132,035,618 -0.314% 128
Cape Verde Cape Verde 936,818,873 +10.8% 122
Costa Rica Costa Rica 30,939,509,790 +5.77% 57
Cyprus Cyprus 32,511,457,016 +5.26% 56
Czechia Czechia 192,570,796,648 +1.82% 27
Germany Germany 1,635,426,825,434 -1.13% 2
Djibouti Djibouti 6,449,893,176 +9.4% 95
Denmark Denmark 256,267,240,751 +7.53% 24
Dominican Republic Dominican Republic 23,911,153,811 +7.78% 63
Ecuador Ecuador 26,826,690,125 +1.79% 58
Egypt Egypt 106,819,527,649 -10.6% 35
Spain Spain 509,964,285,742 +3.09% 13
Estonia Estonia 23,304,732,843 -1.12% 65
Ethiopia Ethiopia 8,468,156,546 +15% 88
Finland Finland 104,618,190,211 +0.0902% 36
France France 908,225,707,911 +1.25% 4
Gabon Gabon 10,921,524,639 +3.97% 79
United Kingdom United Kingdom 948,905,493,764 -1.16% 3
Georgia Georgia 10,846,454,542 +5.9% 80
Ghana Ghana 25,349,015,163 +9.05% 60
Guinea Guinea 10,113,717,532 +7.6% 84
Gambia Gambia 214,452,931 +18.4% 126
Guinea-Bissau Guinea-Bissau 257,970,155 -8.72% 125
Equatorial Guinea Equatorial Guinea 3,489,980,610 -0.2% 112
Greece Greece 82,930,147,388 +1.03% 40
Guatemala Guatemala 13,997,576,277 +2.21% 75
Hong Kong SAR China Hong Kong SAR China 587,928,189,855 +4.73% 10
Honduras Honduras 9,421,621,984 -4.82% 86
Croatia Croatia 37,223,971,962 +0.891% 54
Haiti Haiti 782,939,875 -31.9% 123
Hungary Hungary 148,689,222,276 -2.98% 30
Indonesia Indonesia 280,358,383,048 +6.51% 23
India India 720,542,751,213 +7.12% 8
Ireland Ireland 785,381,559,321 +11.7% 7
Iran Iran 95,663,044,965 +6.14% 39
Iraq Iraq 57,627,562,619 -0.143% 43
Iceland Iceland 10,220,202,433 -1.25% 83
Israel Israel 123,611,038,437 -5.56% 32
Italy Italy 652,179,370,106 +0.359% 9
Kenya Kenya 11,218,093,191 +5.54% 78
Cambodia Cambodia 24,342,336,105 +14.4% 62
Kiribati Kiribati 17,722,644 +11.5% 129
Libya Libya 18,995,300,584 -6.9% 71
Sri Lanka Sri Lanka 22,213,267,885 +12.5% 66
Lithuania Lithuania 51,607,912,622 +2.08% 46
Luxembourg Luxembourg 152,961,454,587 +0.281% 29
Latvia Latvia 21,509,949,631 -1.59% 68
Macao SAR China Macao SAR China 40,860,611,621 +6.01% 52
Morocco Morocco 55,879,756,481 +8.56% 44
Moldova Moldova 4,383,644,452 -5.02% 103
Madagascar Madagascar 5,481,482,655 +0.845% 99
Mexico Mexico 496,672,942,188 +3.34% 14
North Macedonia North Macedonia 7,663,681,269 -3.79% 90
Mali Mali 4,210,009,460 +0.1% 105
Malta Malta 25,050,896,102 +5.31% 61
Montenegro Montenegro 2,566,829,337 -3.18% 115
Mongolia Mongolia 10,475,833,314 +0.685% 81
Mozambique Mozambique 6,681,125,997 -3% 94
Mauritius Mauritius 6,115,227,748 +2.06% 96
Malaysia Malaysia 287,769,744,109 +8.5% 22
Namibia Namibia 4,909,477,163 +0.0801% 101
Niger Niger 2,156,760,104 +48.5% 118
Nicaragua Nicaragua 6,933,425,767 -4.91% 92
Netherlands Netherlands 820,616,361,759 +0.392% 5
Norway Norway 177,699,080,292 +5.65% 28
Nepal Nepal 2,635,647,516 +11.8% 114
Pakistan Pakistan 45,290,167,790 -1.09% 49
Peru Peru 55,874,843,932 +5.37% 45
Philippines Philippines 129,060,536,333 +3.31% 31
Poland Poland 381,911,473,670 +1.97% 16
Portugal Portugal 114,667,803,002 +3.37% 33
Paraguay Paraguay 17,422,589,809 -2.01% 73
Palestinian Territories Palestinian Territories 2,425,800,000 -11.1% 116
Romania Romania 109,654,745,966 -3.08% 34
Rwanda Rwanda 4,209,370,018 +16% 106
Saudi Arabia Saudi Arabia 245,336,817,979 +3.66% 26
Sudan Sudan 3,781,601,934 +16.4% 111
Senegal Senegal 8,248,478,364 +41.3% 89
Singapore Singapore 811,989,598,676 +5.44% 6
Sierra Leone Sierra Leone 1,294,212,660 +6.5% 121
El Salvador El Salvador 10,282,915,473 +12.1% 82
Somalia Somalia 1,758,131,220 +10.7% 119
Serbia Serbia 35,738,786,117 +3.23% 55
Slovakia Slovakia 99,754,058,584 +0.311% 38
Slovenia Slovenia 49,169,927,642 +3.18% 48
Sweden Sweden 311,055,177,464 +2.35% 18
Seychelles Seychelles 1,706,834,978 +3.82% 120
Chad Chad 3,838,626,297 +2.97% 110
Togo Togo 2,266,506,602 +5.8% 117
Thailand Thailand 307,445,228,649 +7.84% 20
Tunisia Tunisia 21,350,422,287 -0.819% 69
Turkey Turkey 309,635,419,465 +0.946% 19
Tanzania Tanzania 12,693,386,654 +16.4% 76
Uganda Uganda 7,606,627,931 +46.4% 91
Ukraine Ukraine 26,763,004,127 +10.3% 59
Uruguay Uruguay 16,922,621,235 +8.33% 74
United States United States 2,592,182,839,139 +3.27% 1
Uzbekistan Uzbekistan 21,561,808,718 -5.93% 67
Samoa Samoa 266,264,643 -1.76% 124
Kosovo Kosovo 3,848,284,319 +9.65% 109
South Africa South Africa 100,105,750,850 -2.04% 37
Zimbabwe Zimbabwe 3,313,235,791 -1.26% 113

                    
# 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.KD'

# 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.KD'

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