Government expenditure per student, secondary (% of GDP per capita)

Source: worldbank.org, 01.09.2025

Year: 2016

Flag Country Value Value change, % Rank
Afghanistan Afghanistan 12 +16.5% 67
Albania Albania 9.82 +44.8% 72
Andorra Andorra 13.6 -5.22% 64
Argentina Argentina 21.6 -5.61% 32
Australia Australia 15 -12.6% 58
Austria Austria 27.7 +1.57% 9
Burkina Faso Burkina Faso 19.9 +15.5% 43
Bangladesh Bangladesh 9.88 -5.13% 71
Bosnia & Herzegovina Bosnia & Herzegovina 43.5 1
Belize Belize 26.1 +0.407% 14
Barbados Barbados 28 +45.1% 8
Brunei Brunei 23.6 +133% 22
Chile Chile 18.5 +11.1% 48
Côte d’Ivoire Côte d’Ivoire 22.8 -5.57% 28
Colombia Colombia 15.6 -0.342% 54
Cape Verde Cape Verde 19.9 +6.55% 44
Costa Rica Costa Rica 24 -4.33% 19
Cyprus Cyprus 39.3 -0.252% 2
Czechia Czechia 22.3 -5.76% 30
Germany Germany 23 -0.183% 27
Djibouti Djibouti 0.728 -29.9% 77
Dominican Republic Dominican Republic 14.9 +4.55% 59
Ecuador Ecuador 5.29 +4.06% 74
Spain Spain 18.9 +2.06% 46
Estonia Estonia 21.2 -4.86% 36
Finland Finland 24.8 -4.07% 17
France France 26.3 -0.683% 13
United Kingdom United Kingdom 21.2 -8.11% 35
Greece Greece 23 -2.13% 26
Guatemala Guatemala 5.12 +1.08% 75
Hong Kong SAR China Hong Kong SAR China 21.3 +5.08% 33
Hungary Hungary 23.1 +8.89% 24
Ireland Ireland 15.9 -2.92% 52
Iran Iran 16.9 +17.5% 51
Iceland Iceland 19.4 -4.68% 45
Israel Israel 18.7 +0.0838% 47
Jamaica Jamaica 27.6 -3.99% 10
Japan Japan 24.1 +0.162% 18
Kazakhstan Kazakhstan 21.2 +10.7% 34
St. Kitts & Nevis St. Kitts & Nevis 17.6 +41.1% 50
South Korea South Korea 28.2 +96.1% 7
St. Lucia St. Lucia 24.9 -4.14% 16
Sri Lanka Sri Lanka 14.1 +124% 62
Lithuania Lithuania 17.9 +2.69% 49
Latvia Latvia 26.4 -6.51% 12
Monaco Monaco 4.95 -2.54% 76
Moldova Moldova 30.5 -7.14% 6
Mexico Mexico 14.4 -5.11% 60
Mali Mali 20.5 -11.3% 40
Mauritania Mauritania 14.2 -20.6% 61
Mauritius Mauritius 31.3 +2.13% 5
Malawi Malawi 24 -9.03% 20
Malaysia Malaysia 21.1 +5.4% 37
Niger Niger 20.6 -68.3% 39
Netherlands Netherlands 23.1 +1.69% 23
Norway Norway 26.8 +1.64% 11
New Zealand New Zealand 21.1 +1.3% 38
Oman Oman 35 +70.3% 4
Peru Peru 13.9 +0.336% 63
Poland Poland 22.6 +0.961% 29
Paraguay Paraguay 11.9 -3.16% 69
Romania Romania 15.2 -6.38% 56
Rwanda Rwanda 37.1 +19% 3
Senegal Senegal 11.4 -44.4% 70
Sierra Leone Sierra Leone 5.51 -36.4% 73
El Salvador El Salvador 15 +14.6% 57
South Sudan South Sudan 11.9 +71.3% 68
Slovakia Slovakia 20.1 -4.88% 42
Slovenia Slovenia 23 -3.99% 25
Sweden Sweden 23.8 +0.721% 21
Seychelles Seychelles 15.3 -7.67% 55
Turkey Turkey 13.5 +16.8% 65
Ukraine Ukraine 25.6 -1.08% 15
Uruguay Uruguay 15.9 +8.55% 53
United States United States 22.1 +2.1% 31
St. Vincent & Grenadines St. Vincent & Grenadines 20.4 -3.46% 41
Samoa Samoa 13 +41.8% 66

The indicator 'Government expenditure per student, secondary (% of GDP per capita)' is a critical metric in assessing how much of a nation's economic resources are allocated to secondary education. It reflects the government's commitment to education and illustrates the investment made in human capital development. This indicator helps gauge the quality and accessibility of education within and across nations, making it a vital tool for policymakers, educators, and researchers.

Understanding this indicator requires looking not just at the financial outlays but also the context in which they operate. The importance of government expenditure on secondary education is highlighted by its correlating relationships with various socio-economic indicators. For instance, a higher government spending percentage typically aligns with better educational outcomes, such as higher graduation rates and improved literacy levels. This has long-term implications for economic growth, as an educated workforce is essential for driving innovation, productivity, and competitiveness in an increasingly globalized economy.

The latest available data from 2018 shows a median expenditure of 18.85% of GDP per capita on secondary education. This figure indicates a significant investment in human resources by governments worldwide, although substantial disparities exist. Countries like Mauritius, Moldova, Lesotho, Jamaica, and Malaysia top the list with expenditures far above the median, demonstrating a pronounced commitment to educational funding. For instance, Mauritius allocates an impressive 31.32% of its GDP per capita to secondary education, while Malaysia, at 22.81%, indicates a considerable investment in shaping its youth for the future.

In contrast, the bottom five areas—Guatemala, Sri Lanka, Myanmar (Burma), Senegal, and Andorra—exhibit significantly lower expenditures. Guatemala's figure, at a mere 5.42%, raises crucial concerns about access and the quality of education. Such underinvestment can lead to dire consequences, including heightened poverty, social inequalities, and a workforce ill-equipped for the demands of the modern economy.

This stark contrast draws attention to various factors affecting government expenditure on education. Economic health is a primary determinant; wealthier nations are generally able to allocate more resources to education due to higher tax revenues and GDP levels. Conversely, developing countries often face budget constraints that limit their ability to fund educational initiatives adequately. Apart from economic conditions, political stability and governance also play vital roles. Countries with stable governments and strong institutions are more likely to prioritize education in their budgets than those plagued by unrest or ineffective governance.

Moreover, cultural and societal values influence government spending on education. In societies where education is considered a fundamental right and a pathway to prosperity, there tends to be a greater societal push for increased funding. Thus, advocacy and public demand can become pivotal in shaping education expenditures.

Strategies for improving government expenditure on secondary education could involve increasing public awareness about the returns on investment in education, advocating for reallocation of financial resources, and engaging in policy dialogues that prioritize educational funding. Additionally, international partnerships and support from global educational organizations can help strengthen the funding capabilities of nations struggling to invest in education adequately.

However, such expenditure strategies are not without flaws. Simply increasing funding does not guarantee improved educational outcomes. Issues such as inefficiency in resource allocation, lack of accountability, and corruption can impede the effectiveness of educational spending. Furthermore, without accompanying reforms in teacher training, curriculum development, and infrastructure improvements, merely increasing financial outlay may not translate into enhanced learning opportunities or outcomes.

The global values captured in the recent years underscore a broader trend in educational investments. Data points from 2011 and 2013 show expenditures at 20.68% and 20.08%, respectively, indicating a slight decline or stagnation in funding commitments over these years. This trend prompts questions about sustainability, particularly as educational needs evolve to meet the demands of modern economies and technological advancements.

In conclusion, evaluating 'Government expenditure per student, secondary (% of GDP per capita)' is vital not only for understanding educational investment levels but also for shaping policies that pursue equitable and quality education. While higher expenditures tend to correlate with better outcomes, it is essential to approach educational finance holistically, addressing underlying systemic issues that might impede the effectiveness of spending. Thus, ongoing dialogue among stakeholders is crucial for fostering an educational environment conducive to learning, equality, and economic vitality.

                    
# 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.XPD.SECO.PC.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.XPD.SECO.PC.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))