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

Source: worldbank.org, 01.09.2025

Year: 2022

Flag Country Value Value change, % Rank
Afghanistan Afghanistan 22,680,000 -36.6% 4
Albania Albania 120,000 +71.4% 68
Armenia Armenia 40,000 +33.3% 71
Burundi Burundi 1,600,000 +79.8% 25
Benin Benin 110,000 -31.2% 69
Burkina Faso Burkina Faso 300,000 -82.7% 58
Bangladesh Bangladesh 510,000 -8.93% 46
Bosnia & Herzegovina Bosnia & Herzegovina 100,000 -41.2% 70
Belarus Belarus 180,000 +5.88% 63
Bolivia Bolivia 300,000 -31.8% 58
Brazil Brazil 450,000 +87.5% 49
Central African Republic Central African Republic 580,000 -74.1% 43
China China 150,000 -31.8% 66
Côte d’Ivoire Côte d’Ivoire 540,000 +440% 45
Congo - Kinshasa Congo - Kinshasa 480,000 -78% 48
Congo - Brazzaville Congo - Brazzaville 1,370,000 +6,750% 26
Colombia Colombia 640,000 -44.3% 38
Djibouti Djibouti 10,000 -50% 73
Algeria Algeria 120,000 0% 68
Egypt Egypt 340,000 -10.5% 55
Eritrea Eritrea 30,000 +200% 72
Ethiopia Ethiopia 28,590,000 -23.2% 3
Georgia Georgia 1,080,000 -28.5% 28
Ghana Ghana 620,000 -36.7% 39
Gambia Gambia 430,000 +22.9% 51
Guatemala Guatemala 160,000 -40.7% 65
Honduras Honduras 590,000 +1.72% 42
Indonesia Indonesia 700,000 -40.2% 37
India India 2,100,000 -44.3% 23
Iraq Iraq 2,740,000 -37.4% 19
Jordan Jordan 210,000 -38.2% 61
Kazakhstan Kazakhstan 10,000 -75% 73
Kenya Kenya 6,720,000 -37% 11
Kyrgyzstan Kyrgyzstan 890,000 +12.7% 32
Cambodia Cambodia 1,070,000 -28.2% 29
Laos Laos 600,000 -47.4% 41
Lebanon Lebanon 2,190,000 -6.01% 22
Liberia Liberia 190,000 +90% 62
Libya Libya 840,000 +2.44% 33
St. Lucia St. Lucia 0 -100% 74
Sri Lanka Sri Lanka 190,000 +11.8% 62
Morocco Morocco 170,000 -34.6% 64
Moldova Moldova 1,750,000 +197% 24
Madagascar Madagascar 420,000 -68.4% 52
Mexico Mexico 190,000 0% 62
Mali Mali 560,000 -50.9% 44
Myanmar (Burma) Myanmar (Burma) 15,220,000 -0.131% 8
Mongolia Mongolia 420,000 -4.55% 52
Mozambique Mozambique 15,350,000 -11.1% 7
Mauritania Mauritania 140,000 -33.3% 67
Malawi Malawi 740,000 -37.3% 36
Malaysia Malaysia 10,000 0% 73
Namibia Namibia 810,000 +6.58% 34
Niger Niger 440,000 -66.7% 50
Nigeria Nigeria 360,000 +112% 54
Nicaragua Nicaragua 100,000 -64.3% 70
Nepal Nepal 17,129,999 -25.8% 6
Pakistan Pakistan 3,050,000 17
Peru Peru 500,000 +47.1% 47
Philippines Philippines 340,000 -50% 55
Palestinian Territories Palestinian Territories 7,990,000 -21.6% 10
Rwanda Rwanda 610,000 +177% 40
Sudan Sudan 250,000 -51% 60
Senegal Senegal 320,000 +146% 56
Sierra Leone Sierra Leone 310,000 -39.2% 57
Somalia Somalia 33,099,998 +48% 2
Serbia Serbia -4,100,000 +193% 75
South Sudan South Sudan 2,310,000 -66.3% 20
Eswatini Eswatini 790,000 -8.14% 35
Syria Syria 10,820,000 -36.1% 9
Thailand Thailand 4,690,000 +104% 14
Tajikistan Tajikistan 1,050,000 -7.08% 30
Tunisia Tunisia 260,000 -13.3% 59
Turkey Turkey 380,000 -87.3% 53
Tanzania Tanzania 17,490,000 -15.7% 5
Uganda Uganda 4,280,000 -32.8% 16
Ukraine Ukraine 60,790,001 +481% 1
Uzbekistan Uzbekistan 2,260,000 +2,725% 21
Vietnam Vietnam 2,970,000 -15.1% 18
Kosovo Kosovo 970,000 +11.5% 31
Yemen Yemen 5,480,000 +22.6% 12
South Africa South Africa 4,290,000 +50.5% 15
Zambia Zambia 4,870,000 +8.22% 13
Zimbabwe Zimbabwe 1,190,000 +170% 27

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