The data for visualization is taken from the World Happiness Report 2021, available for download at Kaggle.com. For this report, respondents are asked to measure their happiness on a scale of 1 to 10, where higher scores equate to greater happiness. A number of other questions are asked to assess social support, freedom to make life choices, and other rotating measures of interest. Socioeconomic information is collected from national sources to assess GDP per capita, Average Life Expectancy and others. The data reported fluctuates year to year based on the goals of the typically-annual collection. This visualization will focus on Average Life Expectancy and self-reported Happiness Score. To visualize this data, I will use the tidyverse for its plotting capabilities and to read in the data.
library(tidyverse)
data <- read_csv("world-happiness-report-2021.csv")
Based on this plot, there does appear to be a correlation between Average Life Expectancy and self-reported Happiness Score, with higher happiness being reported in countries with higher life expectancies. Regionally speaking, the greatest happiness and highest life expectancies tend to be found in European and North American countries.