Real effective exchange rate index (2010 = 100)

Source: worldbank.org, 03.09.2025

Year: 2024

Flag Country Value Value change, % Rank
Armenia Armenia 122 -3.68% 12
Antigua & Barbuda Antigua & Barbuda 116 +1.68% 20
Australia Australia 92 +1.84% 69
Austria Austria 108 +0.891% 36
Burundi Burundi 141 +4.18% 4
Belgium Belgium 104 +1.03% 47
Bulgaria Bulgaria 118 -0.191% 18
Bahrain Bahrain 104 -0.503% 46
Bahamas Bahamas 96.2 -2.45% 61
Belize Belize 106 +1.17% 40
Bolivia Bolivia 157 +5.2% 3
Brazil Brazil 60.7 -4.2% 91
Central African Republic Central African Republic 128 -0.617% 10
Canada Canada 80.5 -0.929% 83
Switzerland Switzerland 111 +1.37% 31
Chile Chile 84.1 -8.5% 80
China China 113 -2.57% 25
Côte d’Ivoire Côte d’Ivoire 99.4 +2.49% 54
Cameroon Cameroon 109 +3.67% 33
Congo - Kinshasa Congo - Kinshasa 128 +0.456% 11
Colombia Colombia 74.6 +11.8% 85
Costa Rica Costa Rica 119 +3.54% 17
Cyprus Cyprus 88.1 -0.166% 74
Czechia Czechia 120 -4.47% 15
Germany Germany 97.4 +0.291% 58
Dominica Dominica 94.5 -1.55% 64
Denmark Denmark 94.2 -0.892% 65
Dominican Republic Dominican Republic 85.8 -5.07% 77
Algeria Algeria 106 +3.62% 43
Spain Spain 97.2 +0.584% 59
Finland Finland 98.6 -0.492% 55
Fiji Fiji 108 +1.64% 35
France France 91.9 -0.0899% 70
Gabon Gabon 101 -0.105% 52
United Kingdom United Kingdom 108 +4.25% 34
Georgia Georgia 112 -6.49% 28
Ghana Ghana 67.8 -4.87% 89
Gambia Gambia 104 -0.998% 45
Equatorial Guinea Equatorial Guinea 102 +1.27% 49
Greece Greece 87.3 -0.183% 75
Grenada Grenada 88.4 -2.14% 73
Guyana Guyana 113 +0.148% 27
Croatia Croatia 98.1 +0.475% 57
Hungary Hungary 93.2 -2.1% 67
Ireland Ireland 88.8 -0.0709% 72
Iran Iran 625 +30.9% 1
Iceland Iceland 138 +3.2% 6
Israel Israel 106 +0.25% 39
Italy Italy 95 -1.11% 63
Japan Japan 55 -5.36% 92
St. Kitts & Nevis St. Kitts & Nevis 90.1 -2.37% 71
St. Lucia St. Lucia 97.2 -3.96% 60
Lesotho Lesotho 77.8 +4.04% 84
Luxembourg Luxembourg 98.5 -0.168% 56
Latvia Latvia 116 -0.947% 21
Morocco Morocco 101 +0.288% 50
Moldova Moldova 180 +4% 2
Mexico Mexico 100 +0.172% 53
North Macedonia North Macedonia 111 +1.16% 30
Malta Malta 92.4 +0.0612% 68
Malawi Malawi 84.2 -15.5% 79
Malaysia Malaysia 80.9 +1.09% 82
Nigeria Nigeria 63.9 -44.7% 90
Nicaragua Nicaragua 101 +2.24% 51
Netherlands Netherlands 105 +1.18% 44
Norway Norway 73.6 -0.603% 86
New Zealand New Zealand 106 +0.44% 41
Pakistan Pakistan 102 +12.1% 48
Philippines Philippines 114 +0.506% 23
Papua New Guinea Papua New Guinea 121 -6.86% 13
Poland Poland 113 +7.45% 26
Portugal Portugal 95.6 -0.047% 62
Paraguay Paraguay 107 +0.394% 38
Romania Romania 112 +2.5% 29
Russia Russia 83 +1.34% 81
Saudi Arabia Saudi Arabia 120 +0.578% 16
Singapore Singapore 121 +2.86% 14
Solomon Islands Solomon Islands 139 +2.24% 5
Sierra Leone Sierra Leone 113 +19.3% 24
Slovakia Slovakia 114 +0.421% 22
Sweden Sweden 84.5 +1.27% 78
Togo Togo 107 +3.45% 37
Trinidad & Tobago Trinidad & Tobago 128 -1% 9
Tunisia Tunisia 93.2 +5.21% 66
Uganda Uganda 110 +2.27% 32
Ukraine Ukraine 87.1 -5% 76
Uruguay Uruguay 129 +0.928% 8
United States United States 131 +2.36% 7
St. Vincent & Grenadines St. Vincent & Grenadines 106 +0.127% 42
Samoa Samoa 117 -0.244% 19
South Africa South Africa 72.6 +3.94% 88
Zambia Zambia 73.2 -13.3% 87

                    
# 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 = 'PX.REX.REER'

# 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 <- 'PX.REX.REER'

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