Domestic general government health expenditure per capita, PPP (current international US$)

Source: worldbank.org, 03.09.2025

Year: 2022

Flag Country Value Value change, % Rank
Afghanistan Afghanistan 3.01 -74.7% 189
Angola Angola 112 -5.36% 139
Albania Albania 536 +13.8% 96
Andorra Andorra 3,774 +3.53% 24
United Arab Emirates United Arab Emirates 2,259 -10.2% 39
Argentina Argentina 1,555 +5.18% 56
Armenia Armenia 314 -5.88% 109
Antigua & Barbuda Antigua & Barbuda 824 +17.8% 72
Australia Australia 5,243 +4.24% 13
Austria Austria 6,178 +2.34% 9
Azerbaijan Azerbaijan 212 -9.32% 129
Burundi Burundi 12.8 -24.4% 183
Belgium Belgium 5,555 +5.27% 11
Benin Benin 20.3 +79.8% 176
Burkina Faso Burkina Faso 70.1 +5.93% 149
Bangladesh Bangladesh 11.6 -56% 184
Bulgaria Bulgaria 1,607 -0.955% 54
Bahrain Bahrain 1,465 -4.52% 57
Bahamas Bahamas 1,718 +31% 53
Bosnia & Herzegovina Bosnia & Herzegovina 1,202 -0.709% 60
Belarus Belarus 1,021 -2.99% 67
Belize Belize 297 -14.4% 110
Bolivia Bolivia 580 +9.67% 94
Brazil Brazil 762 +5% 77
Barbados Barbados 528 -20.1% 97
Brunei Brunei 1,147 -12.2% 62
Bhutan Bhutan 294 +17.9% 112
Botswana Botswana 850 -0.79% 70
Central African Republic Central African Republic 17.5 +36.4% 179
Canada Canada 4,979 -0.948% 17
Switzerland Switzerland 3,729 +5.79% 26
Chile Chile 1,599 +5.36% 55
China China 623 +11.4% 89
Côte d’Ivoire Côte d’Ivoire 83.3 -4.99% 145
Cameroon Cameroon 30.3 +51% 167
Congo - Kinshasa Congo - Kinshasa 9.16 +23.3% 186
Congo - Brazzaville Congo - Brazzaville 30.4 -51.5% 165
Colombia Colombia 1,126 -2.79% 63
Comoros Comoros 32.8 -1.2% 162
Cape Verde Cape Verde 426 -1.25% 102
Costa Rica Costa Rica 1,322 +2.3% 59
Cuba Cuba 2,562 -8.87% 34
Cyprus Cyprus 3,857 +3.05% 23
Czechia Czechia 3,913 -1.26% 21
Germany Germany 6,791 +7.39% 5
Djibouti Djibouti 63.6 +55.4% 152
Dominica Dominica 664 +27.1% 85
Denmark Denmark 6,233 -1.78% 7
Dominican Republic Dominican Republic 610 -9.65% 91
Algeria Algeria 259 -34% 117
Ecuador Ecuador 604 -2.93% 93
Egypt Egypt 265 +15.4% 116
Eritrea Eritrea 20.2 +9.52% 177
Spain Spain 3,535 +6.62% 29
Estonia Estonia 2,549 -0.585% 35
Ethiopia Ethiopia 19.9 -19.2% 178
Finland Finland 4,943 +6.92% 18
Fiji Fiji 472 +11.7% 100
France France 5,169 +2.87% 16
Micronesia (Federated States of) Micronesia (Federated States of) 41 +2.13% 156
Gabon Gabon 296 +23.7% 111
United Kingdom United Kingdom 5,357 +0.427% 12
Georgia Georgia 614 -18.3% 90
Ghana Ghana 134 +5.73% 135
Guinea Guinea 21.4 +7.63% 174
Gambia Gambia 39.6 +4.35% 158
Guinea-Bissau Guinea-Bissau 25.3 +4.51% 171
Equatorial Guinea Equatorial Guinea 122 +17.9% 137
Greece Greece 1,784 +0.345% 51
Grenada Grenada 371 +6.12% 105
Guatemala Guatemala 255 +13.2% 118
Guyana Guyana 881 +15.6% 69
Honduras Honduras 227 +7.46% 126
Croatia Croatia 2,580 +6.98% 33
Haiti Haiti 11.4 -8.56% 185
Hungary Hungary 2,103 +2.27% 43
Indonesia Indonesia 202 -29.2% 130
India India 107 +7.16% 141
Ireland Ireland 6,419 +9.59% 6
Iran Iran 475 -9.44% 99
Iraq Iraq 237 -6% 125
Iceland Iceland 5,674 +12.6% 10
Israel Israel 2,664 +6.76% 32
Italy Italy 3,708 +6.98% 27
Jamaica Jamaica 705 +30.4% 80
Jordan Jordan 280 +4.84% 114
Japan Japan 4,634 +9.11% 19
Kazakhstan Kazakhstan 695 -2.28% 82
Kenya Kenya 116 -0.151% 138
Kyrgyzstan Kyrgyzstan 167 +4.82% 133
Cambodia Cambodia 83 -11.8% 146
Kiribati Kiribati 245 -1.11% 122
St. Kitts & Nevis St. Kitts & Nevis 1,024 -3.01% 66
South Korea South Korea 3,050 +15.7% 30
Kuwait Kuwait 2,107 -19.3% 42
Laos Laos 58.6 -4.52% 154
Lebanon Lebanon 224 +49.4% 128
Liberia Liberia 21.5 +27.3% 173
Libya Libya 656 -21.5% 87
St. Lucia St. Lucia 375 +14% 104
Sri Lanka Sri Lanka 246 -9.21% 120
Lesotho Lesotho 185 +61.6% 131
Lithuania Lithuania 2,434 +0.0716% 37
Luxembourg Luxembourg 6,824 -0.437% 4
Latvia Latvia 2,032 -12.1% 44
Morocco Morocco 226 +10.4% 127
Monaco Monaco 7,595 +1.1% 2
Moldova Moldova 710 -7.47% 79
Madagascar Madagascar 16.2 +37.5% 181
Maldives Maldives 1,918 +24.3% 47
Mexico Mexico 702 +13.4% 81
Marshall Islands Marshall Islands 281 -7.27% 113
North Macedonia North Macedonia 1,033 +1.39% 65
Mali Mali 35 +12.8% 161
Malta Malta 3,859 +2.8% 22
Myanmar (Burma) Myanmar (Burma) 26.7 -33.6% 170
Montenegro Montenegro 1,956 +20.6% 45
Mongolia Mongolia 447 -17.9% 101
Mozambique Mozambique 40.4 +17% 157
Mauritania Mauritania 108 +30% 140
Mauritius Mauritius 733 -4.41% 78
Malawi Malawi 14.2 -34.8% 182
Malaysia Malaysia 648 -7.64% 88
Namibia Namibia 424 +5.31% 103
Niger Niger 24.1 -16% 172
Nigeria Nigeria 35.6 +23.9% 160
Nicaragua Nicaragua 366 -6.99% 106
Netherlands Netherlands 5,193 -1.53% 15
Norway Norway 8,506 +12.7% 1
Nepal Nepal 102 +33.6% 142
Nauru Nauru 2,239 +52.3% 40
New Zealand New Zealand 4,236 +13.8% 20
Oman Oman 994 -31.4% 68
Pakistan Pakistan 68.1 +9.81% 150
Panama Panama 1,873 +9.79% 49
Peru Peru 605 -4.84% 92
Philippines Philippines 239 -0.694% 124
Palau Palau 803 -18% 76
Papua New Guinea Papua New Guinea 67.5 +44.7% 151
Poland Poland 2,179 +13.9% 41
Portugal Portugal 2,921 +7.26% 31
Paraguay Paraguay 658 -2.6% 86
Palestinian Territories Palestinian Territories 252 +0.0708% 119
Qatar Qatar 1,905 -20.9% 48
Romania Romania 1,920 +3.72% 46
Russia Russia 1,728 +6.37% 52
Rwanda Rwanda 79.2 +6.32% 148
Saudi Arabia Saudi Arabia 2,427 -10.2% 38
Sudan Sudan 31.5 -4.21% 163
Senegal Senegal 37 -18.8% 159
Singapore Singapore 3,770 +0.131% 25
Solomon Islands Solomon Islands 80.2 -1.78% 147
Sierra Leone Sierra Leone 30.4 -15.4% 166
El Salvador El Salvador 675 +4.15% 84
San Marino San Marino 5,207 +12.9% 14
Somalia Somalia 2.92 -31.1% 190
Serbia Serbia 1,463 +4.11% 58
South Sudan South Sudan 3.31 -37.5% 188
São Tomé & Príncipe São Tomé & Príncipe 168 +28.6% 132
Suriname Suriname 683 +30.6% 83
Slovakia Slovakia 2,531 +8.54% 36
Slovenia Slovenia 3,600 +11.5% 28
Sweden Sweden 6,178 +1.66% 8
Eswatini Eswatini 342 -5.38% 107
Seychelles Seychelles 1,153 +1.92% 61
Syria Syria 154 -16.8% 134
Chad Chad 20.8 +30.2% 175
Togo Togo 16.4 +30.2% 180
Thailand Thailand 805 +17.8% 75
Tajikistan Tajikistan 85.3 +4.18% 144
Turkmenistan Turkmenistan 130 -6.34% 136
Timor-Leste Timor-Leste 245 +44.4% 121
Trinidad & Tobago Trinidad & Tobago 807 -6.7% 74
Tunisia Tunisia 501 +4.02% 98
Turkey Turkey 1,042 -5.58% 64
Tuvalu Tuvalu 817 +44.4% 73
Tanzania Tanzania 29.2 +15% 168
Uganda Uganda 28.4 -3.58% 169
Uruguay Uruguay 1,815 +8.22% 50
United States United States 6,861 +3.32% 3
Uzbekistan Uzbekistan 244 -8.01% 123
St. Vincent & Grenadines St. Vincent & Grenadines 566 +0.668% 95
Venezuela Venezuela 59.6 +73.8% 153
Vietnam Vietnam 266 +17.5% 115
Vanuatu Vanuatu 55.6 +43.1% 155
Samoa Samoa 316 -1.47% 108
Yemen Yemen 5.4 +7.38% 187
South Africa South Africa 826 +5.6% 71
Zambia Zambia 99 -2.68% 143
Zimbabwe Zimbabwe 31.2 +44.8% 164

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