Insurance and financial services (% of commercial service exports)

Source: worldbank.org, 03.09.2025

Year: 2023

Flag Country Value Value change, % Rank
Aruba Aruba 1.35 +10.2% 113
Albania Albania 0.667 -15.3% 137
Andorra Andorra 3.73 +54.4% 68
Argentina Argentina 1.43 -15.9% 111
Armenia Armenia 5.26 -22.7% 53
Antigua & Barbuda Antigua & Barbuda 5.82 -3.75% 46
Australia Australia 5.82 -23.8% 47
Austria Austria 3.68 -18.6% 69
Azerbaijan Azerbaijan 0.815 +12.5% 131
Burundi Burundi 16.1 -7.24% 13
Belgium Belgium 8.76 +7.05% 33
Burkina Faso Burkina Faso 17.2 -19.3% 12
Bangladesh Bangladesh 4.87 +38.8% 59
Bulgaria Bulgaria 5.3 -15.2% 52
Bahrain Bahrain 33.8 -6.75% 3
Bosnia & Herzegovina Bosnia & Herzegovina 0.241 +7.48% 144
Belize Belize 1.27 -4.46% 115
Bolivia Bolivia 1.34 +619% 114
Brazil Brazil 4.98 -15% 57
Brunei Brunei 0.213 -68.5% 145
Bhutan Bhutan 12.5 -82.9% 19
Botswana Botswana 1.04 +159% 125
Canada Canada 9.38 -9.13% 32
Switzerland Switzerland 22.8 +1.35% 7
Chile Chile 8.07 -6.63% 35
China China 2.32 -5.61% 94
Cameroon Cameroon 3.33 -21.7% 74
Congo - Kinshasa Congo - Kinshasa 3.07 +30.8% 83
Colombia Colombia 1.22 +43.4% 118
Comoros Comoros 1.44 -6.43% 110
Cape Verde Cape Verde 0.451 -28.8% 141
Costa Rica Costa Rica 1.1 +18.5% 121
Curaçao Curaçao 1.47 +14.4% 109
Cyprus Cyprus 20.3 -29.1% 8
Czechia Czechia 3.04 +17.3% 84
Germany Germany 13.1 +8.3% 18
Dominica Dominica 4.83 -6.02% 61
Denmark Denmark 1.79 +62.4% 100
Dominican Republic Dominican Republic 2.32 -50.5% 95
Algeria Algeria 10.5 -1.43% 24
Ecuador Ecuador 1.79 +18.7% 101
Egypt Egypt 2.56 +13.9% 90
Spain Spain 4.4 +27.8% 64
Estonia Estonia 1.89 +30.6% 98
Ethiopia Ethiopia 0.0244 -86.2% 151
Finland Finland 1.58 +2.66% 107
France France 11.9 +36.3% 21
United Kingdom United Kingdom 26.4 +4.39% 6
Georgia Georgia 3.32 +80.9% 75
Ghana Ghana 17.7 +1.3% 11
Guinea Guinea 6.51 +177% 42
Gambia Gambia 0.0821 -11.5% 148
Greece Greece 3.34 +24.2% 73
Grenada Grenada 1.7 -8.96% 102
Guatemala Guatemala 4.72 -5.48% 62
Guyana Guyana 10.5 -76% 26
Hong Kong SAR China Hong Kong SAR China 27.3 -16.4% 5
Honduras Honduras 0.713 +47.1% 136
Croatia Croatia 1.16 -3.81% 119
Haiti Haiti 11.2 -24.7% 22
Hungary Hungary 2.36 +17.5% 93
Indonesia Indonesia 6.61 +33.9% 41
India India 3.49 +0.802% 70
Ireland Ireland 9.53 -4.52% 28
Iraq Iraq 0.316 +83.5% 143
Iceland Iceland 3.25 +16.4% 76
Israel Israel 0.0535 -1.38% 149
Italy Italy 7.55 +8.94% 38
Jamaica Jamaica 0.36 -14.1% 142
Jordan Jordan 1.09 -30% 122
Japan Japan 7.76 -7.95% 37
Kazakhstan Kazakhstan 10.3 +46.3% 27
Kenya Kenya 19.3 +25.5% 10
Cambodia Cambodia 0.782 -65.6% 133
Kiribati Kiribati 6.48 -17.3% 43
St. Kitts & Nevis St. Kitts & Nevis 4.95 -3.13% 58
South Korea South Korea 5.48 +78.4% 51
Kuwait Kuwait 15.5 -11.5% 15
Laos Laos 0.654 -77.1% 138
Lebanon Lebanon 9.46 +28.9% 30
St. Lucia St. Lucia 0.559 -13.7% 139
Sri Lanka Sri Lanka 1.82 -49.7% 99
Lesotho Lesotho 0.157 -10.1% 147
Lithuania Lithuania 7.04 +50.2% 39
Luxembourg Luxembourg 56 +1.18% 1
Latvia Latvia 2.41 -19% 92
Macao SAR China Macao SAR China 8.68 -63.4% 34
Morocco Morocco 1.05 +16.8% 124
Moldova Moldova 0.459 +36.1% 140
Mexico Mexico 9.43 +7.44% 31
North Macedonia North Macedonia 0.205 +49% 146
Mali Mali 4.3 +72.2% 65
Malta Malta 4.14 +13.8% 66
Montenegro Montenegro 1.64 +71.5% 103
Mongolia Mongolia 1.39 -9.33% 112
Mozambique Mozambique 1.62 -24.7% 104
Mauritania Mauritania 0.0134 -97.5% 152
Mauritius Mauritius 5.63 +5.05% 49
Malawi Malawi 1.6 0% 105
Malaysia Malaysia 2.62 -29.3% 88
Namibia Namibia 5.18 +104% 55
Niger Niger 13.4 +92.4% 17
Nigeria Nigeria 28.1 +35.6% 4
Nicaragua Nicaragua 0.778 +48.7% 134
Netherlands Netherlands 7.04 +23.3% 40
Norway Norway 7.97 -9.89% 36
Nepal Nepal 0.952 -54.1% 128
New Zealand New Zealand 2.79 -36.1% 86
Oman Oman 1.6 -36.3% 106
Pakistan Pakistan 3.04 -36.1% 85
Panama Panama 10.9 +27.6% 23
Peru Peru 4.86 -5.22% 60
Philippines Philippines 0.806 -3.53% 132
Papua New Guinea Papua New Guinea 1.13 -28.4% 120
Poland Poland 2.42 +10.8% 91
Portugal Portugal 1.53 +22.1% 108
Paraguay Paraguay 0.762 -8.53% 135
Qatar Qatar 6.21 +0.769% 44
Romania Romania 1.27 +5.27% 116
Russia Russia 3.46 +0.0209% 71
Rwanda Rwanda 3.25 +29% 77
Saudi Arabia Saudi Arabia 4.41 +14.4% 63
Senegal Senegal 5.16 +49% 56
Singapore Singapore 15.9 +10.1% 14
Solomon Islands Solomon Islands 0.973 -76.5% 126
Sierra Leone Sierra Leone 39.3 -266% 2
El Salvador El Salvador 2.6 -10.6% 89
Serbia Serbia 0.863 -19.5% 130
South Sudan South Sudan 12.3 +4.05% 20
Suriname Suriname 5.23 +23.9% 54
Slovakia Slovakia 3.13 +37% 82
Slovenia Slovenia 3.39 +10.7% 72
Sweden Sweden 6.06 +12.7% 45
Eswatini Eswatini 10.5 -37.6% 25
Sint Maarten Sint Maarten 0.0522 +134% 150
Thailand Thailand 2.08 -20.8% 96
Tajikistan Tajikistan 3.89 +127% 67
Timor-Leste Timor-Leste 5.66 -29.6% 48
Trinidad & Tobago Trinidad & Tobago 13.7 -11.6% 16
Tunisia Tunisia 1.26 -1.41% 117
Turkey Turkey 3.18 +87.4% 80
Tanzania Tanzania 0.902 +165% 129
Uganda Uganda 3.24 -9.51% 78
Ukraine Ukraine 1.96 +56.1% 97
Uruguay Uruguay 5.6 +22.3% 50
United States United States 20.2 -3.09% 9
Uzbekistan Uzbekistan 2.68 -9.42% 87
St. Vincent & Grenadines St. Vincent & Grenadines 3.2 -24.5% 79
Samoa Samoa 3.15 -32.9% 81
Kosovo Kosovo 0.965 +28.2% 127
South Africa South Africa 9.49 -7.28% 29
Zambia Zambia 1.07 +42.1% 123

                    
# 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 = 'TX.VAL.INSF.ZS.WT'

# 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 <- 'TX.VAL.INSF.ZS.WT'

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