Fixed broadband subscriptions

Source: worldbank.org, 03.09.2025

Year: 2023

Flag Country Value Value change, % Rank
Afghanistan Afghanistan 33,200 +2.75% 137
Angola Angola 137,323 -0.346% 115
Albania Albania 632,759 +8.11% 87
Andorra Andorra 41,835 +2.5% 132
United Arab Emirates United Arab Emirates 3,947,870 +4.61% 42
Argentina Argentina 11,547,700 +3.03% 21
Armenia Armenia 545,876 +6.87% 89
Australia Australia 9,682,370 +1.54% 26
Austria Austria 2,681,840 +1.2% 52
Azerbaijan Azerbaijan 2,154,700 +2.77% 57
Burundi Burundi 2,785 -30.5% 153
Belgium Belgium 5,118,840 +0.927% 34
Benin Benin 24,113 +14.5% 141
Bangladesh Bangladesh 13,533,000 +11.4% 19
Bulgaria Bulgaria 2,516,050 +5.42% 55
Bahrain Bahrain 269,327 -2.44% 106
Bahamas Bahamas 95,132 +13.2% 124
Bosnia & Herzegovina Bosnia & Herzegovina 907,951 +3.7% 77
Belarus Belarus 3,198,980 +2.37% 46
Brazil Brazil 47,336,100 +7.42% 4
Brunei Brunei 92,763 +2.86% 125
Bhutan Bhutan 10,371 +110% 147
Botswana Botswana 84,577 -23.5% 126
Canada Canada 16,711,600 +2.06% 16
Switzerland Switzerland 4,230,930 +3.1% 40
Chile Chile 4,520,630 +1.45% 37
China China 636,306,000 +7.91% 1
Côte d’Ivoire Côte d’Ivoire 424,902 +11.7% 98
Congo - Kinshasa Congo - Kinshasa 23,267 -29.5% 142
Congo - Brazzaville Congo - Brazzaville 78,398 +198% 127
Colombia Colombia 8,913,950 +1.3% 27
Comoros Comoros 3,299 +80.3% 152
Cape Verde Cape Verde 37,765 +10.6% 135
Costa Rica Costa Rica 1,149,920 +4% 72
Cuba Cuba 327,422 +2.37% 105
Curaçao Curaçao 58,433 -4.21% 129
Cyprus Cyprus 356,607 +2.2% 102
Czechia Czechia 4,097,960 +1.81% 41
Germany Germany 38,368,400 +2.27% 6
Djibouti Djibouti 16,972 +5.67% 145
Denmark Denmark 2,619,230 -1.15% 54
Dominican Republic Dominican Republic 1,261,690 +5.24% 71
Algeria Algeria 5,543,720 +17.8% 33
Ecuador Ecuador 2,889,020 +7.25% 50
Egypt Egypt 12,443,700 +3.43% 20
Spain Spain 17,830,200 +4.18% 15
Estonia Estonia 481,991 -10.1% 93
Finland Finland 1,979,000 +3.61% 61
France France 32,335,000 +1.11% 8
Gabon Gabon 98,719 +22.9% 122
United Kingdom United Kingdom 28,460,000 +1.1% 9
Georgia Georgia 1,115,920 +3.79% 73
Ghana Ghana 187,684 -9.4% 112
Guinea-Bissau Guinea-Bissau 6,685 +44.9% 149
Greece Greece 4,491,920 +0.505% 38
Guatemala Guatemala 920,892 +2.69% 76
Hong Kong SAR China Hong Kong SAR China 2,968,460 -0.48% 48
Honduras Honduras 464,342 +0.63% 94
Croatia Croatia 1,109,240 +2.64% 74
Hungary Hungary 3,563,670 +0.724% 43
Indonesia Indonesia 13,543,900 +0.744% 18
India India 39,480,000 +17.7% 5
Ireland Ireland 1,657,260 +2.84% 66
Iran Iran 10,891,700 -0.36% 23
Iraq Iraq 7,766,830 +21.6% 30
Iceland Iceland 145,042 +1.9% 113
Israel Israel 2,724,660 +2.62% 51
Italy Italy 18,945,300 +1.88% 14
Jamaica Jamaica 448,266 +5.54% 97
Jordan Jordan 805,034 +1.11% 81
Japan Japan 48,046,000 +4.33% 3
Kazakhstan Kazakhstan 2,916,490 +0.576% 49
Kenya Kenya 1,321,950 +65% 70
Kyrgyzstan Kyrgyzstan 455,996 +17% 95
Cambodia Cambodia 634,546 +24.5% 86
Kiribati Kiribati 53 -41.1% 157
South Korea South Korea 24,098,200 +2.38% 11
Kuwait Kuwait 49,049 -21.6% 130
Laos Laos 208,504 +15.8% 110
Liechtenstein Liechtenstein 19,564 +1.69% 144
Sri Lanka Sri Lanka 2,013,570 -8.49% 60
Lesotho Lesotho 8,870 -2.4% 148
Lithuania Lithuania 798,115 -0.377% 82
Latvia Latvia 489,326 +0.0925% 92
Macao SAR China Macao SAR China 211,860 +1.59% 109
Morocco Morocco 2,648,110 +9.62% 53
Monaco Monaco 21,770 +1.25% 143
Moldova Moldova 841,018 +5.12% 79
Madagascar Madagascar 38,835 +18.7% 134
Maldives Maldives 98,507 +8.02% 123
Mexico Mexico 26,062,400 -0.108% 10
North Macedonia North Macedonia 534,468 +3.71% 90
Malta Malta 236,006 +2.85% 108
Myanmar (Burma) Myanmar (Burma) 1,514,830 +34.4% 69
Montenegro Montenegro 202,835 +3.47% 111
Mongolia Mongolia 499,446 +14.3% 91
Mauritania Mauritania 29,653 +46.5% 139
Mauritius Mauritius 342,700 +2.51% 104
Malawi Malawi 16,790 +12.7% 146
Malaysia Malaysia 4,576,500 +8.34% 36
Namibia Namibia 104,303 +9.65% 120
Niger Niger 28,153 +135% 140
Nigeria Nigeria 116,867 +20.7% 117
Nicaragua Nicaragua 370,543 +9.93% 100
Netherlands Netherlands 7,827,630 +0.355% 29
Norway Norway 2,507,780 +0.64% 56
New Zealand New Zealand 1,958,080 +5.1% 62
Oman Oman 561,983 +4.66% 88
Pakistan Pakistan 3,356,720 +7.3% 45
Panama Panama 808,557 +12.1% 80
Peru Peru 3,532,270 +11.7% 44
Philippines Philippines 7,513,090 -13.7% 31
Palau Palau 1,300 +4.67% 154
Poland Poland 10,122,500 +10.6% 25
Puerto Rico Puerto Rico 750,838 +3.97% 83
Portugal Portugal 4,601,070 +2.87% 35
Paraguay Paraguay 881,769 +16.9% 78
Palestinian Territories Palestinian Territories 452,781 +7.53% 96
French Polynesia French Polynesia 99,947 +27.7% 121
Qatar Qatar 346,798 -5.16% 103
Romania Romania 6,628,500 +4.13% 32
Russia Russia 37,558,400 +4.73% 7
Rwanda Rwanda 62,175 +30.1% 128
Saudi Arabia Saudi Arabia 14,494,300 +7.71% 17
Senegal Senegal 356,839 +44% 101
Singapore Singapore 1,588,200 +2.03% 68
El Salvador El Salvador 733,631 +4.77% 84
Somalia Somalia 132,726 +11.5% 116
Serbia Serbia 2,076,670 +6.56% 59
South Sudan South Sudan 200 0% 155
São Tomé & Príncipe São Tomé & Príncipe 5,775 +26% 150
Suriname Suriname 110,290 -11.6% 119
Slovakia Slovakia 1,830,480 -1.63% 63
Slovenia Slovenia 675,376 -0.254% 85
Sweden Sweden 4,298,050 +0.921% 39
Eswatini Eswatini 34,007 +27.7% 136
Seychelles Seychelles 39,373 +5.15% 133
Syria Syria 1,618,890 +0.619% 67
Chad Chad 0 158
Togo Togo 114,272 +21.2% 118
Thailand Thailand 11,291,200 -10.1% 22
Timor-Leste Timor-Leste 80 -41.6% 156
Trinidad & Tobago Trinidad & Tobago 404,202 +3.79% 99
Tunisia Tunisia 1,725,580 +2.21% 64
Turkey Turkey 19,600,200 +3.17% 13
Tanzania Tanzania 1,665,170 +16.5% 65
Uganda Uganda 44,422 +10.3% 131
Ukraine Ukraine 8,066,310 +12.2% 28
Uruguay Uruguay 1,097,850 -3.32% 75
United States United States 131,028,000 +2.34% 2
Uzbekistan Uzbekistan 10,791,900 +19.7% 24
St. Vincent & Grenadines St. Vincent & Grenadines 30,897 +4.42% 138
Venezuela Venezuela 3,010,660 +11.4% 47
Vietnam Vietnam 22,760,500 +6.86% 12
Vanuatu Vanuatu 3,952 +12.1% 151
South Africa South Africa 2,152,800 +10.5% 58
Zambia Zambia 141,211 +63.4% 114
Zimbabwe Zimbabwe 257,299 -1.25% 107

                    
# 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.NET.BBND'

# 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.NET.BBND'

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