Inspired by an article in The Economist, this project visualizes the association between wealth and happiness using data from the World Happiness Report and the World Bank. The Interactive GDP and Happiness Report allows users to explore how GDP relates to life satisfaction scores across different countries and regions of the world.
- Interactive scatter plot showing the relationship between GDP per capita and happiness scores
- Annotations for Greece and the top 5 happiest countries (Finland, Denmark, Iceland, Sweden, and Netherlands)
- Linear trend line showing the overall relationship
- Hover tooltips displaying detailed information for each country
- Data points sized by country population
- Color-coded by region
- Zoom functionality for detailed exploration
You can access the interactive visualization at: https://panoschatz.shinyapps.io/World_Happiness_Report_2025/
- World Happiness Report 2025
- World Bank population data (2023)
- World Bank GDP data (2023)
- R
- Shiny
- ggplot2
- ggiraph
- Power Query (for data preparation)
- Clone this repository
- Ensure you have R and the required packages installed:
install.packages(c("shiny", "ggplot2", "ggiraph", "readxl", "janitor", "ggrepel", "ggtext"))
- Place your
happiness_gdp_pop.xlsxor.RDSfile in the project directory - Run the Shiny app:
shiny::runApp()
The data was prepared by:
- Downloading raw data from the World Happiness Report and World Bank
- Using Power Query to clean, transform, and join datasets
- Exporting the combined dataset to the Excel file used by the application
This project is licensed under the MIT License.
- The Economist for the original inspiration
- World Happiness Report for the data and research