Medium and high-tech exports (% manufactured exports)

Source: worldbank.org, 03.09.2025

Year: 2022

Flag Country Value Value change, % Rank
Afghanistan Afghanistan 0.341 0% 147
Angola Angola 12 -1.68% 115
Albania Albania 25.7 +181% 90
United Arab Emirates United Arab Emirates 11.8 +5.43% 116
Argentina Argentina 42 -0.911% 57
Armenia Armenia 36.7 +127% 65
Australia Australia 14.9 +24.6% 107
Austria Austria 60.3 -2.14% 24
Azerbaijan Azerbaijan 44.3 +10.5% 50
Burundi Burundi 5.37 +92.2% 133
Belgium Belgium 56.4 -7.35% 31
Bangladesh Bangladesh 1.87 0% 143
Bulgaria Bulgaria 45.3 -8.28% 46
Bahrain Bahrain 25.8 -14.1% 89
Bahamas Bahamas 4.09 -88.8% 136
Bosnia & Herzegovina Bosnia & Herzegovina 28.6 -1.24% 85
Belarus Belarus 36.3 0% 67
Belize Belize 0.163 +113% 149
Bermuda Bermuda 65.8 -25.3% 16
Bolivia Bolivia 6.93 +113% 129
Brazil Brazil 34 +12% 70
Barbados Barbados 26.5 -4.48% 88
Brunei Brunei 7.1 -1.27% 128
Botswana Botswana 3.85 +7.62% 138
Central African Republic Central African Republic 79.6 +37.8% 2
Canada Canada 50.4 +3.24% 40
Switzerland Switzerland 69.9 -1.37% 12
Chile Chile 7.6 -1.79% 127
China China 60.5 -2.69% 23
Côte d’Ivoire Côte d’Ivoire 22.1 -19.9% 95
Cameroon Cameroon 13.1 0% 112
Congo - Brazzaville Congo - Brazzaville 47.5 0% 43
Colombia Colombia 39.3 -3.63% 62
Cape Verde Cape Verde 0.0637 +51.2% 150
Costa Rica Costa Rica 54.1 -2.3% 33
Cuba Cuba 15.7 0% 104
Cyprus Cyprus 33.2 -6.54% 72
Czechia Czechia 70.7 +0.761% 10
Germany Germany 71.7 -0.726% 8
Denmark Denmark 57.3 -1.37% 29
Algeria Algeria 3.95 0% 137
Ecuador Ecuador 7.77 +10.9% 125
Egypt Egypt 35.6 +7.64% 68
Eritrea Eritrea 14.7 0% 110
Spain Spain 52.8 -2.5% 36
Estonia Estonia 51.5 -3.89% 39
Ethiopia Ethiopia 14.9 -5.86% 108
Finland Finland 47.2 -6.28% 44
Fiji Fiji 8.15 -18.1% 124
France France 61.3 -2% 22
Gabon Gabon 54.8 0% 32
United Kingdom United Kingdom 63.4 -5.13% 19
Georgia Georgia 29.6 +2.62% 80
Ghana Ghana 14.7 +43.4% 109
Gambia Gambia 15.1 0% 105
Greece Greece 27.6 -13.2% 86
Guatemala Guatemala 24.8 -0.478% 91
Hong Kong SAR China Hong Kong SAR China 38.8 0% 63
Honduras Honduras 43.9 0% 51
Croatia Croatia 44.5 -6.13% 49
Haiti Haiti 3.8 0% 139
Hungary Hungary 75.2 -1.21% 5
Indonesia Indonesia 32 +5.72% 75
India India 33.8 -5% 71
Ireland Ireland 59.7 -3.02% 25
Iran Iran 49.7 0% 41
Iraq Iraq 0.0375 0% 152
Iceland Iceland 36.4 -0.798% 66
Israel Israel 65.8 -1.54% 15
Italy Italy 52.4 -2.42% 37
Jamaica Jamaica 1.38 +6.75% 145
Jordan Jordan 40.3 +7.68% 61
Japan Japan 78.4 -1.85% 3
Kazakhstan Kazakhstan 45 +19.4% 48
Kenya Kenya 18.5 -9.29% 99
Kyrgyzstan Kyrgyzstan 21.6 +7.75% 96
Cambodia Cambodia 18.8 +37.3% 98
South Korea South Korea 71.9 -5.27% 7
Kuwait Kuwait 6.32 -15.2% 130
Laos Laos 13.8 0% 111
Lebanon Lebanon 38.6 +39.2% 64
St. Lucia St. Lucia 32.7 0% 73
Sri Lanka Sri Lanka 10.1 +1.04% 121
Lithuania Lithuania 42.6 -6.58% 56
Luxembourg Luxembourg 45.8 -1.75% 45
Latvia Latvia 41.4 +1.04% 58
Macao SAR China Macao SAR China 0.0585 -73.3% 151
Morocco Morocco 64.9 +4.79% 17
Moldova Moldova 32.2 -10.7% 74
Madagascar Madagascar 3.66 -2.63% 140
Maldives Maldives 1.66 +413% 144
Mexico Mexico 78.2 -1.26% 4
North Macedonia North Macedonia 64.9 -1.75% 18
Malta Malta 70.9 +6.86% 9
Myanmar (Burma) Myanmar (Burma) 8.23 -37.2% 123
Montenegro Montenegro 34.5 +18.4% 69
Mongolia Mongolia 2.21 +104% 141
Mozambique Mozambique 12.1 +16.3% 114
Mauritius Mauritius 11.3 +21.3% 117
Malawi Malawi 52.1 +89.8% 38
Malaysia Malaysia 63.2 +1.91% 20
Namibia Namibia 0.344 -22.9% 146
Niger Niger 11.1 +68.1% 118
Nigeria Nigeria 67.8 +4.12% 14
Nicaragua Nicaragua 20.6 +3.77% 97
Netherlands Netherlands 53.1 -7.52% 35
Norway Norway 43.1 -6.42% 54
Nepal Nepal 6.25 +20.9% 131
New Zealand New Zealand 16.4 -11.3% 103
Oman Oman 26.8 -29.1% 87
Pakistan Pakistan 10.7 +4.34% 120
Panama Panama 7.69 0% 126
Peru Peru 5.63 +16.6% 132
Philippines Philippines 80 +0.133% 1
Papua New Guinea Papua New Guinea 5.24 0% 134
Poland Poland 53.9 +0.931% 34
Portugal Portugal 42.9 -2.23% 55
Paraguay Paraguay 31.8 +21% 76
Palestinian Territories Palestinian Territories 12.4 -18% 113
Qatar Qatar 31.3 -57.8% 77
Romania Romania 59.4 -3.99% 27
Russia Russia 30 0% 79
Rwanda Rwanda 4.26 -81.7% 135
Saudi Arabia Saudi Arabia 31.1 0% 78
Senegal Senegal 11 -20.6% 119
Singapore Singapore 73.5 -3.44% 6
El Salvador El Salvador 18 +5.82% 101
Serbia Serbia 43.4 -2.4% 53
Suriname Suriname 40.5 +12.3% 59
Slovakia Slovakia 69.9 -2.34% 11
Slovenia Slovenia 68.3 -0.0638% 13
Sweden Sweden 56.8 -2.63% 30
Eswatini Eswatini 17.6 0% 102
Syria Syria 22.7 0% 93
Thailand Thailand 61.9 -1.66% 21
Tajikistan Tajikistan 2.07 -38.6% 142
Tonga Tonga 23.5 0% 92
Trinidad & Tobago Trinidad & Tobago 43.6 -22.5% 52
Tunisia Tunisia 47.7 -4.96% 42
Turkey Turkey 40.3 -3.27% 60
Tanzania Tanzania 18.4 -11.6% 100
Uganda Uganda 22.3 0% 94
Ukraine Ukraine 29.2 -9.37% 83
Uruguay Uruguay 28.8 +20% 84
United States United States 59.6 -4.75% 26
Uzbekistan Uzbekistan 29.5 +4.79% 81
Venezuela Venezuela 9.65 0% 122
Vietnam Vietnam 57.5 -1.43% 28
Yemen Yemen 0.245 0% 148
South Africa South Africa 45.3 -0.175% 47
Zambia Zambia 29.3 +2.8% 82
Zimbabwe Zimbabwe 15 +24.7% 106

                    
# 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.MNF.TECH.ZS.UN'

# 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.MNF.TECH.ZS.UN'

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