Multilateral debt service (% of public and publicly guaranteed debt service)

Source: worldbank.org, 03.09.2025

Year: 2023

Flag Country Value Value change, % Rank
Afghanistan Afghanistan 100 0% 1
Angola Angola 3.54 +23.8% 117
Albania Albania 63.8 +5% 27
Argentina Argentina 35.1 +33.3% 75
Armenia Armenia 42.1 -20.2% 60
Azerbaijan Azerbaijan 49.6 +2.38% 48
Burundi Burundi 73.2 -2.27% 15
Benin Benin 37.8 -1.21% 66
Burkina Faso Burkina Faso 75.5 -4.16% 14
Bangladesh Bangladesh 51.4 -6.74% 45
Bosnia & Herzegovina Bosnia & Herzegovina 60.6 -19.7% 30
Belarus Belarus 10.6 +10.8% 109
Belize Belize 66.2 -8.15% 24
Bolivia Bolivia 63.3 +66% 28
Brazil Brazil 14.7 +24.1% 102
Bhutan Bhutan 33 +15% 78
Botswana Botswana 98.7 +4.06% 2
Central African Republic Central African Republic 79 +36.3% 11
China China 8.64 +92.5% 112
Côte d’Ivoire Côte d’Ivoire 12 -21.2% 108
Cameroon Cameroon 16.8 +68.6% 99
Congo - Kinshasa Congo - Kinshasa 37.6 -33.1% 67
Congo - Brazzaville Congo - Brazzaville 14.4 +18.4% 103
Colombia Colombia 17 -14.2% 98
Comoros Comoros 54 +55.7% 41
Cape Verde Cape Verde 40.5 -8.65% 63
Costa Rica Costa Rica 31.9 -23.9% 80
Djibouti Djibouti 80.3 +18.8% 9
Dominica Dominica 47.8 +12.4% 52
Dominican Republic Dominican Republic 18.1 +27.1% 95
Algeria Algeria 69.4 +12.1% 19
Ecuador Ecuador 48.8 +26.6% 50
Egypt Egypt 35.4 +20.5% 72
Eritrea Eritrea 37.3 +1.92% 68
Ethiopia Ethiopia 35.2 +101% 74
Fiji Fiji 67.3 +94.4% 23
Gabon Gabon 26.6 -15.2% 85
Georgia Georgia 66 +12.2% 25
Ghana Ghana 53.4 +342% 42
Guinea Guinea 25.4 -21.3% 87
Gambia Gambia 70.1 +6.02% 18
Guinea-Bissau Guinea-Bissau 67.8 -11.8% 22
Grenada Grenada 48.2 +5.07% 51
Guatemala Guatemala 58.8 +81.1% 35
Guyana Guyana 64.7 +7.43% 26
Honduras Honduras 56.3 +11.9% 38
Haiti Haiti 12.4 -35.3% 106
Indonesia Indonesia 16.3 +107% 100
India India 38.8 +26.5% 65
Iran Iran 6.8 -85.5% 114
Iraq Iraq 12.2 +39.3% 107
Jamaica Jamaica 27.4 +13.5% 83
Jordan Jordan 36.4 +176% 69
Kazakhstan Kazakhstan 32.2 +67.8% 79
Kenya Kenya 35.8 -1.98% 71
Kyrgyzstan Kyrgyzstan 42.5 -0.945% 59
Cambodia Cambodia 28.3 +7.83% 82
Laos Laos 18.7 -23.8% 94
Lebanon Lebanon 96.4 +29.2% 5
Liberia Liberia 97.4 +7.03% 4
St. Lucia St. Lucia 43.6 -7.58% 58
Sri Lanka Sri Lanka 59.7 +76.6% 33
Lesotho Lesotho 70.6 -1.98% 17
Morocco Morocco 55.9 +62.2% 39
Moldova Moldova 97.9 +13.7% 3
Madagascar Madagascar 58.7 -5.48% 36
Maldives Maldives 15.7 +109% 101
Mexico Mexico 17.9 +156% 96
North Macedonia North Macedonia 25.3 -49% 88
Mali Mali 51.6 -2.25% 44
Myanmar (Burma) Myanmar (Burma) 17 +39% 97
Montenegro Montenegro 19.5 +27.5% 92
Mongolia Mongolia 13.3 +72% 105
Mozambique Mozambique 25.5 +11.3% 86
Mauritania Mauritania 59.5 +3.08% 34
Mauritius Mauritius 5.03 -81.7% 116
Malawi Malawi 59.8 +6.84% 32
Niger Niger 60.2 -2.94% 31
Nigeria Nigeria 23.9 +9.43% 90
Nicaragua Nicaragua 90 +4.61% 7
Nepal Nepal 83.4 +4.01% 8
Pakistan Pakistan 24.7 +57.6% 89
Peru Peru 30.3 -26.2% 81
Philippines Philippines 40.6 +79.4% 62
Papua New Guinea Papua New Guinea 55.5 +30.2% 40
Paraguay Paraguay 49.3 +34.2% 49
Rwanda Rwanda 40.2 -19% 64
Sudan Sudan 51.1 +4.25% 46
Senegal Senegal 33.8 +6.53% 77
Solomon Islands Solomon Islands 78.5 +0.292% 12
Sierra Leone Sierra Leone 68.3 -0.604% 20
El Salvador El Salvador 40.6 +28.5% 61
Somalia Somalia 100 0% 1
Serbia Serbia 34.2 -12.7% 76
São Tomé & Príncipe São Tomé & Príncipe 50.7 +26.2% 47
Suriname Suriname 68.1 -25.8% 21
Eswatini Eswatini 62.5 +0.59% 29
Chad Chad 6.6 +19.5% 115
Togo Togo 35.2 +2.07% 73
Thailand Thailand 10.5 +33.5% 110
Tajikistan Tajikistan 45.4 +24.5% 54
Turkmenistan Turkmenistan 9 +62.8% 111
Timor-Leste Timor-Leste 92.7 -7.28% 6
Tonga Tonga 19.3 -34.8% 93
Tunisia Tunisia 43.6 +11.1% 57
Turkey Turkey 13.3 -2.81% 104
Tanzania Tanzania 22 +7.88% 91
Uganda Uganda 43.8 -4.27% 56
Ukraine Ukraine 75.7 +109% 13
Uzbekistan Uzbekistan 53.4 +22.8% 43
St. Vincent & Grenadines St. Vincent & Grenadines 70.9 -7.56% 16
Vietnam Vietnam 46.5 +11.5% 53
Vanuatu Vanuatu 27.1 +24.7% 84
Samoa Samoa 35.9 -2.41% 70
Kosovo Kosovo 80 -0.854% 10
Yemen Yemen 100 0% 1
South Africa South Africa 8.43 +95.1% 113
Zambia Zambia 44.1 +64.4% 55
Zimbabwe Zimbabwe 58 +164% 37

                    
# 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 = 'DT.TDS.MLAT.PG.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 <- 'DT.TDS.MLAT.PG.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))