Rural population

Source: worldbank.org, 01.09.2025

Year: 2024

Flag Country Value Value change, % Rank
Aruba Aruba 59,759 -0.149% 178
Afghanistan Afghanistan 31,019,653 +2.41% 20
Angola Angola 11,638,154 +1.14% 49
Albania Albania 939,800 -3.31% 129
Andorra Andorra 10,040 +1.57% 194
United Arab Emirates United Arab Emirates 1,304,368 +1.81% 119
Argentina Argentina 3,391,112 -1.2% 88
Armenia Armenia 1,094,214 +1.8% 125
American Samoa American Samoa 5,947 -1.96% 198
Antigua & Barbuda Antigua & Barbuda 70,950 +0.482% 176
Australia Australia 3,604,637 +1.06% 84
Austria Austria 3,688,006 -0.206% 83
Azerbaijan Azerbaijan 4,285,503 -0.513% 81
Burundi Burundi 11,918,142 +2.16% 46
Belgium Belgium 210,933 -1.19% 161
Benin Benin 7,134,606 +1.32% 73
Burkina Faso Burkina Faso 15,738,592 +1.29% 36
Bangladesh Bangladesh 102,002,601 -0.0652% 6
Bulgaria Bulgaria 1,479,820 -1.48% 113
Bahrain Bahrain 158,883 -0.556% 167
Bahamas Bahamas 65,152 -0.391% 177
Bosnia & Herzegovina Bosnia & Herzegovina 1,559,724 -1.53% 111
Belarus Belarus 1,723,988 -2.52% 107
Belize Belize 221,724 +1.01% 158
Bermuda Bermuda 0 205
Bolivia Bolivia 3,532,209 +0.118% 86
Brazil Brazil 25,405,909 -1.47% 21
Barbados Barbados 193,354 -0.133% 164
Brunei Brunei 95,140 -0.58% 171
Bhutan Bhutan 435,338 -0.522% 152
Botswana Botswana 668,354 -0.685% 142
Central African Republic Central African Republic 2,978,257 +2.51% 91
Canada Canada 7,440,206 +2.34% 70
Switzerland Switzerland 2,319,325 +1.15% 101
Chile Chile 2,348,845 -0.333% 100
China China 485,476,426 -2.87% 2
Côte d’Ivoire Côte d’Ivoire 14,803,432 +1.38% 38
Cameroon Cameroon 11,680,951 +1.19% 47
Congo - Kinshasa Congo - Kinshasa 56,763,556 +2.09% 11
Congo - Brazzaville Congo - Brazzaville 1,922,814 +0.931% 105
Colombia Colombia 9,174,726 -0.627% 62
Comoros Comoros 603,017 +1.49% 146
Cape Verde Cape Verde 165,798 -0.862% 166
Costa Rica Costa Rica 863,518 -2.67% 135
Cuba Cuba 2,453,213 -0.958% 99
Curaçao Curaçao 17,098 -0.0234% 193
Cayman Islands Cayman Islands 0 205
Cyprus Cyprus 447,119 +0.699% 151
Czechia Czechia 2,749,052 -0.565% 94
Germany Germany 18,460,095 -1.05% 31
Djibouti Djibouti 248,564 +0.518% 156
Dominica Dominica 18,331 -1.55% 191
Denmark Denmark 679,823 -0.639% 141
Dominican Republic Dominican Republic 1,712,877 -2.81% 108
Algeria Algeria 11,353,406 -0.56% 50
Ecuador Ecuador 6,342,158 +0.185% 74
Egypt Egypt 66,126,138 +1.47% 8
Eritrea Eritrea 1,983,084 +0.723% 103
Spain Spain 8,881,923 -0.418% 65
Estonia Estonia 411,335 -0.569% 153
Ethiopia Ethiopia 100,813,106 +1.94% 7
Finland Finland 796,426 +0.252% 136
Fiji Fiji 379,018 -0.664% 154
France France 12,302,858 -1.13% 45
Faroe Islands Faroe Islands 31,077 +0.129% 187
Micronesia (Federated States of) Micronesia (Federated States of) 86,505 +0.24% 172
Gabon Gabon 220,711 -0.986% 159
United Kingdom United Kingdom 10,464,202 -0.521% 54
Georgia Georgia 1,426,850 -2.22% 114
Ghana Ghana 13,821,230 +0.353% 40
Gibraltar Gibraltar 0 205
Guinea Guinea 9,071,684 +1.71% 64
Gambia Gambia 963,788 +0.553% 127
Guinea-Bissau Guinea-Bissau 1,191,086 +1.43% 121
Equatorial Guinea Equatorial Guinea 475,514 +0.726% 150
Greece Greece 1,975,535 -1.77% 104
Grenada Grenada 73,527 -0.224% 175
Greenland Greenland 6,736 -1.78% 197
Guatemala Guatemala 8,551,226 +0.592% 68
Guam Guam 7,986 -0.783% 195
Guyana Guyana 604,067 +0.36% 144
Hong Kong SAR China Hong Kong SAR China 0 205
Honduras Honduras 4,241,727 +0.15% 82
Croatia Croatia 1,587,309 -0.723% 110
Haiti Haiti 4,653,456 -0.885% 79
Hungary Hungary 2,564,708 -1.47% 96
Indonesia Indonesia 115,651,736 -0.721% 4
Isle of Man Isle of Man 38,959 -0.493% 184
India India 916,019,293 +0.0972% 1
Ireland Ireland 1,896,003 +0.53% 106
Iran Iran 20,421,437 -0.901% 27
Iraq Iraq 12,959,446 +1.23% 44
Iceland Iceland 23,896 +1.96% 189
Israel Israel 703,594 -0.0307% 139
Italy Italy 16,343,847 -1.15% 35
Jamaica Jamaica 1,199,211 -0.922% 120
Jordan Jordan 900,431 -1.36% 132
Japan Japan 9,751,903 -1.57% 57
Kazakhstan Kazakhstan 8,569,187 +0.787% 67
Kenya Kenya 39,475,409 +1.21% 14
Kyrgyzstan Kyrgyzstan 4,467,268 +1.16% 80
Cambodia Cambodia 13,046,539 +0.601% 42
Kiribati Kiribati 55,895 -0.148% 179
St. Kitts & Nevis St. Kitts & Nevis 32,218 0% 186
South Korea South Korea 9,574,982 -0.152% 59
Kuwait Kuwait 0 205
Laos Laos 4,746,893 +0.286% 78
Lebanon Lebanon 603,646 -1.06% 145
Liberia Liberia 2,577,574 +1.06% 95
Libya Libya 1,335,448 -0.622% 118
St. Lucia St. Lucia 145,043 +0.0904% 168
Liechtenstein Liechtenstein 34,285 +0.764% 185
Sri Lanka Sri Lanka 17,660,789 -0.801% 33
Lesotho Lesotho 1,615,229 +0.422% 109
Lithuania Lithuania 897,145 -0.204% 133
Luxembourg Luxembourg 52,415 -0.72% 181
Latvia Latvia 580,802 -1.26% 149
Macao SAR China Macao SAR China 0 205
Morocco Morocco 13,083,549 -0.534% 41
Monaco Monaco 0 205
Moldova Moldova 1,347,575 -3.18% 116
Madagascar Madagascar 18,785,485 +1.3% 30
Maldives Maldives 303,975 -0.411% 155
Mexico Mexico 23,735,569 -0.669% 23
Marshall Islands Marshall Islands 7,807 -4.85% 196
North Macedonia North Macedonia 719,237 -2.89% 138
Mali Mali 12,989,811 +1.56% 43
Malta Malta 28,683 +2.57% 188
Myanmar (Burma) Myanmar (Burma) 36,803,911 +0.146% 15
Montenegro Montenegro 194,386 -1.02% 163
Mongolia Mongolia 1,083,414 +0.684% 126
Northern Mariana Islands Northern Mariana Islands 3,467 -3.08% 200
Mozambique Mozambique 21,012,478 +2% 26
Mauritania Mauritania 2,147,470 +1.08% 102
Mauritius Mauritius 743,816 -0.251% 137
Malawi Malawi 17,627,836 +2.21% 34
Malaysia Malaysia 7,395,640 -1.08% 71
Namibia Namibia 1,339,469 +0.202% 117
New Caledonia New Caledonia 78,702 -0.477% 174
Niger Niger 22,374,187 +3.11% 25
Nigeria Nigeria 104,635,961 +0.436% 5
Nicaragua Nicaragua 2,755,736 +0.584% 93
Netherlands Netherlands 1,178,083 -3.39% 122
Norway Norway 873,844 -1.08% 134
Nepal Nepal 23,019,299 -0.739% 24
Nauru Nauru 0 205
New Zealand New Zealand 689,147 +0.954% 140
Oman Oman 581,075 -0.792% 148
Pakistan Pakistan 154,869,749 +0.989% 3
Panama Panama 1,359,731 +0.0254% 115
Peru Peru 7,138,185 +0.059% 72
Philippines Philippines 59,527,428 +0.191% 10
Palau Palau 3,037 -2.63% 202
Papua New Guinea Papua New Guinea 9,108,484 +1.61% 63
Poland Poland 14,501,252 -0.642% 39
Puerto Rico Puerto Rico 202,961 -0.486% 162
North Korea North Korea 9,671,275 -0.513% 58
Portugal Portugal 3,379,256 -0.463% 89
Paraguay Paraguay 2,529,903 +0.308% 97
Palestinian Territories Palestinian Territories 1,170,119 +1.04% 123
French Polynesia French Polynesia 105,903 -0.106% 170
Qatar Qatar 17,518 +2.1% 192
Romania Romania 8,604,086 -0.407% 66
Russia Russia 35,096,897 -1.08% 17
Rwanda Rwanda 11,678,837 +1.93% 48
Saudi Arabia Saudi Arabia 5,234,679 +3.2% 75
Sudan Sudan 31,907,960 +0.162% 19
Senegal Senegal 9,236,190 +1.33% 61
Singapore Singapore 0 205
Solomon Islands Solomon Islands 602,209 +1.77% 147
Sierra Leone Sierra Leone 4,772,211 +1.27% 77
El Salvador El Salvador 1,521,420 -2.01% 112
San Marino San Marino 703 -4.09% 204
Somalia Somalia 9,786,101 +2.35% 56
Serbia Serbia 2,808,058 -1.14% 92
South Sudan South Sudan 9,368,409 +3.52% 60
São Tomé & Príncipe São Tomé & Príncipe 54,140 -0.63% 180
Suriname Suriname 212,325 +0.515% 160
Slovakia Slovakia 2,484,826 -0.401% 98
Slovenia Slovenia 926,269 -0.523% 131
Sweden Sweden 1,165,205 -1.81% 124
Eswatini Eswatini 931,955 +0.701% 130
Sint Maarten Sint Maarten 0 205
Seychelles Seychelles 49,461 +0.28% 182
Syria Syria 10,351,703 +3.01% 55
Turks & Caicos Islands Turks & Caicos Islands 2,591 -2.52% 203
Chad Chad 15,287,067 +4.62% 37
Togo Togo 5,227,290 +1.21% 76
Thailand Thailand 32,737,947 -1.58% 18
Tajikistan Tajikistan 7,570,077 +1.53% 69
Turkmenistan Turkmenistan 3,408,198 +0.613% 87
Timor-Leste Timor-Leste 940,640 +0.603% 128
Tonga Tonga 79,996 -0.468% 173
Trinidad & Tobago Trinidad & Tobago 635,426 -0.204% 143
Tunisia Tunisia 3,575,094 -0.519% 85
Turkey Turkey 18,905,610 -1.69% 29
Tuvalu Tuvalu 3,190 -3.74% 201
Tanzania Tanzania 42,414,056 +1.72% 13
Uganda Uganda 36,316,458 +1.92% 16
Ukraine Ukraine 11,250,543 -0.297% 52
Uruguay Uruguay 140,476 -1.96% 169
United States United States 56,067,296 -0.331% 12
Uzbekistan Uzbekistan 17,953,304 +1.8% 32
St. Vincent & Grenadines St. Vincent & Grenadines 45,554 -1.62% 183
Venezuela Venezuela 3,265,217 -0.212% 90
British Virgin Islands British Virgin Islands 19,668 +0.393% 190
U.S. Virgin Islands U.S. Virgin Islands 3,847 -2.83% 199
Vietnam Vietnam 60,395,686 -0.556% 9
Vanuatu Vanuatu 242,073 +2.06% 157
Samoa Samoa 180,040 +0.733% 165
Yemen Yemen 24,156,317 +1.92% 22
South Africa South Africa 19,651,487 -0.298% 28
Zambia Zambia 11,315,258 +1.74% 51
Zimbabwe Zimbabwe 11,199,923 +1.57% 53

The rural population is an essential demographic indicator that reflects the number of individuals living in areas that are classified as rural. These regions are typically characterized by lower population density, less access to services, and a greater reliance on agriculture and natural resources. As of 2023, the global rural population stands at approximately 3.45 billion individuals, with the median rural population value reaching 1,762,465. This demographic factor is crucial in understanding global population trends, economic development, and social challenges.

The importance of monitoring the rural population cannot be overstated. It has significant implications for policy formulation, economic development, and environmental management. Rural areas often face unique challenges, such as limited access to education, healthcare, and employment opportunities. Understanding the rural population dynamics helps governments and organizations tailor interventions to improve living standards and foster sustainable development. For instance, targeted investments in rural infrastructure can facilitate economic growth and enhance access to essential services.

Rural population figures are closely related to various other indicators. For example, the rural population is often correlated with levels of poverty, employment rates, and agricultural productivity. High rural populations may indicate a reliance on agriculture, while lower figures can signify urban migration patterns as people seek better opportunities. Furthermore, trends in rural population dynamics can offer insights into food security, as rural communities are often responsible for food production. This relationship highlights the need for integrated approaches when addressing issues of rural development and sustainability.

Several factors influence the rural population. Economic conditions play a significant role, where rural areas with diverse income opportunities may retain more residents. Conversely, economic stagnation can drive people to urban centers in search of better prospects. Environmental issues, such as land degradation and climate change, also pose threats to rural communities, potentially leading to displacement. Social factors like education and healthcare accessibility can greatly impact population retention or migration, as individuals may leave rural areas in pursuit of improved living conditions.

In light of these challenges, several strategies can be adopted to enhance rural population sustainability and resilience. Investing in education and healthcare services in rural communities can empower individuals and improve their quality of life. Providing access to technology and internet services can also revolutionize the way rural populations engage in economic activities, making them more competitive and innovative. Furthermore, promoting local entrepreneurship and supporting small-scale farmers can stimulate the rural economy, reducing the dependency on urban migration.

Innovative agricultural practices can also significantly contribute to rural development. By introducing sustainable practices and modern farming techniques, the productivity of rural lands can be enhanced while ensuring environmental sustainability. Policymakers can collaborate with NGOs and local leaders to create programs that address specific needs and challenges faced by rural populations.

Despite the importance of understanding rural populations, there are inherent flaws in the data collection and analysis processes. Many countries may lack comprehensive and up-to-date demographic data, leading to an underestimation or misrepresentation of the rural population size. The challenges of defining what constitutes a 'rural' area, particularly in developing nations, can also affect data accuracy. Moreover, urbanization trends can shift rapidly, making it difficult for statistical agencies to keep pace with the changing landscape.

In 2023, the top five countries with the largest rural populations include India, China, Pakistan, Indonesia, and Nigeria. India stands out with a staggering rural population of approximately 915 million, vastly overshadowing other nations. Similarly, China follows with around 499 million individuals living in rural areas. These statistics reflect not only the population size but also the cultural and economic significance of rural life in these nations. On the other hand, regions like Bermuda, the Cayman Islands, Gibraltar, Hong Kong SAR China, and Kuwait report a rural population of zero, indicating urban-centric development and population distribution in these areas.

Looking at historical data, the world’s rural population has seen a gradual decline relative to urban areas over the decades. From approximately 2 billion in 1960, the global rural population hit around 3.45 billion in 2023. This sustained growth indicates that although urbanization is a prominent trend, rural areas are still home to a significant and growing number of people. The data also reveals fluctuations over the years, emphasizing various socio-economic developments, policy changes, and global events that may influence population movements.

Understanding the dynamics of the rural population is vital as it provides valuable insights into the challenges and opportunities facing these communities. As nations grapple with urbanization and strive for sustainable development, recognizing the importance of rural populations in achieving a balanced socio-economic framework will be essential for future progress.

                    
# 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 = 'SP.RUR.TOTL'

# 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 <- 'SP.RUR.TOTL'

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