Computer, communications and other services (% of commercial service imports)

Source: worldbank.org, 03.09.2025

Year: 2024

Flag Country Value Value change, % Rank
Angola Angola 36.7 -13.7% 62
Albania Albania 8.2 -16.4% 108
Argentina Argentina 40.4 +3.02% 52
Armenia Armenia 13.1 +25.3% 103
Antigua & Barbuda Antigua & Barbuda 51.7 +1.48% 24
Australia Australia 37.8 +1.6% 59
Austria Austria 52.4 -0.516% 23
Azerbaijan Azerbaijan 62.4 -0.698% 11
Belgium Belgium 56.1 -2.88% 15
Bangladesh Bangladesh 13.5 +1.89% 102
Bulgaria Bulgaria 37.9 -5.61% 56
Bahrain Bahrain 20.9 -2.08% 92
Bahamas Bahamas 50.7 +2.38% 27
Bosnia & Herzegovina Bosnia & Herzegovina 22.3 -3.68% 91
Belize Belize 22.6 -9.72% 89
Brazil Brazil 53.6 +2.63% 20
Brunei Brunei 47.8 -9.97% 35
Bhutan Bhutan 20.1 +53.9% 93
Canada Canada 46.3 -3.73% 40
Switzerland Switzerland 69.3 -0.0568% 4
Chile Chile 36.3 -1.14% 63
China China 28.3 -5.68% 79
Colombia Colombia 32.4 -8.74% 74
Cape Verde Cape Verde 37.2 +1.09% 60
Costa Rica Costa Rica 39.2 +3.9% 54
Cyprus Cyprus 54 +1.56% 19
Czechia Czechia 48 -0.256% 34
Germany Germany 50.5 +1.98% 28
Djibouti Djibouti 2.38 -0.416% 111
Dominica Dominica 43.2 -0.0365% 46
Denmark Denmark 48.3 +1.59% 32
Dominican Republic Dominican Republic 23.5 +40.5% 85
Ecuador Ecuador 26.9 -13.9% 82
Spain Spain 53.5 -0.613% 21
Estonia Estonia 56.4 -0.501% 14
Finland Finland 65.8 -0.942% 5
France France 54.6 -1.7% 17
United Kingdom United Kingdom 51 -0.426% 25
Georgia Georgia 19.1 +18.4% 94
Gambia Gambia 6.47 +135% 110
Greece Greece 17.4 +10.7% 96
Grenada Grenada 62.4 +0.886% 10
Guatemala Guatemala 18.1 -9.92% 95
Hong Kong SAR China Hong Kong SAR China 33.2 -7.75% 72
Honduras Honduras 22.3 +2.43% 90
Croatia Croatia 49 -9.28% 31
Hungary Hungary 54.2 +1.49% 18
Indonesia Indonesia 41.4 -0.429% 49
India India 60.6 +0.363% 12
Iceland Iceland 41.4 +0.728% 50
Israel Israel 62.4 +5.71% 9
Italy Italy 47 -0.774% 37
Jamaica Jamaica 37.8 -0.755% 58
Japan Japan 65.8 -2.13% 6
Kazakhstan Kazakhstan 37.9 -1.37% 57
Cambodia Cambodia 14.6 -3.51% 100
St. Kitts & Nevis St. Kitts & Nevis 34.6 -30.6% 67
South Korea South Korea 55.9 +1.5% 16
Kuwait Kuwait 23 +30.1% 87
St. Lucia St. Lucia 52.5 -3.58% 22
Lesotho Lesotho 9.68 -5.52% 106
Lithuania Lithuania 35.9 -2.86% 64
Luxembourg Luxembourg 34.3 -2.55% 68
Latvia Latvia 49.4 +0.383% 29
Moldova Moldova 23.7 +1.16% 84
Maldives Maldives 38.9 -2.01% 55
Mexico Mexico 31.1 -4.61% 76
North Macedonia North Macedonia 50.8 -4.01% 26
Malta Malta 74.8 -0.603% 2
Montenegro Montenegro 37.1 +10.9% 61
Mozambique Mozambique 47.5 +21.5% 36
Malaysia Malaysia 45.5 -1.35% 41
Namibia Namibia 80.1 -1.63% 1
Nigeria Nigeria 28.2 -1.47% 80
Nicaragua Nicaragua 9.64 -11.3% 107
Netherlands Netherlands 64.2 +0.0135% 7
Norway Norway 48.2 +0.453% 33
Nepal Nepal 7.52 +7,258% 109
New Zealand New Zealand 43.2 +1.56% 47
Pakistan Pakistan 23.3 +12.5% 86
Panama Panama 12.6 -0.816% 104
Peru Peru 32.8 -1.59% 73
Philippines Philippines 33.4 -17.6% 71
Poland Poland 58.1 +0.00858% 13
Portugal Portugal 46.8 +5.6% 38
Paraguay Paraguay 22.9 +16.7% 88
Palestinian Territories Palestinian Territories 29.2 +19.9% 78
Qatar Qatar 14.6 -18.5% 99
Romania Romania 45.3 -3.36% 43
Russia Russia 31.3 -2.73% 75
Saudi Arabia Saudi Arabia 34 -6.26% 70
Singapore Singapore 49.3 -3.45% 30
Solomon Islands Solomon Islands 44.8 +10.7% 44
El Salvador El Salvador 16.1 -7.81% 97
Suriname Suriname 62.7 +3.68% 8
Slovakia Slovakia 45.4 -0.843% 42
Slovenia Slovenia 46.6 -1.76% 39
Sweden Sweden 73.5 +1.37% 3
Thailand Thailand 40.4 -0.452% 53
Tajikistan Tajikistan 14.2 -7.02% 101
Timor-Leste Timor-Leste 27.8 -25.2% 81
Tonga Tonga 29.2 -6.4% 77
Trinidad & Tobago Trinidad & Tobago 35.8 -4.77% 65
Turkey Turkey 35.3 -2.13% 66
Ukraine Ukraine 15.7 +53% 98
Uruguay Uruguay 43.4 +0.311% 45
United States United States 40.6 -0.0468% 51
Uzbekistan Uzbekistan 10.5 +40% 105
St. Vincent & Grenadines St. Vincent & Grenadines 25.3 -7.89% 83
Samoa Samoa 34.2 -8.74% 69
South Africa South Africa 43 +3.75% 48

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