download.file(“https://hdr.undp.org/sites/default/files/2023-24_HDR/HDR23-24_Composite_indices_complete_time_series.csv”, “HDI.csv”)
HDI <- read.csv("HDI.csv")
library(goalie)
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.4 ✔ readr 2.1.5
## ✔ forcats 1.0.0 ✔ stringr 1.5.1
## ✔ ggplot2 3.5.1 ✔ tibble 3.2.1
## ✔ lubridate 1.9.3 ✔ tidyr 1.3.1
## ✔ purrr 1.0.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
relevant_HDI <- HDI[,c("country","hdicode","mys_m_2022", "mys_f_2022", "eys_m_2022", "eys_f_2022", "gni_pc_f_2022", "gni_pc_m_2022", "pop_total_2022")]
Education is widely regarded as a vital human right and a major driver of social and economic progress. However, discrepancies in educational access and attainment exist, particularly in low-income countries where poverty, gender inequality, and insufficient infrastructure impede educational chances for millions of children and teenagers. To address these difficulties and promote equitable and sustainable development, it is critical to study important measures of educational attainment, such as anticipated and mean years of schooling, with a special emphasis on gender differences.
Expected years of schooling offer a forward-looking perspective by determining the average number of years of education that youngsters might anticipate receiving. This statistic is an important indication of access to education and future human capital development, providing information about the educational options accessible to younger generations. Expected years of schooling are often calculated using demographic predictions and educational enrollment rates, offering an estimate of a population’s educational trajectory. By evaluating projected years of schooling, researchers may discover inequities in educational access and argue for policies and initiatives that guarantee all children have the chance to reach their full educational potential.
In contrast, mean years of schooling provide a retroactive picture of a population’s average level of educational achievement. This indicator accounts for all people’ cumulative years of schooling, offering insights into the broader educational environment and its long-term influence on social and economic growth. Surveys, censuses, and other data gathering activities that record people’ educational experiences, both official and informal, are used to calculate mean years of schooling. Researchers can use mean years of schooling to measure progress toward educational goals, highlight discrepancies across demographic groups, and influence initiatives to enhance access to and quality of education in low-development nations.
In addition to analysing mean years of schooling, examining the relationship between Gross National Income (GNI) per capita and mean years of schooling provides valuable insights into how economic factors influence educational attainment. A scatterplot analysis of GNI per capita versus mean years of schooling can reveal patterns and correlations that highlight the impact of economic development on education. By understanding this relationship, policymakers and educators can better address the barriers to education in low-income countries. Overall, the analysis of mean years of schooling and its correlation with GNI per capita reveals complex insights into gender dynamics in educational systems. Gender gaps in education remain a prevalent concern, limiting the potential of millions of people, particularly girls and women, in low-development nations. The data for this study were gathered from the UN Human Development Report and other related databases, providing a comprehensive and credible source of information on educational indicators globally.
By focusing on mean years of schooling and its economic determinants, this study aims to shed light on the educational disparities faced by low HDI countries and emphasise the need for targeted policies that address gender inequalities and promote sustainable educational development.
relevant_HDI[,c(-1,-2)]<-lapply(relevant_HDI[,c(-1,-2)], function(x)round(as.numeric(as.character(x)),1))
low_hdi <- filter(relevant_HDI, hdicode == "Low")[,-2]
If we want to concentrate on the mean years of schooling (both male and female) for this specific population, we should filter accordingly:
expected_years_data <- filter(low_hdi[,c(-2,-3)],!is.na(eys_m_2022)&!is.na(eys_f_2022))
mean_years_data <- filter(low_hdi[,c(-4,-5)],!is.na(mys_f_2022)&!is.na(mys_m_2022))
gni_data <- filter(low_hdi,!is.na(gni_pc_f_2022)&!is.na(gni_pc_m_2022)&!is.na(eys_m_2022)&!is.na(eys_f_2022)&!is.na(pop_total_2022))
library(rworldmap)
## Lade nötiges Paket: sp
## ### Welcome to rworldmap ###
## For a short introduction type : vignette('rworldmap')
mean_years_data_merged <- mean_years_data %>%
mutate(
mean_eys = (mys_m_2022 + mys_f_2022) / 2
)
mean_years_data_female <- joinCountryData2Map(mean_years_data_merged, joinCode = "NAME", nameJoinColumn="country")
## 31 codes from your data successfully matched countries in the map
## 2 codes from your data failed to match with a country code in the map
## 212 codes from the map weren't represented in your data
mapWorld_female<-mapCountryData(mean_years_data_female,nameColumnToPlot="mys_f_2022",mapTitle="Mean Years of Schooling", ylim=c(-35, 37), xlim=c(30, 32))
The map provides a detailed visual representation of the mean years of schooling across various countries, primarily focusing on Africa, with additional data from some parts of the Middle East and Asia. The color gradient ranges from light yellow to dark red, signifying an increase in the mean years of schooling from 0.9 to 8.2 years. This gradient allows for a quick visual comparison of educational attainment across the regions. In Central and Western Africa, countries such as Niger, Chad, and Mali are depicted in light yellow. These nations have some of the lowest average years of schooling, highlighting significant educational challenges. This region is characterized by widespread poverty, limited access to educational resources, and in some cases, political instability, all contributing to low educational attainment. East Africa presents a slightly different picture, with countries like Somalia shown in darker shades. While still facing educational challenges, the mean years of schooling here are relatively higher compared to their central and western counterparts. This variation may be attributed to different governmental policies, international aid, and varying levels of conflict and stability in these regions. Northern African countries like Sudan exhibit a range of colors from yellow to darker shades, indicating a moderate level of educational attainment. This region benefits from relatively better educational infrastructure and more stable governance compared to sub-Saharan Africa, though significant disparities still exist within and between countries. Southern Africa, including nations like Madagascar and Mozambique, is shown in orange. These countries have higher average years of schooling than most of Central and Western Africa, but still fall short of the highest levels of educational attainment. Efforts to improve education in these regions are ongoing, but challenges such as economic constraints and rural-urban disparities persist. The map also includes countries from the Middle East and Asia, such as Yemen and Afghanistan. Afghanistan, shown in dark red, stands out with the highest mean years of schooling in this map, reflecting significant improvements in educational access over recent years, despite ongoing challenges. This map underscores the vast educational disparities across different regions, with some countries lagging far behind in terms of average years of schooling. It highlights areas with critical educational deficits that are potential candidates for targeted developmental programs and international aid. The visual representation is a powerful tool for policymakers, educators, and international organizations to identify and address educational inequalities, aiming to create more equitable access to education worldwide. However, the map’s lack of specific numerical values and contextual factors such as data recency and socio-political influences calls for a cautious interpretation, emphasizing the need for comprehensive and up-to-date data to inform effective educational strategies.
library(dplyr)
library(tidyr)
library(ggplot2)
regions <- list(
"Central/Southern Africa" = c("Burundi", "Central African Republic", "Lesotho", "Madagascar", "Malawi", "Mozambique", "Rwanda", "Tanzania (United Republic of)", "Angola", "Botswana", "Cameroon", "Congo (Democratic Republic of the)", "Namibia", "South Africa", "Swaziland", "Zambia", "Zimbabwe"),
"Sahel" = c("Burkina Faso", "Chad", "Mali", "Mauritania", "Niger", "Senegal", "Sudan", "South Sudan"),
"East Africa" = c("Djibouti", "Eritrea", "Ethiopia", "Somalia", "Uganda", "Kenya"),
"West Africa" = c("Benin", "Cote d'Ivoire", "Gambia", "Guinea", "Guinea-Bissau", "Liberia", "Sierra Leone", "Togo", "Nigeria"),
"Middle East" = c("Afghanistan", "Pakistan", "Yemen")
)
long_data <- mean_years_data %>%
gather(key = "Gender", value = "Years", mys_m_2022, mys_f_2022) %>%
mutate(Gender = ifelse(Gender == "mys_m_2022", "Male", "Female"))
# Create a new variable indicating the region for each country
long_data <- long_data %>%
mutate(Region = case_when(
country %in% regions[["Central/Southern Africa"]] ~ "Central/Southern Africa",
country %in% regions[["Sahel"]] ~ "Sahel",
country %in% regions[["East Africa"]] ~ "East Africa",
country %in% regions[["West Africa"]] ~ "West Africa",
country %in% regions[["Middle East"]] ~ "Middle East",
TRUE ~ "Other"
))
# Reorder the levels of the Region variable for visualization
long_data$Region <- factor(long_data$Region, levels = c(
"Central/Southern Africa", "Sahel", "East Africa", "West Africa", "Middle East", "Other"
))
# Create bar plot for expected years of schooling grouped by region
barplot_mean_years_region <- ggplot(long_data, aes(x = Region, y = Years, fill = Gender)) +
geom_bar(stat = "identity", position = "dodge") +
labs(x = "Region", y = "Mean Years of Schooling", fill = "Gender") +
ggtitle("Mean Years of Schooling for Males and Females sorted by Region") +
theme(axis.text.x = element_text(angle = 45, hjust = 1), legend.position = "top") +
scale_fill_manual(values = c("Male" = "blue", "Female" = "pink"))
print(barplot_mean_years_region)
The analysis of mean years of schooling for males and females across different regions reveals significant gender disparities. In Central/Southern Africa, both genders have relatively high levels of schooling, with males averaging 8 years and females 7.5 years. The Sahel region shows a significant gender gap, with males receiving 6 years of schooling compared to females’ 3.5 years. East Africa also exhibits a noticeable gender disparity, with males averaging about 5 years of schooling and females around 4 years. In West Africa, there is a moderate gender gap, with males at about 7 years and females at around 5.5 years. The Middle East has lower overall schooling levels, with males averaging around 5 years and females about 3.5 years, indicating a significant gender disparity.
library(patchwork)
# Gather the data and mutate Gender
long_data <- mean_years_data %>%
gather(key = "Gender", value = "Years", mys_m_2022, mys_f_2022) %>%
mutate(Gender = ifelse(Gender == "mys_m_2022", "Male", "Female"))
# Sum the Years for each country
summed_data <- long_data %>%
group_by(country) %>%
summarise(total_years = sum(Years))
# Sort summed data by total_years
summed_data_sorted <- summed_data %>%
arrange(total_years)
# Use the sorted country names to reorder the original data
long_data_sorted <- long_data %>%
mutate(country = factor(country, levels = summed_data_sorted$country))
# Assign regions to each country
long_data_sorted <- long_data_sorted %>%
mutate(Region = case_when(
country %in% regions[["Central/Southern Africa"]] ~ "Central/Southern Africa",
country %in% regions[["Sahel"]] ~ "Sahel",
country %in% regions[["East Africa"]] ~ "East Africa",
country %in% regions[["West Africa"]] ~ "West Africa",
country %in% regions[["Middle East"]] ~ "Middle East",
TRUE ~ "Other"
))
# Create a function to plot bar plots for each region
plot_region_barplot <- function(region_countries, region_name) {
# Filter data for the specified region
region_data <- long_data_sorted %>%
filter(country %in% region_countries)
# Create bar plot for mean years of schooling for the region
p <- ggplot(region_data, aes(x = country, y = Years, fill = Gender)) +
geom_bar(stat = "identity", position = "dodge") +
labs(x = "Country", y = "Mean Years of Schooling", fill = "Gender") +
ggtitle(paste("Mean Years of Schooling for Males and Females in", region_name)) +
theme(axis.text.x = element_text(angle = 90, hjust = 1), legend.position = "top") +
scale_fill_manual(values = c("Male" = "blue", "Female" = "pink"))
return(p)
}
# List to store plots
plot_list <- list()
# Iterate over regions and create bar plots
for (region_name in names(regions)) {
p <- plot_region_barplot(regions[[region_name]], region_name)
print(p)
}
The aforeseen graphs show the different Mean Years of Schooling for Males and Females in the following areas of Africa: in Central / Southern Africa, in the Sahel, in East Africa, West Africa. We can see that overall, the percentage of men is higher than women regarding their education and the time spent learning. Overall, we may argue that the countries with the highest mean years of Schooling in males are the Democratic Republic of Congo, Nigeria, Eritrea, South Sudan and Mauritania. However, there is an interesting fact regarding the country of Lesotho in Central / South Africa, as it is the only country in the four regions which the average of mean years of schooling is higher for females than for males; supposing more than 7.5 years of schooling, while males are not far behind, this is compelling taking into account that in these areas, the education of women is not relevant because of their paternalistic society which only accepts the role of mothers or workers for women. Moreover, we may see the countries with the lower mean years of schooling from Burundi and Mozambique in Central / Southern Africa; to Niger and Mali in the Sahel; Somalia and Ethiopia in East Africa, where the average schooling of women does not even reach even 2 years of education. Lastly we can see that in West Africa these countries are Guinea and Benin. The disparity of the mean years of schooling between men and females is due to many reasons: firstly, in numerous communities within these regions, traditional gender roles tend to privilege male education over female. Boys are frequently perceived as future providers, whereas girls are anticipated to assume domestic responsibilities. Other reasons are that in numerous cultures, girls are wed at an early age, which curtails their educational prospects. The practice of early marriage frequently results in early motherhood, which in turn further restricts the opportunity for educational advancement. Furthermore, this may also be attributed to economic reasons, the prevalence of poverty in a given area can impede the ability of families to provide their children with an education. When financial resources are limited, families often prioritize the education of boys over girls. Economic necessity may force children into labor to support their families. Boys may have more opportunities to continue their education alongside work, whereas girls might be required to stay home and help with household chores or care for siblings. In sum, the absence of role models and mentors for girls can also act as a deterrent to their pursuit of education. It is possible that community programmes and initiatives that support girls’ education may be scarce or ineffective.
# Assign regions to each country
merged_data <- gni_data %>%
mutate(Region = case_when(
country %in% regions[["Central/Southern Africa"]] ~ "Central/Southern Africa",
country %in% regions[["Sahel"]] ~ "Sahel",
country %in% regions[["East Africa"]] ~ "East Africa",
country %in% regions[["West Africa"]] ~ "West Africa",
country %in% regions[["Middle East"]] ~ "Middle East",
TRUE ~ "Other"
))
# Calculate the mean of male and female expected years of schooling and GNI per capita
merged_data <- merged_data %>%
mutate(
mean_eys = (eys_m_2022 + eys_f_2022) / 2,
mean_gni = (gni_pc_m_2022 + gni_pc_f_2022) / 2
)
# Create scatter plot with unique color for each region and size based on population
scatterplot_mean_gni_eys <- ggplot(merged_data, aes(x = mean_gni, y = mean_eys, color = Region, size = pop_total_2022)) +
geom_point(alpha = 0.7) +
scale_size_continuous(name = "Population 2022 in Millions") +
labs(x = "Mean GNI per Capita", y = "Mean Expected Years of Schooling",
title = "Scatter Plot of Mean GNI per Capita vs Mean Expected Years of Schooling by Region") +
theme_bw() +
scale_color_manual(values = c(
"Central/Southern Africa" = "blue",
"Sahel" = "red",
"East Africa" = "green",
"West Africa" = "pink",
"Middle East" = "orange",
"Other" = "grey"
))
# Print the scatter plot
print(scatterplot_mean_gni_eys)
The scatter plot illustrates the relationship between GNI per capita and mean years of schooling across various regions in low HDI countries. Each dot represents a country, with the size of the dot corresponding to the country’s population in 2022 (in millions), categorised into sizes of 50, 100, 150, and 200 million. The dots are colour-coded by region: blue for Central/Southern Africa, orange for the Middle East, pink for West Africa, red for the Sahel, and green for East Africa. The y-axis represents the mean years of schooling, ranging from 0 to 12 years, while the x-axis represents GNI per capita, ranging from 0 to over 5000.
The scatterplot shows a general upward trend, indicating a positive correlation between GNI per capita and mean years of schooling. This suggests that countries with higher GNI per capita tend to have higher average years of schooling. There are noticeable regional differences. For example, countries in the Middle East (orange) and Central/Southern Africa (blue) cluster differently, potentially reflecting regional economic and educational policies. The upward trend line indicates a positive relationship between economic development and educational attainment. This is consistent with the idea that increased economic resources enable better access to education. Larger dots (representing countries with larger populations) do not necessarily cluster in a specific area, suggesting that population size alone does not dictate educational outcomes or economic status.
In the scatterplot, outliers in West Africa and the Middle East deviate significantly from the general trend. These outliers provide valuable insights into unique regional challenges or circumstances. Countries in West Africa with relatively high GNI per capita but low mean years of schooling may be experiencing economic disparities where wealth is not equitably distributed. This can result in limited access to education for large segments of the population despite overall economic growth. Some West African countries face ongoing conflict and political instability, which disrupts education systems. Even with economic resources, instability can lead to school closures and hinder educational progress. In certain West African societies, cultural norms and practices may prioritise early marriage or child labour over formal education, particularly for girls. This cultural emphasis can reduce average years of schooling despite economic improvements. In Middle Eastern countries with high GNI per capita but low mean years of schooling, resource allocation might be skewed. Significant investments in sectors like defence or infrastructure may overshadow spending on education. Gender inequality in education is a persistent issue in some Middle Eastern countries. Societal norms and legal restrictions can limit educational opportunities for girls, leading to lower mean years of schooling. Some Middle Eastern nations prioritise workforce development for economic growth, encouraging technical training and employment over formal schooling. This focus on immediate economic productivity can reduce average schooling years. In conclusion, the scatterplot reveals a positive relationship between GNI per capita and mean years of schooling, highlighting the critical role of economic development in improving educational outcomes. The regional colour-coding and population size markers add depth to the analysis, allowing for a more nuanced understanding of how different factors intersect to influence education in low HDI countries.
Toconclude, the countries with the lowest mean years of schooling for females, such as Guinea, Somalia, and Central African Republic, indicate significant challenges in ensuring access to education and gender parity in education. Possible explanatory factors may include socio-economic challenges, cultural barriers, conflict, and displacement,and gender biases which hinder educational opportunities for females. Countries with the highest mean years of schooling for females, such as Lesotho, Nigeria, and Tanzania, demonstrate relatively better access to education and higher levels of educational attainment among females. Factors contributing to higher mean years of schooling may include government investment in education, infrastructure development, gender equality initiatives, and community engagement in promoting education. Overall, the mean years of schooling for females across the listed countries vary widely, reflecting global disparities in educational access and quality but still remain particularly low as they belong to the already cluster of countries of low human developmeny. Regional patterns may also emerge, with some regions demonstrating higher average years of schooling for females compared to others. For example, countries in East Africa may exhibit higher educational attainment among females compared to those in West Africa.