Pupil-teacher ratio, preprimary

Source: worldbank.org, 03.09.2025

Year: 2017

Flag Country Value Value change, % Rank
Albania Albania 17.5 -1.24% 46
Andorra Andorra 13.9 +1.46% 67
Armenia Armenia 8.39 -1.86% 100
Austria Austria 11.5 +3.51% 89
Burundi Burundi 32.1 -8.81% 10
Belgium Belgium 12.7 -1.52% 77
Burkina Faso Burkina Faso 17.6 +1.69% 44
Bulgaria Bulgaria 12.2 -0.591% 81
Bahrain Bahrain 13.8 -3.88% 70
Bahamas Bahamas 18.2 -19.9% 40
Bosnia & Herzegovina Bosnia & Herzegovina 14.5 63
Belarus Belarus 7.76 +1.63% 103
Belize Belize 16.4 -2.92% 52
Bolivia Bolivia 31.7 -3.12% 11
Brazil Brazil 16.5 -0.725% 50
Barbados Barbados 16.2 +3.55% 55
Brunei Brunei 16.2 +5.49% 54
Bhutan Bhutan 10.8 -13.1% 94
Switzerland Switzerland 11.7 -0.559% 86
Chile Chile 25.4 -3.46% 23
China China 18.1 -5.31% 42
Côte d’Ivoire Côte d’Ivoire 22.9 -0.15% 25
Cameroon Cameroon 20.6 -0.903% 30
Comoros Comoros 20.3 -21.6% 34
Cape Verde Cape Verde 18.1 -1.89% 41
Costa Rica Costa Rica 11.7 -1.6% 85
Cyprus Cyprus 14.4 -4.49% 64
Germany Germany 7.7 -1.48% 104
Djibouti Djibouti 16.4 -44.4% 51
Dominican Republic Dominican Republic 19.5 +2.94% 35
Ecuador Ecuador 20.4 -4.76% 31
Egypt Egypt 26.3 -2.34% 20
Eritrea Eritrea 29.1 +0.711% 13
Spain Spain 13.4 -1.13% 71
Finland Finland 11.1 -3.44% 92
United Kingdom United Kingdom 61.8 +219% 2
Ghana Ghana 29.1 -11.5% 14
Gibraltar Gibraltar 10.9 -50.7% 93
Gambia Gambia 34.7 +4.83% 5
Greece Greece 10.4 -2.67% 96
Grenada Grenada 12.2 +5.11% 80
Indonesia Indonesia 12.7 +1.38% 78
Italy Italy 11.6 -3.5% 87
Jamaica Jamaica 10.5 -2.17% 95
Jordan Jordan 17.9 +5.43% 43
Japan Japan 27.7 +1.39% 17
Cambodia Cambodia 34.4 +7.21% 6
South Korea South Korea 13 -1.67% 75
Kuwait Kuwait 8.73 -4.74% 99
Laos Laos 18.2 -0.205% 39
Lebanon Lebanon 15.6 +0.595% 57
Liberia Liberia 37.3 -0.977% 4
Liechtenstein Liechtenstein 7.58 -5.76% 105
Sri Lanka Sri Lanka 13.8 69
Lithuania Lithuania 9.67 +4.43% 98
Latvia Latvia 9.72 -0.13% 97
Macao SAR China Macao SAR China 14.7 -9.42% 62
Monaco Monaco 19.1 +2.51% 36
Moldova Moldova 13.3 -0.467% 72
Madagascar Madagascar 22.6 -3.45% 26
Maldives Maldives 15.5 -2.67% 58
Mexico Mexico 25 +0.212% 24
Mali Mali 20.3 +8.02% 33
Malta Malta 11.8 -2.28% 84
Myanmar (Burma) Myanmar (Burma) 19 +28.9% 38
Mongolia Mongolia 33.3 +1.07% 7
Mauritius Mauritius 12.3 -3.93% 79
Malaysia Malaysia 15.3 -6.94% 60
Namibia Namibia 37.6 +41.2% 3
Niger Niger 28.4 +31.8% 15
Netherlands Netherlands 15.9 +0.961% 56
Norway Norway 13.3 +29.1% 73
Nepal Nepal 20.4 -1.9% 32
New Zealand New Zealand 7.82 -4% 102
Oman Oman 22.6 -9.45% 27
Panama Panama 15.4 +2.34% 59
Peru Peru 19.1 +0.821% 37
Philippines Philippines 27.1 -19.5% 19
Poland Poland 13 -13% 76
Portugal Portugal 16.6 -2.38% 49
Palestinian Territories Palestinian Territories 16.9 -27.1% 48
Qatar Qatar 14.4 -1.01% 65
Romania Romania 15.2 -1.75% 61
Rwanda Rwanda 32.4 +2.12% 9
Saudi Arabia Saudi Arabia 11.3 +4.72% 91
Sudan Sudan 25.8 +1.91% 22
Senegal Senegal 22 +1.67% 29
Solomon Islands Solomon Islands 26 +7.44% 21
Sierra Leone Sierra Leone 13.8 -39% 68
El Salvador El Salvador 27.3 -15.7% 18
Serbia Serbia 11.9 -0.0674% 83
Suriname Suriname 27.7 +24.5% 16
Slovakia Slovakia 12 -1.95% 82
Sweden Sweden 5.52 -0.65% 106
Seychelles Seychelles 16.4 -1.94% 53
Togo Togo 29.2 -4.84% 12
Tajikistan Tajikistan 11.4 -11.6% 90
Timor-Leste Timor-Leste 33.2 +3.71% 8
Turkey Turkey 17.2 +1.16% 47
Tanzania Tanzania 114 +9.21% 1
Uganda Uganda 22 +2.98% 28
United States United States 14.3 +3.8% 66
Uzbekistan Uzbekistan 11.6 +6.53% 88
St. Vincent & Grenadines St. Vincent & Grenadines 7.88 +6.73% 101
Vietnam Vietnam 17.6 +2.61% 45
Samoa Samoa 13.2 +11.6% 74

The pupil-teacher ratio in preprimary education serves as a pivotal indicator of educational quality and equity. It reflects the number of students for every teacher in preprimary settings, influencing the learning environment and outcomes in early childhood education. The importance of this metric is multifaceted, as it impacts not only the direct interactions between teachers and students but also plays a significant role in shaping the educational experiences of young learners. A lower pupil-teacher ratio generally allows for more personalized attention, fostering better learning outcomes and emotional support for children in their formative years.

Internationally, as of 2019, the median pupil-teacher ratio for preprimary education stood at 19.98, suggesting that, on average, there is approximately one teacher per twenty students. This value can vary widely across different regions and countries, reflecting disparities in educational resources, policies, and societal values placed on early childhood education. The top-performing areas reported higher ratios, with Ghana leading at 29.95 pupils per teacher. This emphasizes significant challenges in the country's preprimary sector, pointing to a lack of sufficient qualified teachers to cater to the rising number of enrollees. Meanwhile, in Monaco and Nepal, the ratios were 19.98 and 18.61 respectively, underlining diverse educational contexts and system efficiencies.

On the other hand, the bottom five areas, including Nepal with 18.61 students per teacher and Monaco at 19.98, exhibit notable variations in their educational frameworks. Regarding world values, historical data indicates trends in pupil-teacher ratios since the early 1970s. A gradual decline can be observed from a ratio of 19.5 in 1973 to 17.45 in 2018, suggesting improvements in the global landscape for early childhood education. Nevertheless, the 2019 figure of 19.98 indicates a slight stabilization, highlighting the ongoing need for policies targeting better resource allocation and teacher training in this vital sector.

The relationship between pupil-teacher ratios and other educational indicators is of great significance. For example, improved pupil-teacher ratios are often correlated with better literacy rates and educational attainment levels among children. This relationship emphasizes the importance of investing in early childhood education, as quality and access to resources directly affect children's future educational journeys. Factors such as socio-economic status, urban versus rural divides, governmental education policies, and funding availability dramatically impact these ratios. In regions where education is prioritized in government budgets, lower pupil-teacher ratios tend to prevail, yielding better educational outcomes.

To address challenges posed by high pupil-teacher ratios, various strategies could be implemented. Governments and educational bodies must focus on hiring and training more qualified teachers to meet the growing demand in preprimary education. Incentives can be designed to attract teachers to rural and underserved areas, where ratios may be especially daunting. Additionally, implementing technology in classrooms can supplement teacher efforts, allowing educators to manage larger groups while maintaining educational quality. Another essential strategy is fostering community engagement in early childhood education, leading to increased awareness of the importance of preprimary education and collective advocacy for necessary resources.

Despite efforts to improve the pupil-teacher ratio, several flaws may persist within these strategies. For example, the immediate hiring of teachers can sometimes result in a compromise on qualifications, affecting educational quality. Moreover, while technology can support learning, an overreliance on it may detract from the essential human connections between teachers and students that underpin effective learning. Thus, maintaining a balance between innovative educational strategies and traditional teaching methods is crucial for fostering optimal learning environments.

In conclusion, the pupil-teacher ratio in preprimary education remains a vital indicator of educational quality worldwide. The importance of this metric is underscored by its influence on learning outcomes, teacher efficacy, and overall educational equity. While positive trends show improvements in global ratios over decades, challenges remain, particularly in low-resource settings. By addressing the factors that influence these ratios and implementing targeted strategies, educational policymakers can significantly enhance the quality of early childhood education, leading to benefiting both individual learners and society as a whole.

                    
# 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.PRE.ENRL.TC.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.PRE.ENRL.TC.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))