Net bilateral aid flows from DAC donors, Luxembourg (current US$)

Source: worldbank.org, 03.09.2025

Year: 2022

Flag Country Value Value change, % Rank
Afghanistan Afghanistan 4,350,000 -54.4% 14
Albania Albania 180,000 -10% 52
Argentina Argentina 240,000 -11.1% 50
Azerbaijan Azerbaijan 80,000 -27.3% 60
Burundi Burundi 130,000 -80.6% 56
Benin Benin 10,450,000 +522% 8
Burkina Faso Burkina Faso 24,270,000 -26.8% 2
Bangladesh Bangladesh 4,750,000 +4.86% 12
Bosnia & Herzegovina Bosnia & Herzegovina 130,000 -7.14% 56
Belarus Belarus 20,000 +100% 65
Bolivia Bolivia 710,000 +14.5% 36
Brazil Brazil 900,000 -29.7% 32
Central African Republic Central African Republic 1,340,000 -4.29% 26
China China 70,000 +75% 61
Côte d’Ivoire Côte d’Ivoire 120,000 -14.3% 57
Cameroon Cameroon 220,000 -37.1% 51
Congo - Kinshasa Congo - Kinshasa 3,330,000 -26.7% 16
Colombia Colombia 380,000 -13.6% 45
Cape Verde Cape Verde 15,280,000 -30.8% 6
Costa Rica Costa Rica 40,000 64
Cuba Cuba 40,000 0% 64
Algeria Algeria 160,000 +300% 54
Ecuador Ecuador 120,000 +140% 57
Egypt Egypt 70,000 -36.4% 61
Ethiopia Ethiopia 3,060,000 +1.66% 17
Georgia Georgia 60,000 -33.3% 62
Ghana Ghana 40,000 -50% 64
Guinea Guinea 780,000 +129% 34
Guatemala Guatemala 380,000 -7.32% 45
Honduras Honduras 110,000 +37.5% 58
Haiti Haiti 1,390,000 -12% 24
India India 830,000 -17% 33
Iran Iran 10,000 -96.6% 66
Iraq Iraq 1,230,000 -60.3% 27
Jordan Jordan 490,000 -70.7% 41
Kazakhstan Kazakhstan 20,000 -50% 65
Kenya Kenya 420,000 +61.5% 44
Cambodia Cambodia 1,350,000 +6.3% 25
Laos Laos 21,330,000 +4.71% 5
Lebanon Lebanon 900,000 +28.6% 32
Libya Libya 380,000 +52% 45
Sri Lanka Sri Lanka 760,000 +744% 35
Moldova Moldova 570,000 +470% 38
Madagascar Madagascar 1,170,000 +0.862% 29
North Macedonia North Macedonia 140,000 -12.5% 55
Mali Mali 23,920,000 +11.6% 3
Myanmar (Burma) Myanmar (Burma) 6,980,000 +27.1% 11
Montenegro Montenegro 130,000 -7.14% 56
Mongolia Mongolia 3,010,000 +281% 18
Mozambique Mozambique 170,000 +88.9% 53
Malawi Malawi 710,000 -13.4% 36
Niger Niger 40,259,998 +11.2% 1
Nigeria Nigeria 50,000 -96.4% 63
Nicaragua Nicaragua 1,430,000 +37.5% 23
Nepal Nepal 2,710,000 -6.23% 20
Pakistan Pakistan 1,050,000 +262% 30
Peru Peru 650,000 +41.3% 37
Philippines Philippines 1,210,000 +142% 28
Paraguay Paraguay 170,000 +41.7% 53
Palestinian Territories Palestinian Territories 4,180,000 -16.2% 15
Rwanda Rwanda 11,470,000 +587% 7
Sudan Sudan 530,000 40
Senegal Senegal 23,400,000 -16.5% 4
El Salvador El Salvador 900,000 +34.3% 32
Somalia Somalia 1,590,000 +30.3% 22
Serbia Serbia 80,000 -50% 60
South Sudan South Sudan 2,780,000 -43.8% 19
Syria Syria 4,430,000 -27.1% 13
Chad Chad 550,000 -43.9% 39
Togo Togo 1,040,000 -31.6% 31
Thailand Thailand 180,000 +5.88% 52
Tunisia Tunisia 450,000 +25% 42
Turkey Turkey 300,000 -34.8% 48
Tanzania Tanzania 450,000 0% 42
Uganda Uganda 360,000 -42.9% 46
Ukraine Ukraine 7,550,000 +540% 10
Uzbekistan Uzbekistan 90,000 +12.5% 59
Venezuela Venezuela 280,000 +155% 49
Vietnam Vietnam 310,000 -63.5% 47
Kosovo Kosovo 9,600,000 +20.3% 9
Yemen Yemen 1,680,000 -44.2% 21
Zambia Zambia 440,000 +15.8% 43

                    
# 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 = 'DC.DAC.LUXL.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 <- 'DC.DAC.LUXL.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))