Air transport, passengers carried

Source: worldbank.org, 03.09.2025

Year: 2021

Flag Country Value Value change, % Rank
Afghanistan Afghanistan 293,213 -34.7% 101
Angola Angola 311,488 -12.7% 100
Albania Albania 193,259 +55% 106
United Arab Emirates United Arab Emirates 28,422,616 +8.83% 16
Argentina Argentina 6,708,097 +82.2% 40
Armenia Armenia 179,200 +226% 107
Antigua & Barbuda Antigua & Barbuda 40,633 +11,314% 133
Australia Australia 24,572,955 +5.25% 20
Austria Austria 18,901,048 +42.3% 24
Azerbaijan Azerbaijan 1,102,455 +102% 76
Belgium Belgium 5,404,284 +53.5% 42
Burkina Faso Burkina Faso 112,940 +60.8% 119
Bangladesh Bangladesh 3,750,753 +25.7% 48
Bulgaria Bulgaria 41,126 -90.7% 132
Bahrain Bahrain 1,840,268 +26.8% 62
Bahamas Bahamas 1,065,149 -16.3% 78
Belarus Belarus 1,040,730 -15.2% 79
Belize Belize 670,362 -31% 89
Bolivia Bolivia 4,311,880 +64.1% 47
Brazil Brazil 61,896,523 +36.3% 7
Brunei Brunei 27,881 -90.1% 137
Bhutan Bhutan 22,380 -54.2% 139
Botswana Botswana 172,017 -32.4% 109
Canada Canada 24,951,000 -9.66% 19
Switzerland Switzerland 10,988,881 +22% 29
Chile Chile 10,302,876 +28.5% 30
China China 440,301,216 +5.52% 2
Côte d’Ivoire Côte d’Ivoire 569,309 +76.3% 94
Cameroon Cameroon 177,992 +335% 108
Congo - Kinshasa Congo - Kinshasa 392,102 +41.3% 98
Congo - Brazzaville Congo - Brazzaville 157,784 +98.2% 111
Colombia Colombia 26,167,360 +113% 18
Cape Verde Cape Verde 76,354 -66.3% 125
Costa Rica Costa Rica 669,298 +46.8% 90
Cuba Cuba 22,359 -77.6% 140
Cyprus Cyprus 103,016 -1.48% 122
Czechia Czechia 1,418,032 +52.5% 70
Germany Germany 33,073,180 +28.4% 13
Dominican Republic Dominican Republic 69,447 +121% 127
Algeria Algeria 1,949,936 +33.6% 61
Ecuador Ecuador 1,534,854 +33.9% 68
Egypt Egypt 5,563,387 +19.9% 41
Spain Spain 43,440,480 +63.6% 10
Ethiopia Ethiopia 7,065,954 +43% 38
Finland Finland 2,805,555 -19.8% 51
Fiji Fiji 133,708 -67.3% 116
France France 32,000,528 +28.2% 14
United Kingdom United Kingdom 26,631,932 -11.9% 17
Georgia Georgia 84,591 +16% 124
Ghana Ghana 559,393 +74% 95
Equatorial Guinea Equatorial Guinea 31,268 -77.5% 134
Greece Greece 8,726,345 +54.5% 35
Guatemala Guatemala 1,766 -93% 152
Guyana Guyana 7,512 -58.2% 148
Hong Kong SAR China Hong Kong SAR China 777,197 -86.8% 83
Honduras Honduras 271,314 -15.5% 103
Croatia Croatia 767,762 +26.2% 84
Haiti Haiti 23,119 0% 138
Hungary Hungary 20,127,200 +37.9% 21
Indonesia Indonesia 33,549,828 -10.6% 12
India India 83,964,797 +21.8% 4
Ireland Ireland 74,065,210 +35.7% 5
Iran Iran 13,695,897 +7.46% 27
Iraq Iraq 1,620,013 +112% 65
Iceland Iceland 1,499,034 +65.8% 69
Israel Israel 2,437,207 +95.1% 56
Italy Italy 2,449,339 -68.6% 55
Jordan Jordan 1,695,302 +108% 63
Japan Japan 45,410,146 -11.2% 9
Kazakhstan Kazakhstan 8,765,001 +65.9% 33
Kenya Kenya 2,459,106 +31.8% 54
Kyrgyzstan Kyrgyzstan 171,347 -10.7% 110
Cambodia Cambodia 50,217 -91.8% 130
Kiribati Kiribati 46,390 -17.6% 131
South Korea South Korea 34,020,088 +13.3% 11
Kuwait Kuwait 2,182,888 +19.7% 58
Laos Laos 157,293 -59.4% 112
Lebanon Lebanon 1,603,134 +48.7% 66
Libya Libya 968,476 +35.4% 81
Sri Lanka Sri Lanka 871,685 -29.7% 82
Lithuania Lithuania 11,289 -67.8% 146
Luxembourg Luxembourg 1,081,478 +43.6% 77
Latvia Latvia 1,598,685 +20.8% 67
Macao SAR China Macao SAR China 698,047 +28.2% 86
Morocco Morocco 4,740,714 +57.4% 45
Moldova Moldova 528,581 +72.4% 96
Madagascar Madagascar 109,461 -41.2% 121
Maldives Maldives 277,881 -5.14% 102
Mexico Mexico 54,217,876 +58.8% 8
Marshall Islands Marshall Islands 30,115 +17.8% 135
Malta Malta 597,724 +8.81% 93
Myanmar (Burma) Myanmar (Burma) 1,132,656 -24.8% 75
Montenegro Montenegro 1,589 -99.7% 153
Mongolia Mongolia 61,614 -57.2% 128
Mozambique Mozambique 411,739 +25.6% 97
Mauritania Mauritania 207,225 +105% 105
Mauritius Mauritius 153,242 -62.4% 113
Malawi Malawi 1,290 -28% 154
Malaysia Malaysia 4,965,361 -68.8% 43
Namibia Namibia 2,246 -96.4% 151
Niger Niger 15,019 +2.08% 144
Nigeria Nigeria 4,486,313 +30.6% 46
Netherlands Netherlands 19,349,166 +31.2% 23
Nepal Nepal 2,550,505 +28.2% 53
Nauru Nauru 3,344 -64.3% 150
New Zealand New Zealand 8,729,635 +2.5% 34
Oman Oman 2,075,390 -16.9% 59
Pakistan Pakistan 4,930,662 +32.8% 44
Panama Panama 8,208,378 +167% 36
Peru Peru 9,053,965 +58.7% 32
Philippines Philippines 6,886,922 -35.1% 39
Papua New Guinea Papua New Guinea 1,039,010 +11.4% 80
Poland Poland 3,676,185 +36.9% 49
North Korea North Korea 524 -85.3% 155
Portugal Portugal 8,056,495 +29.5% 37
Paraguay Paraguay 111,964 -15% 120
Qatar Qatar 14,832,936 +39.4% 25
Romania Romania 2,719,206 +52.2% 52
Russia Russia 96,851,769 +55.1% 3
Rwanda Rwanda 715,764 +8.24% 85
Saudi Arabia Saudi Arabia 29,403,732 +40.2% 15
Sudan Sudan 1,386,967 +259% 72
Senegal Senegal 359,706 +32.6% 99
Singapore Singapore 2,311,712 -70.7% 57
Solomon Islands Solomon Islands 100,593 -27.5% 123
El Salvador El Salvador 1,412,026 +75.3% 71
Serbia Serbia 1,276,465 +60.5% 73
São Tomé & Príncipe São Tomé & Príncipe 28,019 +35.3% 136
Suriname Suriname 20,181 -90.9% 142
Slovakia Slovakia 8,900 +233% 147
Slovenia Slovenia 21,037 -73.2% 141
Sweden Sweden 20,067,144 +42.3% 22
Eswatini Eswatini 13,338 +25.3% 145
Seychelles Seychelles 137,565 -7.98% 114
Syria Syria 672,219 +124% 87
Togo Togo 672,184 +110% 88
Thailand Thailand 12,734,583 -54.8% 28
Tajikistan Tajikistan 125,164 -51.9% 118
Turkmenistan Turkmenistan 648,370 -40.2% 92
Trinidad & Tobago Trinidad & Tobago 652,148 -3.77% 91
Tunisia Tunisia 1,675,777 +21.3% 64
Turkey Turkey 69,065,868 +54.4% 6
Tanzania Tanzania 1,146,973 +39.3% 74
Uganda Uganda 16,490 +233% 143
Ukraine Ukraine 3,282,709 +82.3% 50
United States United States 666,153,000 +80.3% 1
Uzbekistan Uzbekistan 2,010,914 +115% 60
Venezuela Venezuela 265,276 -6.44% 104
Vietnam Vietnam 14,754,847 -53.6% 26
Vanuatu Vanuatu 128,164 -6.01% 117
Samoa Samoa 7,212 -39.7% 149
Yemen Yemen 52,035 0% 129
South Africa South Africa 9,321,576 +12.2% 31
Zambia Zambia 136,610 +1,467% 115
Zimbabwe Zimbabwe 75,638 -76.7% 126

                    
# 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 = 'IS.AIR.PSGR'

# 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 <- 'IS.AIR.PSGR'

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