πŸ“˜ Business Task

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.


πŸ“‚ Data Source


🧹 Data Cleaning

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

πŸ” Analysis & Visualizations

πŸ“Š GDP vs Happiness Score

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.


πŸ’‰ Life Expectancy vs Happiness

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.


🀝 Social Support vs Happiness

ggplot(happiness, aes(x = social_support, y = happiness_score)) +
  geom_point(color = "#6A0572", alpha = 0.7) +
  geom_smooth(method = "lm", color = "#4B0082", se = FALSE) +
  labs(title = "Social Support vs Happiness Score",
       x = "Social Support",
       y = "Happiness Score") +
  theme_minimal()

πŸ“Œ Insight: Countries with higher levels of social support β€” such as strong family and community ties β€” also show higher happiness scores.


πŸ—ΊοΈ Happiness Score by Region

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.


πŸ“Œ Key Takeaways


🧠 Recommendations


βœ… Conclusion

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.