Bank capital to assets ratio (%)

Source: worldbank.org, 01.09.2025

Year: 2023

Flag Country Value Value change, % Rank
Albania Albania 8.69 +1.12% 52
United Arab Emirates United Arab Emirates 11.5 +1.2% 25
Argentina Argentina 18.3 +24.3% 3
Antigua & Barbuda Antigua & Barbuda 10.1 +8.14% 36
Austria Austria 8.2 +3.53% 62
Azerbaijan Azerbaijan 8.18 +1.34% 63
Belgium Belgium 5.72 -4.11% 93
Bangladesh Bangladesh 6.55 -2.35% 83
Bulgaria Bulgaria 10 +1.3% 39
Bosnia & Herzegovina Bosnia & Herzegovina 10.1 +2.15% 37
Belarus Belarus 12.7 -12.1% 16
Brazil Brazil 8.87 +1.23% 50
Botswana Botswana 8.69 -2.76% 53
Central African Republic Central African Republic 11.1 -20.7% 26
Canada Canada 4.75 -2.55% 100
Switzerland Switzerland 7.78 -1.26% 69
Chile Chile 7.75 +5.59% 70
Cameroon Cameroon 6.65 -0.947% 82
Congo - Kinshasa Congo - Kinshasa 5.89 +6.95% 91
Congo - Brazzaville Congo - Brazzaville 8.86 -21.1% 51
Colombia Colombia 10.7 -0.743% 30
Costa Rica Costa Rica 9.88 +1.97% 41
Cyprus Cyprus 7.68 +11.8% 71
Czechia Czechia 6.33 -5.85% 84
Germany Germany 7.29 +4.18% 75
Denmark Denmark 4.9 +0.487% 98
Dominican Republic Dominican Republic 47.9 +19.8% 1
Ecuador Ecuador 10.8 -3.54% 27
Spain Spain 5.66 +2.48% 94
Estonia Estonia 9.34 -1.94% 48
Finland Finland 5.8 +1.01% 92
France France 5.47 +2.23% 95
Gabon Gabon 8.59 -5.21% 57
United Kingdom United Kingdom 6.08 -5.8% 87
Georgia Georgia 15.2 +17.2% 7
Ghana Ghana 5.23 -32.5% 96
Equatorial Guinea Equatorial Guinea -6.4 -656% 103
Greece Greece 7.79 +12.5% 68
Guatemala Guatemala 7.24 +12.8% 76
Hong Kong SAR China Hong Kong SAR China 7.81 +1.24% 67
Croatia Croatia 9.33 -6.17% 49
Hungary Hungary 8.6 -3.94% 56
Indonesia Indonesia 13.4 +0.549% 11
India India 6.08 -21.6% 88
Ireland Ireland 10 -5.2% 40
Iraq Iraq 11.8 +7.19% 22
Iceland Iceland 13.7 +1.73% 10
Israel Israel 7.03 +6.86% 79
Jordan Jordan 10.1 +3.93% 38
Kazakhstan Kazakhstan 12.8 +14.8% 15
Kenya Kenya 10.4 -8.73% 32
Kyrgyzstan Kyrgyzstan 12.5 +10.6% 17
Cambodia Cambodia 15.2 +1.91% 6
St. Kitts & Nevis St. Kitts & Nevis 9.81 +5.69% 42
Kuwait Kuwait 12.1 -4.62% 19
St. Lucia St. Lucia 8.06 +13.6% 64
Lesotho Lesotho 9.54 -23.5% 45
Luxembourg Luxembourg 8.51 +4.57% 59
Latvia Latvia 9.52 +0.949% 46
Macao SAR China Macao SAR China 3.84 +9.46% 101
Moldova Moldova 13.1 -3.22% 12
Madagascar Madagascar 7.06 +12.1% 78
Maldives Maldives 19.1 +6.47% 2
Mexico Mexico 10.2 +4.63% 34
North Macedonia North Macedonia 11.6 +2.82% 24
Malta Malta 7.93 +9.2% 66
Montenegro Montenegro 8.56 +7.84% 58
Mauritius Mauritius 9.75 +8.31% 43
Malawi Malawi 8.23 -8.48% 61
Malaysia Malaysia 7.64 +0.961% 72
Namibia Namibia 10.8 +11.2% 28
Nicaragua Nicaragua 7.95 +0.696% 65
Netherlands Netherlands 6.13 +2.65% 86
Norway Norway 7.52 -0.56% 74
Nepal Nepal 6.78 -7.25% 81
Pakistan Pakistan 4.79 -2.97% 99
Panama Panama 12.1 +2.33% 20
Peru Peru 11.7 +13.6% 23
Philippines Philippines 9.42 +6.13% 47
Papua New Guinea Papua New Guinea 12.3 +35.1% 18
Poland Poland 6.32 -3.35% 85
Paraguay Paraguay 8.6 -3.7% 55
Saudi Arabia Saudi Arabia 13.7 -1.92% 9
Solomon Islands Solomon Islands 13.9 +1.06% 8
El Salvador El Salvador 8.47 -3.62% 60
San Marino San Marino 5.94 +11.4% 89
Slovakia Slovakia 7.59 +4.4% 73
Slovenia Slovenia 9.6 +5.8% 44
Sweden Sweden 5.92 +4.79% 90
Eswatini Eswatini 12.9 +2.53% 14
Chad Chad -1.04 -126% 102
Thailand Thailand 10.6 +2.94% 31
Tonga Tonga 15.6 +2.2% 4
Trinidad & Tobago Trinidad & Tobago 11.9 +3.08% 21
Turkey Turkey 7.2 -12.3% 77
Uganda Uganda 15.5 +3.72% 5
Ukraine Ukraine 4.98 -14.5% 97
Uruguay Uruguay 10.1 +5.71% 35
United States United States 8.68 +1.22% 54
Uzbekistan Uzbekistan 13 +6.93% 13
St. Vincent & Grenadines St. Vincent & Grenadines 6.87 +1.93% 80
Samoa Samoa 10.7 -12.7% 29
Kosovo Kosovo 10.4 +10.3% 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 = 'FB.BNK.CAPA.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 <- 'FB.BNK.CAPA.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))