School enrollment, secondary, male (% net)

Source: worldbank.org, 03.09.2025

Year: 2018

Flag Country Value Value change, % Rank
Afghanistan Afghanistan 62.9 +2.96% 39
Albania Albania 84.3 -0.863% 17
Antigua & Barbuda Antigua & Barbuda 87.9 -1.06% 12
Azerbaijan Azerbaijan 88.9 10
Burundi Burundi 24 -4.73% 62
Burkina Faso Burkina Faso 30.3 +4.76% 58
Bangladesh Bangladesh 61.1 +3.81% 44
Bahrain Bahrain 87 -3.84% 14
Bahamas Bahamas 59.9 -6.12% 46
Belarus Belarus 95.1 -0.758% 5
Belize Belize 69 +1.42% 34
Bolivia Bolivia 76.2 +0.485% 29
Barbados Barbados 90.6 -8.12% 8
Brunei Brunei 81.3 -1.49% 23
Bhutan Bhutan 64.1 +4.16% 38
Côte d’Ivoire Côte d’Ivoire 45.3 +4.01% 50
Colombia Colombia 74.9 +1.3% 30
Comoros Comoros 49.1 +19.1% 49
Cape Verde Cape Verde 66.4 -1.6% 36
Costa Rica Costa Rica 80.7 +0.907% 25
Cuba Cuba 81.8 -0.367% 21
Dominican Republic Dominican Republic 66.8 +0.47% 35
Ecuador Ecuador 83.4 -0.982% 19
Egypt Egypt 82.4 +1.21% 20
Eritrea Eritrea 42.8 +1.31% 52
Georgia Georgia 95.2 +1.81% 4
Ghana Ghana 57.8 +4.87% 48
Guatemala Guatemala 44.5 +0.0157% 51
Hong Kong SAR China Hong Kong SAR China 95.8 +2.66% 3
Indonesia Indonesia 77.6 +3.13% 27
Jamaica Jamaica 71.7 +2.15% 31
Jordan Jordan 61.7 +1.15% 41
Kyrgyzstan Kyrgyzstan 84.6 +1.51% 15
Laos Laos 60.7 -0.48% 45
St. Lucia St. Lucia 80.9 +1.44% 24
Sri Lanka Sri Lanka 89.8 +2.47% 9
Macao SAR China Macao SAR China 84.6 +2.39% 16
Morocco Morocco 64.5 +1.17% 37
Moldova Moldova 78.3 +0.481% 26
Madagascar Madagascar 28.7 +2.55% 60
Mali Mali 33 +1.5% 56
Myanmar (Burma) Myanmar (Burma) 61.5 +7.44% 42
Montenegro Montenegro 88.5 -0.28% 11
Mauritania Mauritania 30.2 +8.55% 59
Mauritius Mauritius 81.7 +0.19% 22
Malawi Malawi 33.7 +0.00911% 55
Malaysia Malaysia 69.2 -3.06% 33
Oman Oman 99.3 +3.7% 1
Pakistan Pakistan 40.4 +3.73% 54
Peru Peru 90.9 +5.18% 7
Palestinian Territories Palestinian Territories 83.4 +0.0429% 18
Rwanda Rwanda 32.9 +27.4% 57
Saudi Arabia Saudi Arabia 98.5 +6.99% 2
Sierra Leone Sierra Leone 42.5 +10.4% 53
El Salvador El Salvador 61.1 +2.66% 43
San Marino San Marino 70.2 +60.8% 32
Serbia Serbia 91.6 -0.42% 6
Seychelles Seychelles 77.6 +3.47% 28
Timor-Leste Timor-Leste 58.6 +3.41% 47
Tuvalu Tuvalu 62.5 +16.1% 40
Tanzania Tanzania 25.8 +6.98% 61
St. Vincent & Grenadines St. Vincent & Grenadines 87.4 -1.57% 13

The indicator "School enrollment, secondary, male (% net)" provides critical insights into the educational landscape specifically for male students at the secondary school level. This metric captures the percentage of male students who are enrolled in secondary education as a share of the population of the appropriate age group in a given region, presenting a net figure after accounting for students who may have repeated grades or are enrolled in multiple schools. This indicator is essential for assessing gender equity in education, as it illuminates the extent to which secondary education is being accessed by boys, a key step in ensuring educational parity.

The importance of monitoring secondary school enrollment among males cannot be overstated. Education is one of the most powerful tools for social and economic development. Higher enrollment rates correlate with better job prospects, improved health outcomes, and the ability to contribute to society effectively. When male students are successfully enrolled in secondary education, it increases their chances of lifelong learning, paving the way for a more skilled workforce. This not only enhances individual life trajectories but also promotes broader social benefits such as economic growth, reduced poverty, and improved civic engagement.

School enrollment rates relate closely to various other indicators, including literacy rates, economic conditions, and health statistics. For instance, higher secondary enrollment often coincides with higher literacy rates, as more children staying in school contributes to a society's overall educational attainment. Economic factors, such as income levels and employment opportunities for families, also significantly impact enrollment rates. When families face economic hardships, educational prospects tend to diminish, leading to lower enrollments. Health conditions, such as the prevalence of diseases affecting children's attendance in school, and socio-cultural aspects, like traditional views on male education, also play a crucial role in determining enrollment figures.

Several factors can affect school enrollment, particularly among males. Economic barriers are one of the most significant issues, as families may prioritize immediate financial needs over educational expenses. Geographic barriers also come into play; in rural areas, access to quality secondary education may be limited, affecting enrollment rates. Additionally, social factors, including early marriage or societal expectations regarding male roles, can dissuade boys from pursuing education. Government policies and investment in the education sector also significantly impact these rates; countries that allocate resources towards building schools, training educators, and providing financial aid typically see better enrollment ratios.

To improve secondary school enrollment for males, numerous strategies can be implemented. Governments could enhance financial assistance programs for families to ensure that education remains affordable. Strengthening public awareness campaigns that highlight the importance of education for males can also shift cultural perceptions. Increased investment in school infrastructure, especially in under-served areas, can improve access and make education more appealing to families. Moreover, fostering partnerships between schools and communities can help address barriers that boys face, such as transportation issues or the need for flexible curricula that accommodates working students.

However, there are flaws in using the indicator of secondary school enrollment for males as a solitary measure of educational success. First, it does not account for quality. High enrollment without corresponding educational quality could lead to poor learning outcomes and, consequently, low value in the job market. Additionally, while focusing on male enrollment might draw attention to gender disparities, it can lead to neglect of female educational needs. Striking a balance in promoting both genders in education is therefore crucial for a well-rounded approach to tackling educational disparities.

Analyzing the data specific to school enrollment for males unveils different narratives. In 2019, the median value of secondary school enrollment for males worldwide stood at 58.79%. Such a figure is relatively low and underscores the challenges in achieving universal secondary education. The top areas highlighted in terms of enrollment included Nepal with a percentage of 60.94%, alongside Ghana, noted to have 56.63%. Interestingly, these same countries appeared in the bottom five, suggesting that variations in different regions can occur; Nepal’s figure is modestly higher than Ghana’s but still reveals the potential for improvement within both nations.

Reviewing the historical context of school enrollment figures illustrates progress but also persistent gaps. From 1998 to 2018, the global enrollment for secondary male students climbed from 56.14% to 66.28%. While this upward trend indicates an overall improvement, the fact remains that a significant portion of the male population continues to be unenrolled in education, reflecting substantial work ahead. This gradual increase in numbers showcases both the incremental progress and the systemic challenges that persist across various regions.

In conclusion, while the "School enrollment, secondary, male (% net)" indicator is critical for understanding educational access, it must be viewed within a broader spectrum of educational metrics. Understanding the multifaceted nature of education challenges, societal dynamics, and economic factors can guide effective strategies aimed at improving educational access for boys while ensuring an inclusive approach that considers the needs of all genders. Progress is evident, yet the journey towards achieving equitable education for every child, regardless of gender, remains a pivotal global objective.

                    
# 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.SEC.NENR.MA'

# 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.SEC.NENR.MA'

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