WORLD HAPPINESS ANALYSIS

Home World Happiness in G10 World Happiness and Wealth Happiness Mediators Summary

Data Visualization


For my second analysis, I conducted a regression analysis using Python and R to investigate the relationship between the World Happiness Score (WHS) and the Gini Index, a measure of income inequality. Additionally, I incorporated GDP per capita as a variable to adjust the size of the data points in the scatter plot, providing insights into how GDP might influence WHS. The Python code utilized matplotlib and pandas to visualize the data, where larger circles represented higher GDP values, and distinct colors were assigned to each continent for easy identification.

The regression analysis in Python generated a regression line, indicating an inverse relationship between WHS and the Gini Index, with countries having lower Gini Index scores associated with higher WHS. Moreover, using R, I ran a linear regression model which yielded significant results (p-value = 0.00473), confirming the inverse relationship between WHS and the Gini Index. The regression coefficients indicated that, on average, for every one-unit increase in the Gini Index, WHS decreased by approximately 0.04699 points.

This analysis underscores the importance of economic equality in fostering overall happiness within nations and highlights the potential impact of income distribution on societal well-being.

Data Analysis

Python was utilized to generate the plot. Click the button below to unveil the Python code.



R was utilized to generate the statistical analysis. Click the button below to unveil the R code.