Adjusted net savings, including particulate emission damage (% of GNI)

Source: worldbank.org, 01.09.2025

Year: 2021

Flag Country Value Value change, % Rank
Angola Angola 13.4 +48.6% 37
Albania Albania 3.07 -218% 86
Argentina Argentina 11.6 +49.1% 45
Armenia Armenia 0.908 -64.2% 92
Australia Australia 6.42 -10.3% 69
Austria Austria 12.7 -1.96% 40
Azerbaijan Azerbaijan 9.28 +16.1% 54
Belgium Belgium 12.1 +15.8% 42
Bangladesh Bangladesh 32.2 -4.94% 1
Bulgaria Bulgaria 8.53 +11.8% 58
Bahamas Bahamas 4.82 -43.7% 77
Belarus Belarus 13.2 +9.67% 39
Belize Belize 12 -20.3% 44
Bolivia Bolivia -2.04 -184% 103
Brazil Brazil -0.246 -83.4% 96
Brunei Brunei 24 -22.8% 7
Bhutan Bhutan 13.4 -26.8% 38
Botswana Botswana 8.5 +1.2% 59
Canada Canada 7.58 +98.2% 65
Switzerland Switzerland 16.2 +36.3% 29
Chile Chile -3.74 -181% 108
China China 16.3 +6.75% 28
Cameroon Cameroon -1.61 -7.1% 100
Congo - Kinshasa Congo - Kinshasa -11.2 -374% 115
Colombia Colombia 1.6 -66.8% 91
Comoros Comoros 5.41 +275% 75
Cape Verde Cape Verde 23.8 -8.11% 8
Costa Rica Costa Rica 16.9 +10.5% 26
Cyprus Cyprus 1.92 +69.2% 90
Czechia Czechia 9.68 +12.8% 52
Germany Germany 14.5 +10.1% 33
Denmark Denmark 20.4 +10.1% 12
Dominican Republic Dominican Republic 21.6 +23.8% 10
Algeria Algeria 15.4 +10.8% 32
Ecuador Ecuador 2.36 -61.2% 89
Egypt Egypt -1.13 -130% 97
Spain Spain 7.98 +16.8% 62
Estonia Estonia 16.5 +15.8% 27
Ethiopia Ethiopia 13.4 -12.5% 36
Finland Finland 11.2 +5.01% 47
France France 9.21 +55.4% 56
Georgia Georgia -5.6 +67.9% 110
Ghana Ghana 3.78 -72.8% 82
Guinea Guinea -16.3 +13.5% 116
Gambia Gambia 17.8 +139% 22
Greece Greece -2.16 -69.3% 104
Guatemala Guatemala 8.6 +6.85% 57
Honduras Honduras 19.4 -15.1% 18
Croatia Croatia 8.27 +21.4% 60
Haiti Haiti 7.98 -32.1% 61
Hungary Hungary 11.5 +0.596% 46
Indonesia Indonesia 10.8 +24% 50
India India 15.4 +6.7% 31
Ireland Ireland 20.1 +42.1% 15
Iraq Iraq 9.44 +201% 53
Iceland Iceland 5.7 -27.2% 72
Israel Israel 19.2 +2.21% 19
Italy Italy 7.69 +40.2% 63
Jamaica Jamaica 30.8 +32.7% 3
Jordan Jordan 4.17 -21% 81
Japan Japan 3.55 -25% 83
Kazakhstan Kazakhstan -0.205 -103% 95
Kenya Kenya 7.15 +43.3% 66
Kyrgyzstan Kyrgyzstan -2.65 -120% 105
Cambodia Cambodia 17.3 +4.18% 25
South Korea South Korea 17.7 +0.439% 23
Lebanon Lebanon -27.9 +38.9% 117
Lithuania Lithuania 12.1 +6.17% 41
Luxembourg Luxembourg 20.4 +33.9% 13
Latvia Latvia 3.07 -39.8% 85
Morocco Morocco 21.5 +6.37% 11
Moldova Moldova 6.71 -2.38% 67
Madagascar Madagascar -3.26 -24.7% 106
Maldives Maldives 23 -3,448% 9
Mexico Mexico 3.45 -48.9% 84
North Macedonia North Macedonia 14.3 +23.8% 34
Mongolia Mongolia -8.08 +82.6% 112
Mozambique Mozambique -6.98 +70.6% 111
Mauritania Mauritania 24.3 -13.6% 6
Mauritius Mauritius 0.00364 -100% 94
Malaysia Malaysia 0.36 +137% 93
Namibia Namibia -1.83 -117% 101
Nigeria Nigeria 18.5 +28.2% 21
Nicaragua Nicaragua 12.1 -30.4% 43
Netherlands Netherlands 15.5 +13.6% 30
Norway Norway 20.2 +48.8% 14
Nepal Nepal 24.4 -1.07% 5
New Zealand New Zealand 9.86 -12.8% 51
Oman Oman -10.3 +17.4% 114
Pakistan Pakistan 6.13 -5.11% 71
Panama Panama 19.4 +5.25% 17
Peru Peru 6.47 -40.9% 68
Philippines Philippines 7.68 -40.6% 64
Poland Poland 10.8 -2.09% 49
Portugal Portugal 3.06 +97.1% 87
Paraguay Paraguay 17.6 +3.48% 24
Qatar Qatar 25.5 +42.1% 4
Romania Romania 4.95 -18% 76
Russia Russia 6.37 -24.8% 70
Rwanda Rwanda -1.5 -64.5% 99
Sudan Sudan -8.5 -148% 113
Singapore Singapore 31.6 +20.7% 2
El Salvador El Salvador 5.59 -36% 74
Serbia Serbia 5.66 +1.01% 73
Slovakia Slovakia 4.45 -9.25% 79
Slovenia Slovenia 11.2 -3.29% 48
Sweden Sweden 19.8 +0.574% 16
Eswatini Eswatini 4.67 +829% 78
Thailand Thailand 9.22 -6.74% 55
Timor-Leste Timor-Leste -81.6 +249% 118
Tonga Tonga -3.35 -123% 107
Tunisia Tunisia -1.36 -67% 98
Uganda Uganda -4.41 +286% 109
Ukraine Ukraine -2.03 +112% 102
Uruguay Uruguay 13.9 -0.481% 35
United States United States 4.3 -24.3% 80
Uzbekistan Uzbekistan 2.72 -73.7% 88
Vietnam Vietnam 19 -4.28% 20

                    
# 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 = 'NY.ADJ.SVNG.GN.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 <- 'NY.ADJ.SVNG.GN.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))