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

Source: worldbank.org, 03.09.2025

Year: 2022

Flag Country Value Value change, % Rank
Afghanistan Afghanistan 28,270,000 -10.4% 10
Angola Angola -100,000 -167% 68
Albania Albania 80,000 -52.9% 62
Argentina Argentina 200,000 +17.6% 55
Armenia Armenia 680,000 +134% 39
Azerbaijan Azerbaijan 150,000 -16.7% 57
Burundi Burundi 33,900,002 -10.2% 8
Benin Benin 46,570,000 +12.3% 3
Burkina Faso Burkina Faso 10,900,000 -65.5% 20
Bangladesh Bangladesh 24,200,001 -19.5% 16
Bosnia & Herzegovina Bosnia & Herzegovina 130,000 0% 59
Belarus Belarus 1,070,000 +24.4% 36
Brazil Brazil 310,000 +6.9% 50
China China 160,000 -95.2% 56
Côte d’Ivoire Côte d’Ivoire 30,000 +50% 64
Congo - Kinshasa Congo - Kinshasa 16,610,001 -34.7% 17
Congo - Brazzaville Congo - Brazzaville 360,000 -30.8% 48
Colombia Colombia 2,020,000 -49.6% 32
Cuba Cuba 510,000 +75.9% 45
Dominican Republic Dominican Republic 0 -100% 66
Algeria Algeria 90,000 -60.9% 61
Egypt Egypt 8,810,000 -14,783% 23
Ethiopia Ethiopia 97,440,002 +28.8% 2
Georgia Georgia 660,000 +11.9% 40
Ghana Ghana 2,720,000 -70.6% 28
Guinea Guinea 6,170,000 +6,756% 25
Gambia Gambia 140,000 +180% 58
Indonesia Indonesia -4,800,000 -53.8% 71
India India 590,000 +20.4% 42
Iraq Iraq 10,110,000 -65.5% 21
Jamaica Jamaica -60,000 0% 67
Jordan Jordan 27,410,000 +81.6% 11
Kazakhstan Kazakhstan 380,000 -15.6% 46
Kenya Kenya 9,290,000 -12.5% 22
Kyrgyzstan Kyrgyzstan 120,000 0% 60
Cambodia Cambodia 40,000 -73.3% 63
Lebanon Lebanon 24,219,999 +5.35% 15
Libya Libya 2,820,000 +18% 27
Sri Lanka Sri Lanka 370,000 +106% 47
Morocco Morocco 300,000 -28.6% 51
Moldova Moldova 520,000 +420% 44
Mexico Mexico 160,000 +33.3% 56
North Macedonia North Macedonia 250,000 -7.41% 53
Mali Mali 46,009,998 -8.87% 4
Myanmar (Burma) Myanmar (Burma) 750,000 -67.2% 38
Montenegro Montenegro 40,000 +300% 63
Mozambique Mozambique 27,290,001 -9.46% 12
Niger Niger 34,820,000 +34.6% 7
Nigeria Nigeria 6,940,000 -50.8% 24
Nicaragua Nicaragua 10,000 -85.7% 65
Pakistan Pakistan -1,540,000 -147% 70
Panama Panama 40,000 +100% 63
Peru Peru -180,000 -25% 69
Philippines Philippines 650,000 0% 41
Palestinian Territories Palestinian Territories 24,950,001 -28.1% 13
Rwanda Rwanda 24,600,000 +13.6% 14
Sudan Sudan 4,440,000 -54% 26
Senegal Senegal 2,070,000 +80% 31
Somalia Somalia 14,310,000 -34% 19
Serbia Serbia 250,000 +47.1% 53
South Sudan South Sudan 33,290,001 +0.635% 9
Suriname Suriname 1,080,000 -58.5% 35
Syria Syria 1,800,000 -77.9% 34
Chad Chad 2,210,000 29
Thailand Thailand 250,000 +213% 53
Tajikistan Tajikistan 240,000 +1,100% 54
Tunisia Tunisia 16,110,001 +6.27% 18
Turkey Turkey 860,000 -28.3% 37
Tanzania Tanzania 280,000 -9.68% 52
Uganda Uganda 43,099,998 +14.5% 6
Ukraine Ukraine 176,429,993 +16,389% 1
Venezuela Venezuela 2,110,000 -11% 30
Vietnam Vietnam 330,000 +22.2% 49
Kosovo Kosovo 40,000 -66.7% 63
Yemen Yemen 44,040,001 +42.2% 5
South Africa South Africa 580,000 +41.5% 43
Zimbabwe Zimbabwe 2,010,000 +13.6% 33

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