Over-age students, primary (% of enrollment)

Source: worldbank.org, 03.09.2025

Year: 2017

Flag Country Value Value change, % Rank
Albania Albania 6.14 -6.07% 65
Andorra Andorra 7.62 -5.58% 55
United Arab Emirates United Arab Emirates 4.48 +5.35% 80
Argentina Argentina 6.44 -12% 64
Armenia Armenia 2.27 -5.76% 107
Antigua & Barbuda Antigua & Barbuda 4.13 -5.79% 83
Australia Australia 3.79 +0.832% 85
Austria Austria 13.5 +2.67% 31
Azerbaijan Azerbaijan 8.86 +19.9% 47
Burundi Burundi 17.2 -38.9% 15
Belgium Belgium 4.81 +2.21% 74
Benin Benin 9.24 +20.1% 45
Burkina Faso Burkina Faso 15.8 +3.62% 22
Bulgaria Bulgaria 1.57 -15.8% 121
Bahrain Bahrain 2.81 -4.12% 100
Bosnia & Herzegovina Bosnia & Herzegovina 3.79 +9.7% 86
Belarus Belarus 5.26 +6.36% 71
Belize Belize 8.82 +0.292% 48
Bolivia Bolivia 6.78 -14.9% 61
Brazil Brazil 14.5 +3.32% 26
Barbados Barbados 1.86 +4.74% 113
Brunei Brunei 4.2 +5.6% 82
Bhutan Bhutan 13.1 -6.84% 32
Canada Canada 0 146
Switzerland Switzerland 1.39 -6.5% 124
Chile Chile 6.56 -4.49% 63
Côte d’Ivoire Côte d’Ivoire 10.4 -1.55% 43
Cameroon Cameroon 12 -15.2% 36
Colombia Colombia 15.3 -7.17% 24
Comoros Comoros 16.6 -22% 19
Costa Rica Costa Rica 9.17 -24.2% 46
Cuba Cuba 2.86 -9.64% 97
Cyprus Cyprus 1.7 +1.6% 117
Czechia Czechia 10.5 +1.13% 40
Germany Germany 11.8 -0.503% 38
Djibouti Djibouti 13.8 -13.5% 30
Denmark Denmark 2.4 -9.62% 106
Dominican Republic Dominican Republic 12.5 -9.84% 35
Algeria Algeria 6.88 +1.83% 60
Ecuador Ecuador 3.27 -21.4% 92
Egypt Egypt 2.66 -8.62% 102
Eritrea Eritrea 24.3 +14.1% 7
Spain Spain 5.25 +1.67% 72
Estonia Estonia 3.44 -2.13% 89
Finland Finland 1.3 +5.09% 127
France France 2.91 -9.61% 95
United Kingdom United Kingdom 1.11 -0.946% 128
Georgia Georgia 1.87 -23.1% 112
Ghana Ghana 16.8 +1.24% 17
Gambia Gambia 16.6 +1.51% 20
Greece Greece 1.34 -0.457% 125
Grenada Grenada 4.74 -1.68% 77
Guatemala Guatemala 11 -8.5% 39
Hong Kong SAR China Hong Kong SAR China 2.5 +0.355% 103
Honduras Honduras 11.9 -6.36% 37
Croatia Croatia 0.86 +15.7% 134
Hungary Hungary 2.81 +0.366% 99
Indonesia Indonesia 1.34 -0.426% 126
Ireland Ireland 0.554 +1.02% 138
Iran Iran 7.66 -13.6% 54
Iceland Iceland 0.0344 -23.4% 145
Israel Israel 2.8 +6.75% 101
Italy Italy 4.63 +412% 78
Jamaica Jamaica 5.52 -1.29% 69
Jordan Jordan 0.767 -65.3% 136
Japan Japan 0 146
Kazakhstan Kazakhstan 0.314 -73.4% 142
Kyrgyzstan Kyrgyzstan 1.01 -27.9% 129
Cambodia Cambodia 14.4 +0.884% 27
Kiribati Kiribati 3.41 -34.3% 91
South Korea South Korea 0.757 -2.74% 137
Kuwait Kuwait 2.95 +6.83% 94
Laos Laos 12.7 -10.7% 34
Lebanon Lebanon 6.91 -7.99% 59
Liberia Liberia 47 -21.9% 1
St. Lucia St. Lucia 2.88 +2.88% 96
Liechtenstein Liechtenstein 1.8 +5.51% 115
Sri Lanka Sri Lanka 0.937 +3.21% 132
Lesotho Lesotho 21.1 -3.03% 8
Lithuania Lithuania 0.943 -1.12% 130
Luxembourg Luxembourg 3.55 +3.98% 88
Latvia Latvia 2.44 -2.27% 104
Macao SAR China Macao SAR China 4.58 -3.1% 79
Morocco Morocco 13.8 -3.29% 29
Monaco Monaco 4.76 +180% 76
Moldova Moldova 1.69 +1.51% 119
Maldives Maldives 1.58 -41.1% 120
Mexico Mexico 2.26 -18.5% 108
North Macedonia North Macedonia 1.48 +76.4% 122
Mali Mali 7.37 -36.3% 57
Malta Malta 0.857 -6.22% 135
Myanmar (Burma) Myanmar (Burma) 10.4 +272% 42
Montenegro Montenegro 2.18 +1.61% 109
Mongolia Mongolia 2.41 -18.8% 105
Mozambique Mozambique 16.6 +1.11% 18
Mauritania Mauritania 19.5 +4.99% 10
Mauritius Mauritius 4.3 -19.3% 81
Malawi Malawi 19.7 +1.52% 9
Malaysia Malaysia 0.243 -2.01% 143
Namibia Namibia 15.6 -8.79% 23
Niger Niger 7.86 -2.98% 53
Netherlands Netherlands 5.36 -7.21% 70
Norway Norway 0 146
Nepal Nepal 28.5 +2.91% 3
New Zealand New Zealand 0.386 +7.56% 141
Oman Oman 1.85 -19.4% 114
Pakistan Pakistan 26.4 +0.00004% 5
Panama Panama 8.56 -4.2% 50
Peru Peru 6.07 -4.89% 66
Philippines Philippines 9.82 -28.6% 44
Poland Poland 0.941 -22.5% 131
Portugal Portugal 8.08 -4.67% 51
Palestinian Territories Palestinian Territories 1.69 +18.3% 118
Qatar Qatar 2.15 -4.81% 110
Romania Romania 3.43 +6.46% 90
Russia Russia 3.23 +47,402% 93
Rwanda Rwanda 26.3 -1.37% 6
Saudi Arabia Saudi Arabia 3.93 -46.1% 84
Sudan Sudan 17.9 -6.02% 13
Senegal Senegal 10.4 -7.78% 41
Singapore Singapore 0.53 -1.56% 139
Solomon Islands Solomon Islands 36.3 -0.955% 2
Sierra Leone Sierra Leone 8.61 -11.7% 49
El Salvador El Salvador 14.5 +0.511% 25
Serbia Serbia 0.884 +10.6% 133
São Tomé & Príncipe São Tomé & Príncipe 12.8 -22.1% 33
Suriname Suriname 17.2 -3.65% 16
Slovakia Slovakia 15.8 -1.11% 21
Slovenia Slovenia 1.77 +9.98% 116
Sweden Sweden 18.9 +3.8% 11
Eswatini Eswatini 28.3 +2.26% 4
Seychelles Seychelles 3.65 -0.633% 87
Togo Togo 18.2 -4.64% 12
Tajikistan Tajikistan 0.0754 -21.2% 144
Timor-Leste Timor-Leste 17.4 -4.52% 14
Tunisia Tunisia 4.77 +9.55% 75
Turkey Turkey 2.03 -39.2% 111
Ukraine Ukraine 7.94 +12.2% 52
Uruguay Uruguay 6.63 -4.21% 62
United States United States 5.81 +4.39% 67
Uzbekistan Uzbekistan 0.449 -50.5% 140
St. Vincent & Grenadines St. Vincent & Grenadines 2.84 +8.51% 98
Venezuela Venezuela 7.57 -2.02% 56
British Virgin Islands British Virgin Islands 4.86 +6.48% 73
Vietnam Vietnam 1.41 -14.6% 123
Samoa Samoa 7.07 -15.3% 58
South Africa South Africa 5.79 +68% 68
Zambia Zambia 14 +2.77% 28

The indicator of "Over-age students, primary (% of enrollment)" serves as a critical metric for assessing educational systems worldwide. It represents the percentage of students who are above the typical age for their grade level in primary education. A high percentage of over-age students often signifies irregularities within a country's education system, such as late enrollment, high dropout rates, or inefficient schooling structures. Despite its simplicity, this indicator encapsulates complex underlying issues affecting educational access and quality, highlighting the challenges many countries face in achieving educational equity.

Understanding the importance of this indicator is essential for policymakers and educators alike. High rates of over-age students typically correlate with systemic inefficiencies; these can include inadequate early childhood education, socio-economic barriers preventing timely enrollment, or societal norms that prioritize work over schooling. In countries where compounding factors perpetuate educational challenges, these over-age percentages can indicate broader societal issues, such as poverty and insufficient investment in human capital. Thus, monitoring and addressing this indicator can lead to substantial improvements in the quality and accessibility of education.

When considering the relationships to other educational indicators, there are notable correlations worth examining. For instance, a high percentage of over-age students is often linked to high dropout rates, as students who are older than their peers are more likely to disengage from the education system. This dropout tendency contributes to lower overall educational attainment and can hinder economic development. Additionally, areas with high instances of over-age students may also exhibit low literacy rates, as the very structure of their educational system is failing to meet the needs of all demographics.

Several factors influence the rates of over-age students in primary education. Socio-economic factors are a primary influence; families that struggle financially may be unable to send their children to school at the appropriate age, often requiring them to work instead. Cultural beliefs and practices can also play a significant role. In some regions, the importance placed on education might not align with traditional practices or labor expectations. Furthermore, structural issues within the educational system, such as insufficient infrastructure, undertrained teachers, and inadequate resources, can prolong students' time in primary education, leading to higher rates of over-age enrollment.

The data from 2019 presents a poignant picture of how over-age student rates vary across diverse geographical regions. With a median value of 6.52%, it highlights that a significant portion of students worldwide face educational delays. The top area, Nepal, with a staggering 27.96% of over-age students enrolled in primary education, starkly contrasts with Kazakhstan and Monaco, where the rates dip as low as 0.66% and 1.76% respectively. This disparity signifies not just differences in educational access, but also points to profound socio-economic and cultural divides.

On the contrary, the bottom-ranked areas, Kazakhstan and Monaco, illustrate a model where educational structures function more effectively. The disparity in Nepal's over-age students compared to Monaco — which sees just 1.76% — comes as a reminder of the resources that are effectively allocated in wealthier nations versus those in developing countries. Djibouti, which has an over-age ratio of 11.29%, finds itself in a challenging position as well, emphasizing the necessity for strategic educational reforms.

Addressing the issues stemming from high rates of over-age students requires multifaceted strategies. First and foremost, improving access to early childhood education can ensure that children are better prepared to enter primary education on time. Community engagement initiatives that educate families on the importance of timely enrollment and traditional schooling approaches can also help combat cultural barriers. Furthermore, enhancing the quality of primary education—by investing in teacher training, providing adequate learning materials, and optimizing school infrastructure—can help retain students and lessen the likelihood of over-age enrollment.

Another approach is to implement flexible schooling systems that cater to diverse student needs. For instance, alternative schooling options that allow for part-time attendance, relevant vocational training, or evening classes can be advantageous for older students who may require additional support. Providing financial assistance or scholarships to disadvantaged families may also enable timely enrollment of children into primary education, thereby directly reducing the over-age student population.

While strategies abound, it is also essential to acknowledge flaws in existing systems. Often, educational reforms lack sustained commitment or adequate funding, leading to temporary fixes rather than long-lasting solutions. Moreover, a neglect of cultural sensitivities may render initiatives ineffective due to their inability to resonate with local communities. As such, it is crucial for policymakers to engage local stakeholders to create adaptive programs that work within the context of each region’s unique challenges.

In conclusion, the indicator of over-age students in primary education remains a valuable metric for assessing the efficiency and accessibility of educational systems globally. The stark differences in rates across countries illustrate a pressing need for targeted interventions that address both the immediate and underlying factors contributing to this phenomenon. Through comprehensive strategies that consider socio-economic contexts and cultural nuances, there lies potential for substantial improvement, paving the way for enhanced educational equity for future generations.

                    
# 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 = 'SE.PRM.OENR.ZS'

# 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 <- 'SE.PRM.OENR.ZS'

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