Communications, computer, etc. (% of service exports, BoP)

Source: worldbank.org, 03.09.2025

Year: 2024

Flag Country Value Value change, % Rank
Angola Angola 38.1 -35.9% 35
Albania Albania 14.5 -19.9% 82
Argentina Argentina 35.9 +12.3% 38
Armenia Armenia 26.6 +2.5% 58
Antigua & Barbuda Antigua & Barbuda 5.32 -5.79% 104
Australia Australia 19 -2.3% 71
Austria Austria 35.9 -0.81% 39
Azerbaijan Azerbaijan 33.1 +15.8% 45
Belgium Belgium 35.3 +9.08% 40
Bangladesh Bangladesh 59.4 -2.11% 9
Bulgaria Bulgaria 40.8 +2.32% 26
Bahrain Bahrain 22.8 -6.65% 68
Bahamas Bahamas 1.79 -18.9% 108
Bosnia & Herzegovina Bosnia & Herzegovina 29.1 +3.47% 52
Belize Belize 21.8 -4.92% 69
Brazil Brazil 46.8 -6.26% 20
Brunei Brunei 13.2 -46.5% 85
Bhutan Bhutan 11.5 +312% 89
Canada Canada 30.4 -4.96% 49
Switzerland Switzerland 44.5 +4.19% 22
Chile Chile 10.7 -4.95% 92
China China 26.7 -20.8% 57
Colombia Colombia 28.2 -1.25% 54
Cape Verde Cape Verde 7.85 -5.3% 99
Costa Rica Costa Rica 24.4 -4.52% 63
Cyprus Cyprus 38.5 -5.22% 33
Czechia Czechia 39.3 -2.76% 29
Germany Germany 41.7 -1.31% 25
Djibouti Djibouti 35.1 -9.74% 41
Dominica Dominica 25.3 +3.84% 61
Denmark Denmark 23.1 -17.5% 65
Dominican Republic Dominican Republic 11.5 -5.43% 90
Ecuador Ecuador 9.98 +14.2% 95
Spain Spain 25.4 +1.8% 60
Estonia Estonia 55.6 +5.05% 13
Finland Finland 65.2 +3.73% 6
France France 35.9 -3.4% 37
United Kingdom United Kingdom 18.4 -2.99% 72
Georgia Georgia 15 -6.6% 81
Gambia Gambia 0.311 -69.4% 110
Greece Greece 9.18 +13.3% 96
Grenada Grenada 10.7 -3.69% 93
Guatemala Guatemala 41.9 -7.51% 24
Honduras Honduras 74.6 -2.69% 1
Croatia Croatia 18.3 -3.98% 73
Hungary Hungary 38.7 +2.52% 32
Indonesia Indonesia 16 +3.11% 79
India India 55.8 -1.38% 12
Iceland Iceland 15.3 -6.06% 80
Israel Israel 70.5 +4.71% 5
Italy Italy 31.7 -4.88% 47
Jamaica Jamaica 12.1 +0.932% 87
Japan Japan 44.7 -14.5% 21
Kazakhstan Kazakhstan 18.1 -2.69% 74
Cambodia Cambodia 12.6 +7.25% 86
St. Kitts & Nevis St. Kitts & Nevis 16.5 -43.2% 78
South Korea South Korea 48.1 -1.85% 18
Kuwait Kuwait 49.5 -2.66% 17
St. Lucia St. Lucia 3.66 -8.9% 106
Lesotho Lesotho 36.5 +12.1% 36
Lithuania Lithuania 29.2 -2.32% 51
Luxembourg Luxembourg 14.3 -13.5% 83
Latvia Latvia 38.9 +2.8% 31
Moldova Moldova 44.4 +2.05% 23
Maldives Maldives 1.16 -29.8% 109
Mexico Mexico 7.45 +0.196% 100
North Macedonia North Macedonia 40.5 -2% 27
Malta Malta 48 -4.99% 19
Montenegro Montenegro 11.7 +12.9% 88
Mozambique Mozambique 1.96 +5.1% 107
Malaysia Malaysia 33.4 -4.47% 44
Namibia Namibia 23.7 -14.9% 64
Nigeria Nigeria 16.9 +1.36% 77
Nicaragua Nicaragua 52.3 +12.9% 14
Netherlands Netherlands 64.1 +0.919% 7
Norway Norway 34.7 +3.68% 43
Nepal Nepal 30.6 +108% 48
New Zealand New Zealand 21.4 -3.7% 70
Pakistan Pakistan 74 +6.17% 2
Panama Panama 5.29 +17.9% 105
Peru Peru 5.59 -11% 103
Philippines Philippines 72.8 -0.953% 3
Poland Poland 39.8 +2.75% 28
Portugal Portugal 26 +1.12% 59
Paraguay Paraguay 50.9 +0.892% 15
Palestinian Territories Palestinian Territories 72.7 +35.1% 4
Qatar Qatar 6.83 -10.5% 102
Romania Romania 49.5 -2.23% 16
Russia Russia 34.9 +10.2% 42
Saudi Arabia Saudi Arabia 7.41 -7.49% 101
Singapore Singapore 23.1 -4.68% 66
Solomon Islands Solomon Islands 23 -9.44% 67
El Salvador El Salvador 27.8 -6.45% 55
Suriname Suriname 57.6 -2.48% 10
Slovakia Slovakia 38.5 -0.961% 34
Slovenia Slovenia 27.4 +6.48% 56
Sweden Sweden 56.1 +3.08% 11
Thailand Thailand 28.7 -17.7% 53
Tajikistan Tajikistan 17.5 -8.96% 76
Timor-Leste Timor-Leste 18 -11.5% 75
Tonga Tonga 30.4 -4.4% 50
Trinidad & Tobago Trinidad & Tobago 9.15 -21% 97
Turkey Turkey 11.4 +0.236% 91
Ukraine Ukraine 60.7 -3.79% 8
Uruguay Uruguay 24.7 +0.509% 62
United States United States 31.9 -1.93% 46
Uzbekistan Uzbekistan 14.2 -23.6% 84
St. Vincent & Grenadines St. Vincent & Grenadines 7.99 -16.5% 98
Samoa Samoa 10.3 -12.2% 94
South Africa South Africa 39.2 +0.396% 30

                    
# 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 = 'BX.GSR.CMCP.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 <- 'BX.GSR.CMCP.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))