Fixed telephone subscriptions (per 100 people)

Source: worldbank.org, 01.09.2025

Year: 2023

Flag Country Value Value change, % Rank
Afghanistan Afghanistan 0.439 +9.75% 116
Angola Angola 0.236 -10.6% 120
Albania Albania 6.16 -1.75% 86
Andorra Andorra 63.9 +0.157% 2
United Arab Emirates United Arab Emirates 21.2 -4.93% 42
Argentina Argentina 15.4 -0.645% 55
Armenia Armenia 11.2 -11.8% 70
Australia Australia 24.4 -6.51% 34
Austria Austria 39.5 -2.71% 13
Azerbaijan Azerbaijan 15.8 -0.629% 53
Burundi Burundi 0.105 -6.25% 125
Belgium Belgium 22.8 -10.6% 39
Benin Benin 0.0101 -9.01% 131
Bangladesh Bangladesh 0.176 +3.53% 121
Bulgaria Bulgaria 9.11 -9.8% 77
Bahrain Bahrain 15.7 -8.72% 54
Bahamas Bahamas 24.2 +11% 35
Bosnia & Herzegovina Bosnia & Herzegovina 19.3 -4.93% 47
Belarus Belarus 45.8 -0.651% 10
Brazil Brazil 12.1 -6.92% 65
Brunei Brunei 26.5 -1.12% 31
Bhutan Bhutan 2.34 -6.77% 104
Botswana Botswana 3.62 -3.72% 93
Canada Canada 27.7 -5.78% 29
Switzerland Switzerland 33.9 -0.877% 19
Chile Chile 10.1 -10.6% 75
China China 12.2 -3.17% 64
Côte d’Ivoire Côte d’Ivoire 0.784 -9.47% 114
Colombia Colombia 13.9 -4.79% 58
Comoros Comoros 1.04 +17.8% 111
Cape Verde Cape Verde 11.6 +5.45% 68
Costa Rica Costa Rica 13.3 +37.5% 60
Cuba Cuba 14.4 +1.41% 57
Cyprus Cyprus 29.3 -9.29% 27
Czechia Czechia 11.1 -4.31% 71
Germany Germany 45.9 0% 9
Djibouti Djibouti 2.49 +1.22% 102
Denmark Denmark 12.7 +5.83% 63
Dominican Republic Dominican Republic 10.1 -0.98% 75
Algeria Algeria 13.7 +11.4% 59
Ecuador Ecuador 7.98 -13.4% 79
Egypt Egypt 10.9 +5.83% 72
Spain Spain 38.5 -1.53% 15
Estonia Estonia 17.4 -11.7% 50
Finland Finland 2.82 -13.2% 99
France France 56 -1.93% 3
United Kingdom United Kingdom 38.8 -12% 14
Georgia Georgia 7.3 -12.4% 84
Ghana Ghana 0.946 -5.02% 112
Greece Greece 48.4 +3.42% 6
Guatemala Guatemala 10.7 0% 73
Hong Kong SAR China Hong Kong SAR China 46.8 -4.88% 8
Honduras Honduras 4.17 +5.3% 90
Croatia Croatia 30.9 -2.22% 24
Hungary Hungary 27.8 -5.44% 28
Indonesia Indonesia 3.26 +7.95% 97
India India 2.15 +11.4% 107
Ireland Ireland 22.6 -5.44% 40
Iran Iran 32 -2.44% 22
Iraq Iraq 4.39 -19.2% 89
Iceland Iceland 21.3 -13.1% 41
Israel Israel 31.4 -20.1% 23
Italy Italy 33.8 +1.5% 20
Jamaica Jamaica 16.2 +3.18% 52
Jordan Jordan 3.94 -1.25% 92
Japan Japan 48 -0.621% 7
Kazakhstan Kazakhstan 12.7 -9.93% 63
Kenya Kenya 0.123 +6.03% 123
Kyrgyzstan Kyrgyzstan 2.62 -15.5% 101
Kiribati Kiribati 0.0196 129
South Korea South Korea 42.8 -2.73% 12
Kuwait Kuwait 11.8 -5.6% 67
Liechtenstein Liechtenstein 25.9 -5.82% 32
Sri Lanka Sri Lanka 7.43 -34.2% 83
Lesotho Lesotho 0.318 +7.8% 118
Lithuania Lithuania 7.83 -11.6% 80
Latvia Latvia 7.52 -18.9% 82
Macao SAR China Macao SAR China 12.2 -6.87% 64
Morocco Morocco 7.62 +7.48% 81
Monaco Monaco 111 +0.909% 1
Moldova Moldova 27.6 -11.8% 30
Madagascar Madagascar 0.0109 -91.6% 130
Maldives Maldives 2.44 -4.31% 103
Mexico Mexico 19.8 -3.88% 46
Malta Malta 48.6 -1.02% 5
Myanmar (Burma) Myanmar (Burma) 1.09 +9.44% 110
Montenegro Montenegro 30 -3.23% 26
Mongolia Mongolia 15.3 +9.29% 56
Mauritius Mauritius 36.4 +0.552% 17
Malawi Malawi 0.0228 -50.4% 128
Malaysia Malaysia 23.9 -2.05% 36
Namibia Namibia 2.74 -7.74% 100
Nigeria Nigeria 0.0491 +12.9% 127
Nicaragua Nicaragua 3.43 +6.85% 95
Netherlands Netherlands 23.6 -7.45% 37
New Zealand New Zealand 12.8 -13.5% 62
Oman Oman 11.2 -1.75% 70
Pakistan Pakistan 1.04 -9.57% 111
Panama Panama 18.2 -5.21% 48
Peru Peru 4.44 -17.3% 88
Philippines Philippines 4.03 -6.06% 91
Palau Palau 45.1 +0.222% 11
Poland Poland 12.9 -5.15% 61
Puerto Rico Puerto Rico 23.4 +2.63% 38
Portugal Portugal 52.8 +1.15% 4
Paraguay Paraguay 3 +20.5% 98
Palestinian Territories Palestinian Territories 7.09 -17.8% 85
Qatar Qatar 17.6 -2.76% 49
Romania Romania 10.3 -11.2% 74
Rwanda Rwanda 0.0599 -20.9% 126
Saudi Arabia Saudi Arabia 20.4 -3.32% 45
Senegal Senegal 2.21 +31.5% 106
Singapore Singapore 33 -5.98% 21
Serbia Serbia 37.4 -2.09% 16
South Sudan South Sudan 0 132
São Tomé & Príncipe São Tomé & Príncipe 0.848 -23.6% 113
Suriname Suriname 20.5 +17.8% 44
Slovakia Slovakia 9.16 -7.29% 76
Slovenia Slovenia 30.5 -4.39% 25
Sweden Sweden 8.51 -19% 78
Eswatini Eswatini 3.41 +7.23% 96
Seychelles Seychelles 14.4 -5.26% 57
Syria Syria 11.9 -4.03% 66
Togo Togo 0.715 -0.97% 115
Thailand Thailand 5.7 -6.4% 87
Timor-Leste Timor-Leste 0.129 -3.73% 122
Trinidad & Tobago Trinidad & Tobago 20.7 -5.05% 43
Tunisia Tunisia 15.3 +3.38% 56
Turkey Turkey 11.4 -11.6% 69
Tanzania Tanzania 0.114 -13% 124
Uganda Uganda 0.237 +6.28% 119
Ukraine Ukraine 3.5 -17.5% 94
Uruguay Uruguay 35.6 -4.04% 18
United States United States 25.6 -6.91% 33
Uzbekistan Uzbekistan 17.2 +5.52% 51
St. Vincent & Grenadines St. Vincent & Grenadines 10.1 -6.48% 75
Vietnam Vietnam 2.31 -3.75% 105
South Africa South Africa 2.14 +1.9% 108
Zambia Zambia 0.392 -18% 117
Zimbabwe Zimbabwe 1.89 +4.42% 109

                    
# 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 = 'IT.MLT.MAIN.P2'

# 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 <- 'IT.MLT.MAIN.P2'

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