Current health expenditure per capita, PPP (current international US$)

Source: worldbank.org, 03.09.2025

Year: 2022

Flag Country Value Value change, % Rank
Afghanistan Afghanistan 383 +6.19% 132
Angola Angola 217 +1.38% 152
Albania Albania 1,186 -0.0882% 81
Andorra Andorra 5,136 +4.29% 24
United Arab Emirates United Arab Emirates 3,814 -2.75% 33
Argentina Argentina 2,664 +10.2% 48
Armenia Armenia 1,824 -2.92% 63
Antigua & Barbuda Antigua & Barbuda 1,436 +29.3% 72
Australia Australia 7,072 +6.91% 13
Austria Austria 7,974 +3.2% 7
Azerbaijan Azerbaijan 699 -5.47% 112
Burundi Burundi 67.9 -0.975% 186
Belgium Belgium 7,388 +7.39% 11
Benin Benin 106 +15.1% 175
Burkina Faso Burkina Faso 174 +12.8% 159
Bangladesh Bangladesh 179 +14.7% 157
Bulgaria Bulgaria 2,570 +1.96% 50
Bahrain Bahrain 2,257 -6.1% 58
Bahamas Bahamas 3,047 +25.7% 44
Bosnia & Herzegovina Bosnia & Herzegovina 1,827 +3.08% 62
Belarus Belarus 1,511 +6.6% 70
Belize Belize 477 -4.41% 125
Bolivia Bolivia 831 +13.2% 104
Brazil Brazil 1,696 +4.52% 66
Barbados Barbados 1,172 -3.69% 83
Brunei Brunei 1,242 -11.5% 79
Bhutan Bhutan 600 +61.1% 119
Botswana Botswana 1,132 +1.2% 85
Central African Republic Central African Republic 109 +17.7% 173
Canada Canada 6,991 +1.48% 14
Switzerland Switzerland 10,668 +8.47% 2
Chile Chile 3,171 +12.1% 38
China China 1,136 +9.72% 84
Côte d’Ivoire Côte d’Ivoire 227 +9.26% 149
Cameroon Cameroon 202 +13.4% 154
Congo - Kinshasa Congo - Kinshasa 49.8 +12.4% 188
Congo - Brazzaville Congo - Brazzaville 82.8 -35.1% 183
Colombia Colombia 1,599 +0.175% 67
Comoros Comoros 317 +40.5% 139
Cape Verde Cape Verde 664 +13.7% 113
Costa Rica Costa Rica 1,917 +4.36% 61
Cuba Cuba 2,884 -6.04% 47
Cyprus Cyprus 4,813 +4.3% 28
Czechia Czechia 4,617 +0.765% 31
Germany Germany 8,454 +5.73% 5
Djibouti Djibouti 154 -0.213% 162
Dominica Dominica 931 +13.8% 97
Denmark Denmark 7,424 -1.43% 10
Dominican Republic Dominican Republic 1,044 +3.36% 91
Algeria Algeria 547 -20.2% 123
Ecuador Ecuador 989 +0.51% 93
Egypt Egypt 700 +14.7% 111
Eritrea Eritrea 86.8 +0.0511% 182
Spain Spain 4,776 +6.17% 29
Estonia Estonia 3,409 +1.11% 35
Ethiopia Ethiopia 79 -2.34% 184
Finland Finland 6,048 +6.42% 19
Fiji Fiji 593 -27.3% 120
France France 6,853 +3.4% 15
Micronesia (Federated States of) Micronesia (Federated States of) 378 -4.3% 133
Gabon Gabon 461 +14.1% 128
United Kingdom United Kingdom 6,449 +1.93% 18
Georgia Georgia 1,456 +3.4% 71
Ghana Ghana 242 +3.72% 148
Guinea Guinea 116 +7.07% 170
Gambia Gambia 88.7 +17.7% 181
Guinea-Bissau Guinea-Bissau 187 +7.35% 156
Equatorial Guinea Equatorial Guinea 466 -10.3% 126
Greece Greece 3,298 +9.87% 37
Grenada Grenada 919 +6.59% 100
Guatemala Guatemala 783 +17.2% 106
Guyana Guyana 1,229 +9.8% 80
Honduras Honduras 557 -1.03% 121
Croatia Croatia 3,055 +6.52% 43
Haiti Haiti 107 -3.31% 174
Hungary Hungary 2,907 +2.1% 46
Indonesia Indonesia 390 -18.7% 131
India India 273 +10.7% 144
Ireland Ireland 8,298 +9.65% 6
Iran Iran 966 +1.74% 95
Iraq Iraq 466 -8.87% 127
Iceland Iceland 6,700 +11.4% 16
Israel Israel 4,009 +8.11% 32
Italy Italy 4,981 +6.99% 25
Jamaica Jamaica 925 +21.8% 99
Jordan Jordan 767 +2.2% 107
Japan Japan 5,387 +8.07% 22
Kazakhstan Kazakhstan 1,129 +3.75% 86
Kenya Kenya 248 +4.32% 145
Kyrgyzstan Kyrgyzstan 311 +7.89% 140
Cambodia Cambodia 333 -5.76% 137
Kiribati Kiribati 303 -8.14% 142
St. Kitts & Nevis St. Kitts & Nevis 1,946 +5.95% 60
South Korea South Korea 4,860 +11.9% 27
Kuwait Kuwait 2,415 -15.9% 55
Laos Laos 189 -19.4% 155
Lebanon Lebanon 653 +25.8% 114
Liberia Liberia 224 +6.71% 150
Libya Libya 969 -16.5% 94
St. Lucia St. Lucia 883 +13.7% 102
Sri Lanka Sri Lanka 611 +6.23% 118
Lesotho Lesotho 365 +30.3% 134
Lithuania Lithuania 3,726 +3.26% 34
Luxembourg Luxembourg 7,836 -0.481% 8
Latvia Latvia 3,139 -5.87% 40
Morocco Morocco 553 +10.4% 122
Monaco Monaco 8,765 +4.72% 4
Moldova Moldova 1,095 -6.86% 89
Madagascar Madagascar 56.1 +0.398% 187
Maldives Maldives 2,454 +13% 53
Mexico Mexico 1,353 +9.49% 74
Marshall Islands Marshall Islands 747 +2.69% 109
North Macedonia North Macedonia 1,815 -2.88% 64
Mali Mali 89.9 +10.6% 180
Malta Malta 5,760 +3.35% 21
Myanmar (Burma) Myanmar (Burma) 242 -0.187% 147
Montenegro Montenegro 3,107 +17.1% 41
Mongolia Mongolia 1,267 +36.1% 77
Mozambique Mozambique 131 +7.33% 166
Mauritania Mauritania 274 +31.2% 143
Mauritius Mauritius 1,554 +2.87% 69
Malawi Malawi 105 -13.8% 176
Malaysia Malaysia 1,281 +2.62% 76
Namibia Namibia 930 +8.83% 98
Niger Niger 68.2 -13.1% 185
Nigeria Nigeria 245 +13.4% 146
Nicaragua Nicaragua 636 +2.34% 115
Netherlands Netherlands 7,576 +0.275% 9
Norway Norway 9,927 +13% 3
Nepal Nepal 323 +40.2% 138
Nauru Nauru 2,576 +37.5% 49
New Zealand New Zealand 5,214 +8.08% 23
Oman Oman 1,178 -29.1% 82
Pakistan Pakistan 179 +7% 158
Panama Panama 3,332 +8.53% 36
Peru Peru 942 -0.843% 96
Philippines Philippines 529 -1.5% 124
Palau Palau 1,979 -14.3% 59
Papua New Guinea Papua New Guinea 115 +23.6% 171
Poland Poland 2,976 +12.2% 45
Portugal Portugal 4,683 +7.88% 30
Paraguay Paraguay 1,247 +2.59% 78
Palestinian Territories Palestinian Territories 625 +1.43% 116
Qatar Qatar 2,318 -18.1% 57
Romania Romania 2,472 +1.03% 52
Russia Russia 2,446 +4.74% 54
Rwanda Rwanda 222 +22.2% 151
Saudi Arabia Saudi Arabia 3,102 -11.7% 42
Sudan Sudan 122 +0.64% 168
Senegal Senegal 168 -0.509% 160
Singapore Singapore 6,658 +7.61% 17
Solomon Islands Solomon Islands 116 -0.509% 169
Sierra Leone Sierra Leone 160 +0.633% 161
El Salvador El Salvador 1,085 +6.14% 90
San Marino San Marino 5,880 +12.4% 20
Somalia Somalia 44.4 +8.81% 189
Serbia Serbia 2,373 +5.59% 56
South Sudan South Sudan 38.5 +8.14% 190
São Tomé & Príncipe São Tomé & Príncipe 304 -0.228% 141
Suriname Suriname 1,043 +17.8% 92
Slovakia Slovakia 3,169 +8.35% 39
Slovenia Slovenia 4,902 +11.2% 26
Sweden Sweden 7,188 +1.8% 12
Eswatini Eswatini 762 +4.15% 108
Seychelles Seychelles 1,561 +4.37% 68
Syria Syria 454 -9.91% 129
Chad Chad 93.5 +8.43% 178
Togo Togo 149 +17.4% 163
Thailand Thailand 1,107 +14% 88
Tajikistan Tajikistan 364 +3.08% 135
Turkmenistan Turkmenistan 873 +8.14% 103
Timor-Leste Timor-Leste 341 +27.3% 136
Trinidad & Tobago Trinidad & Tobago 1,811 -2.51% 65
Tunisia Tunisia 885 +8.68% 101
Turkey Turkey 1,387 -1.01% 73
Tuvalu Tuvalu 1,127 +3.38% 87
Tanzania Tanzania 92.6 -0.883% 179
Uganda Uganda 127 -9.23% 167
Uruguay Uruguay 2,568 +12.4% 51
United States United States 12,434 +3.63% 1
Uzbekistan Uzbekistan 716 +6.04% 110
St. Vincent & Grenadines St. Vincent & Grenadines 820 -1.27% 105
Venezuela Venezuela 131 +28.4% 165
Vietnam Vietnam 611 +16.4% 117
Vanuatu Vanuatu 138 -3.83% 164
Samoa Samoa 396 -6.88% 130
Yemen Yemen 109 +5.76% 172
South Africa South Africa 1,341 +8.75% 75
Zambia Zambia 208 -13.2% 153
Zimbabwe Zimbabwe 96 +46% 177

                    
# 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 = 'SH.XPD.CHEX.PP.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 <- 'SH.XPD.CHEX.PP.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))