Travel services (% of commercial service imports)

Source: worldbank.org, 03.09.2025

Year: 2024

Flag Country Value Value change, % Rank
Angola Angola 18.4 +13.1% 66
Albania Albania 77.7 +5.69% 1
Argentina Argentina 34.9 +6.29% 17
Armenia Armenia 44.9 -8.68% 8
Antigua & Barbuda Antigua & Barbuda 16.2 +3.33% 76
Australia Australia 42.5 +0.665% 10
Austria Austria 19.4 +6.83% 62
Azerbaijan Azerbaijan 15.9 +17.5% 79
Belgium Belgium 16.6 +14.6% 73
Bangladesh Bangladesh 14.9 -4.76% 81
Bulgaria Bulgaria 24.7 +9.48% 41
Bahrain Bahrain 10.7 +13.3% 95
Bahamas Bahamas 12.3 +13.8% 90
Bosnia & Herzegovina Bosnia & Herzegovina 36.9 +9.13% 13
Belize Belize 25.1 -0.0893% 39
Brazil Brazil 19.4 -6.58% 61
Brunei Brunei 32.2 +27% 22
Bhutan Bhutan 47 -10.1% 6
Canada Canada 27.4 +5.2% 33
Switzerland Switzerland 11.3 -3.33% 92
Chile Chile 16.2 +7.36% 75
China China 41.1 +13% 12
Colombia Colombia 32 +8.93% 24
Cape Verde Cape Verde 29.8 +7.67% 28
Costa Rica Costa Rica 26.2 -0.822% 38
Cyprus Cyprus 9.1 -1.83% 99
Czechia Czechia 23.2 +10.5% 48
Germany Germany 21.9 -1.62% 56
Djibouti Djibouti 3.05 -3.87% 110
Dominica Dominica 17.2 +20.5% 72
Denmark Denmark 9.43 -0.101% 98
Dominican Republic Dominican Republic 18.5 -16.9% 64
Ecuador Ecuador 24.6 +8.87% 42
Spain Spain 29.2 -1.6% 31
Estonia Estonia 14.5 +5.63% 82
Finland Finland 13.2 +4.04% 86
France France 17.7 +4.46% 71
United Kingdom United Kingdom 29.9 +7.23% 27
Georgia Georgia 12.9 -8.75% 89
Gambia Gambia 7.01 +39.8% 104
Greece Greece 9.85 +9.32% 97
Grenada Grenada 6.9 +11.3% 105
Guatemala Guatemala 24.6 +8.52% 43
Hong Kong SAR China Hong Kong SAR China 32 +11.1% 23
Honduras Honduras 16.1 +2.18% 78
Croatia Croatia 31.1 +12.9% 25
Hungary Hungary 14.5 +4.15% 83
Indonesia Indonesia 23.4 +2.74% 47
India India 17.9 -4.81% 70
Iceland Iceland 35.2 +0.0476% 16
Israel Israel 19.1 -8.59% 63
Italy Italy 22.2 -2.13% 55
Jamaica Jamaica 8.83 -1.13% 101
Japan Japan 5.87 +6.95% 106
Kazakhstan Kazakhstan 30.5 +8.92% 26
Cambodia Cambodia 26.5 -6.26% 35
St. Kitts & Nevis St. Kitts & Nevis 18.5 +35.8% 65
South Korea South Korea 18.1 -0.89% 68
Kuwait Kuwait 46 -10.6% 7
St. Lucia St. Lucia 13 +12.1% 88
Lesotho Lesotho 75.2 +0.512% 2
Lithuania Lithuania 13.4 +7.04% 85
Luxembourg Luxembourg 4.02 +0.333% 109
Latvia Latvia 24 +9.2% 44
Moldova Moldova 33.9 -2.08% 21
Maldives Maldives 27.2 +9.06% 34
Mexico Mexico 16.1 +30.3% 77
North Macedonia North Macedonia 21 +1.5% 58
Malta Malta 4.16 +8.84% 108
Montenegro Montenegro 7.92 +19.3% 102
Mozambique Mozambique 7.63 -20.7% 103
Malaysia Malaysia 22.8 +6.53% 51
Namibia Namibia 4.71 +29.3% 107
Nigeria Nigeria 26.3 +9.05% 37
Nicaragua Nicaragua 16.2 +11.1% 74
Netherlands Netherlands 10.5 +7.23% 96
Norway Norway 28.4 -0.978% 32
Nepal Nepal 68.3 +2.09% 3
New Zealand New Zealand 23.1 +4.77% 50
Pakistan Pakistan 22.8 -3.37% 52
Panama Panama 22.7 +7.24% 53
Peru Peru 23.6 -2.59% 46
Philippines Philippines 34.4 +54.2% 19
Poland Poland 15.6 -0.443% 80
Portugal Portugal 26.4 -0.0639% 36
Paraguay Paraguay 24.9 -28.5% 40
Palestinian Territories Palestinian Territories 23.2 -38.6% 49
Qatar Qatar 44.1 +1.14% 9
Romania Romania 34.5 +4.53% 18
Russia Russia 48.4 +5.29% 5
Saudi Arabia Saudi Arabia 29.6 +10.4% 29
Singapore Singapore 8.91 +12.3% 100
Solomon Islands Solomon Islands 18.2 -12% 67
El Salvador El Salvador 35.6 +17% 15
Suriname Suriname 11.7 -17.6% 91
Slovakia Slovakia 19.9 +5.58% 59
Slovenia Slovenia 29.5 -0.887% 30
Sweden Sweden 11.2 -6.77% 93
Thailand Thailand 21.4 +14.7% 57
Tajikistan Tajikistan 1.96 -21.4% 111
Timor-Leste Timor-Leste 34.3 +2.18% 20
Tonga Tonga 36.7 +16.1% 14
Trinidad & Tobago Trinidad & Tobago 19.8 -3.46% 60
Turkey Turkey 14.1 -13.9% 84
Ukraine Ukraine 65.8 -11.3% 4
Uruguay Uruguay 23.7 -10.8% 45
United States United States 22.6 +2.92% 54
Uzbekistan Uzbekistan 41.9 +11.5% 11
St. Vincent & Grenadines St. Vincent & Grenadines 17.9 +4.16% 69
Samoa Samoa 11.1 +26.5% 94
South Africa South Africa 13 -1.95% 87

                    
# 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 = 'TM.VAL.TRVL.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 <- 'TM.VAL.TRVL.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))