The objective of this analysis is to identify the key social, economic, and governance-related variables that contribute to national happiness across the globe. Using the 2015 World Happiness Report, we analyze how GDP, life expectancy, freedom, corruption perception, and social support influence the overall happiness score. These insights can inform government policies and development priorities.
2015.csv
library(tidyverse)
library(janitor)
happiness <- read_csv("2015.csv") %>%
clean_names() %>%
select(
country,
region,
happiness_score,
gdp = economy_gdp_per_capita,
life_expectancy = health_life_expectancy,
social_support = family,
freedom,
generosity,
corruption = trust_government_corruption
) %>%
drop_na()
ggplot(happiness, aes(x = gdp, y = happiness_score)) +
geom_point(color = "#3366CC", alpha = 0.7) +
geom_smooth(method = "lm", color = "darkblue", se = FALSE) +
labs(title = "GDP per Capita vs Happiness Score",
x = "GDP per Capita",
y = "Happiness Score") +
theme_minimal()
π Insight: Countries with higher GDP per capita tend to have higher happiness scores, showing that economic strength is a strong predictor of national well-being.
ggplot(happiness, aes(x = life_expectancy, y = happiness_score)) +
geom_point(color = "#FF6F61", alpha = 0.7) +
geom_smooth(method = "lm", color = "darkred", se = FALSE) +
labs(title = "Life Expectancy vs Happiness Score",
x = "Healthy Life Expectancy",
y = "Happiness Score") +
theme_minimal()
π Insight: A longer healthy life expectancy is clearly associated with higher happiness, emphasizing the importance of healthcare investments.
ggplot(happiness, aes(x = region, y = happiness_score, fill = region)) +
geom_boxplot(show.legend = FALSE) +
coord_flip() +
labs(title = "Happiness Score by Region",
x = "Region",
y = "Happiness Score") +
theme_minimal()
π Insight: Western Europe and North America rank highest, while Sub-Saharan Africa and Southern Asia score lower on average, showing geographical disparity in well-being.
The World Happiness Report 2015 reveals the powerful influence of social and economic factors on happiness. Policymakers should use such data to identify strengths and address deficits in national well-being strategies.
π€ Social Support vs Happiness