Broad money to total reserves ratio

Source: worldbank.org, 03.09.2025

Year: 2024

Flag Country Value Value change, % Rank
Angola Angola 1.14 -25.6% 72
United Arab Emirates United Arab Emirates 2.65 -8.76% 48
Argentina Argentina 5.69 -43.6% 17
Armenia Armenia 4.07 +11.2% 29
Antigua & Barbuda Antigua & Barbuda 4.69 +6.34% 23
Australia Australia 37.6 +6.04% 1
Azerbaijan Azerbaijan 2.15 +11.7% 59
Bangladesh Bangladesh 10.3 +0.17% 8
Bulgaria Bulgaria 2.13 +15.4% 60
Belize Belize 4.88 +4.01% 22
Brazil Brazil 7.72 +13.5% 11
Brunei Brunei 2.91 +5.79% 43
Botswana Botswana 2.46 +44.6% 55
Chile Chile 5.58 -8.98% 19
China China 12.3 +4.93% 5
Costa Rica Costa Rica 3.4 +9.52% 38
Czechia Czechia 2.07 +4.12% 62
Dominica Dominica 3.41 +21.6% 37
Denmark Denmark 2.45 +2.24% 56
Dominican Republic Dominican Republic 3.63 +21.1% 34
Algeria Algeria 2.38 +8.11% 58
Ecuador Ecuador 10.3 -27.7% 7
Egypt Egypt 7.25 -30.7% 14
United Kingdom United Kingdom 30 +7.44% 3
Georgia Georgia 4.09 +24.4% 28
Grenada Grenada 3.05 +3.54% 42
Guatemala Guatemala 2.64 -4.64% 49
Guyana Guyana 6.01 +8.63% 15
Honduras Honduras 3.46 +2.16% 36
Hungary Hungary 2.88 +4% 44
Indonesia Indonesia 3.75 -5.37% 31
Iraq Iraq 1.33 +8.58% 70
Iceland Iceland 3.49 +1.31% 35
Jordan Jordan 2.79 -7.79% 46
Japan Japan 8.75 -2.23% 9
Kazakhstan Kazakhstan 2.13 -8.96% 61
Cambodia Cambodia 2.48 +5.34% 53
St. Kitts & Nevis St. Kitts & Nevis 3.96 -0.526% 30
South Korea South Korea 7.3 +2.7% 13
Kuwait Kuwait 2.61 +8.32% 50
St. Lucia St. Lucia 4.19 +15.8% 27
Macao SAR China Macao SAR China 3.31 +2.23% 40
Morocco Morocco 5.12 +7.69% 20
Moldova Moldova 1.74 +15.5% 66
Maldives Maldives 5.71 -12.4% 16
Mexico Mexico 3.66 +1.99% 32
North Macedonia North Macedonia 1.95 +5.37% 64
Montenegro Montenegro 2.7 -0.655% 47
Mauritius Mauritius 2.47 -6.38% 54
Malaysia Malaysia 4.39 +0.469% 26
Norway Norway 3.66 +0.712% 33
New Zealand New Zealand 11.8 -28% 6
Pakistan Pakistan 7.72 -26.3% 10
Poland Poland 2.79 +0.192% 45
Palestinian Territories Palestinian Territories 13.3 +6.71% 4
Rwanda Rwanda 1.64 -20.3% 68
El Salvador El Salvador 5.62 -14.1% 18
Serbia Serbia 1.57 +2.86% 69
Suriname Suriname 1.68 +0.352% 67
Sweden Sweden 7.52 -2.04% 12
Seychelles Seychelles 2.39 -8.56% 57
Thailand Thailand 3.15 -3.43% 41
Tonga Tonga 1.05 +12.9% 73
Trinidad & Tobago Trinidad & Tobago 3.33 +13.3% 39
Tunisia Tunisia 4.57 +8.97% 24
Ukraine Ukraine 1.98 -4.45% 63
Uruguay Uruguay 2.57 +4.72% 52
United States United States 31.8 -10.4% 2
Uzbekistan Uzbekistan 0.531 +1.54% 74
St. Vincent & Grenadines St. Vincent & Grenadines 2.61 +2.55% 51
Vanuatu Vanuatu 1.75 +14.7% 65
Samoa Samoa 1.26 -5.01% 71
Kosovo Kosovo 5.09 +6.91% 21
South Africa South Africa 4.53 +2.59% 25

                    
# 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 = 'FM.LBL.BMNY.IR.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 <- 'FM.LBL.BMNY.IR.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))