School enrollment, primary, female (% net)

Source: worldbank.org, 03.09.2025

Year: 2017

Flag Country Value Value change, % Rank
Armenia Armenia 91.9 -0.633% 41
Antigua & Barbuda Antigua & Barbuda 94.8 +0.785% 27
Australia Australia 96.7 -1.52% 14
Azerbaijan Azerbaijan 94.7 +3.29% 29
Burundi Burundi 96.4 -0.0684% 16
Belgium Belgium 98.9 +0.639% 3
Burkina Faso Burkina Faso 75.4 +1.87% 75
Bulgaria Bulgaria 86.3 -1.09% 56
Bolivia Bolivia 90.6 +2.38% 44
Barbados Barbados 94.2 -1.79% 33
Bhutan Bhutan 87.6 -0.523% 51
Chile Chile 94.8 +0.751% 28
Côte d’Ivoire Côte d’Ivoire 81.9 +3.67% 67
Cameroon Cameroon 88.7 -1.7% 47
Colombia Colombia 93.4 +0.228% 36
Comoros Comoros 78.9 -0.351% 74
Cape Verde Cape Verde 92 +0.441% 40
Costa Rica Costa Rica 96.3 -1.96% 17
Cuba Cuba 95.4 +1.12% 20
Cyprus Cyprus 97.9 +0.854% 6
Djibouti Djibouti 62 +4.24% 76
Dominican Republic Dominican Republic 92.7 -0.294% 39
Eritrea Eritrea 49.3 -13.2% 81
Spain Spain 97.6 -1.52% 7
Estonia Estonia 94.2 +0.17% 32
Finland Finland 98.8 -0.399% 4
United Kingdom United Kingdom 99.3 -0.219% 1
Ghana Ghana 85.8 -1.55% 59
Gambia Gambia 79.8 +3.49% 71
Greece Greece 98.5 +0.543% 5
Guatemala Guatemala 85.6 +1.21% 60
Honduras Honduras 80.9 +0.618% 68
Hungary Hungary 90.1 -0.794% 46
Indonesia Indonesia 91.8 +1.6% 42
Italy Italy 95.4 -0.411% 21
Jamaica Jamaica 82.7 -2.03% 64
Jordan Jordan 79.5 +4.33% 73
Cambodia Cambodia 90.3 -2.6% 45
South Korea South Korea 97.2 +0.358% 10
Kuwait Kuwait 87.1 -5.5% 54
Laos Laos 91.7 -1.3% 43
Liberia Liberia 44.4 +18.9% 82
St. Lucia St. Lucia 95.2 +1.28% 24
Lesotho Lesotho 93.4 +2.54% 35
Latvia Latvia 96.8 +0.344% 13
Macao SAR China Macao SAR China 96.9 -0.0904% 12
Morocco Morocco 97 +2.44% 11
Moldova Moldova 86 -0.314% 57
Maldives Maldives 96.4 -0.561% 15
North Macedonia North Macedonia 94.9 +3.21% 26
Mali Mali 57.7 +8.2% 80
Montenegro Montenegro 96.1 +3.16% 18
Mozambique Mozambique 88.2 -0.564% 48
Mauritania Mauritania 79.9 +6.62% 70
Niger Niger 60.2 +3.19% 77
Netherlands Netherlands 99.1 +1.29% 2
Pakistan Pakistan 59.8 -0.209% 78
Panama Panama 85.9 -1.36% 58
Philippines Philippines 93.7 -1.09% 34
Poland Poland 95.6 -0.418% 19
Portugal Portugal 97.2 +0.735% 9
Palestinian Territories Palestinian Territories 95.2 +0.941% 25
Qatar Qatar 93.3 +0.666% 37
Romania Romania 82 -2.25% 66
Rwanda Rwanda 97.4 -2.1% 8
Saudi Arabia Saudi Arabia 95.3 -0.349% 22
Sudan Sudan 58.9 -4.99% 79
Senegal Senegal 79.6 +3.02% 72
El Salvador El Salvador 80.6 -5.04% 69
Serbia Serbia 95.2 -0.566% 23
São Tomé & Príncipe São Tomé & Príncipe 93 +6.98% 38
Suriname Suriname 88 -3.2% 50
Slovakia Slovakia 84.1 +1.36% 63
Eswatini Eswatini 82.4 -1.49% 65
Togo Togo 88 +1.35% 49
Timor-Leste Timor-Leste 94.6 +1.78% 30
Turkey Turkey 87.2 -6.9% 53
Tanzania Tanzania 85.2 -0.233% 61
United States United States 94.6 -0.294% 31
Venezuela Venezuela 87.2 -1.77% 52
South Africa South Africa 86.7 -2.42% 55
Zambia Zambia 84.9 -2.82% 62

The indicator "School enrollment, primary, female (% net)" is a critical measure of educational access for girls at the primary level across various regions. This metric reflects the percentage of girls who are enrolled in primary school compared to the total number of eligible girls in a specific age range. The importance of this indicator lies in its direct correlation to gender equality in education and the associated social and economic benefits that arise from educating girls.

Globally, school enrollment for girls has seen a substantial increase over the decades. From a net enrollment rate of just over 64% in 1970, the rate climbed significantly, reaching 88.22% in 2018. This positive trend indicates an increasing recognition of the value of girls’ education, though disparities still exist among different countries and regions. For instance, while the latest available data for 2019 shows a global median value of 76.54%, this number masks significant variability in enrollment rates, highlighting the need for focused policy interventions.

Examining the data from the top five areas, we see that Ghana leads with an impressive rate of 86.61%. This high enrollment reflects Ghana’s commitment to improving educational access for girls, possibly driven by initiatives aimed at providing free basic education and reducing barriers such as school fees or transportation challenges. On the other hand, the lowest rates of female primary school enrollment arise in countries like Djibouti, with figures hovering around 66.48%. This stark contrast between Ghana and Djibouti emphasizes the different socio-economic and cultural factors at play.

Enrollment rates can be influenced by a variety of factors including socio-economic conditions, cultural beliefs, and governmental policies. In regions where poverty is prevalent, families might prioritize education for boys over girls, viewing girls' education as less essential. Cultural norms may also impose constraints on girls’ mobility, thereby limiting their ability to attend school. Additionally, factors such as distance to schools, lack of sanitary facilities, and safety concerns during commutes can significantly impact girls' attendance. Thus, even with policies promoting education, hurdles still exist that prevent the full realization of educational access for all.

Strategies to improve female primary school enrollment must be multi-faceted. Governments, non-governmental organizations, and local communities should collaborate to create a supportive environment for girls’ education. Effective strategies may include providing financial incentives such as scholarship programs for families who enroll their daughters in school. Building more schools in remote areas, ensuring safe transportation facilities, and training teachers to handle gender-sensitive issues could also help boost enrollment rates. In addition, community awareness campaigns focusing on the value of girls' education can alter entrenched cultural perceptions that hinder female enrollment.

Despite these efforts, flaws in implementation remain a challenge. For example, financial incentives alone may not be enough if there are systemic issues like inadequate school infrastructure or a lack of trained female teachers. Ensuring quality education and a safe learning environment is paramount, as the mere act of enrolling a girl in school does not guarantee her continued attendance or her academic success. Furthermore, periodic assessments of policies and strategies should be conducted to measure their effectiveness and make necessary adjustments based on data and localized needs.

The world values dataset also illustrates a slow yet impressive rise in net enrollment over the years. For example, from 1970 through to 2018, there was a consistent upward trajectory characterized by slight fluctuations. However, the stagnation beyond a certain percentage is concerning. This could indicate that while initial efforts to increase enrollment were successful, they now require renewed focus and innovation to tackle the obstacles that remain.

In conclusion, achieving and maintaining high rates of female primary school enrollment is vital not only for fostering gender equality but also for promoting broader societal and economic development. While areas like Ghana show promising results, other regions, especially those lagging behind like Djibouti, highlight both the challenges that remain and the importance of targeted interventions. By understanding the factors that influence school enrollment and implementing comprehensive strategies that address these challenges, we can work toward a future where all girls have access to quality education.

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

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

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