Using Data to Analyze Happiness Around the World
LinkedIn | Github |ShinyApp
Working as a solutions engineer in the technical services division for an electronic healthcare records company, a bulk of my success was measured by happiness of my customers. However, happiness is not always so easy to measure because everyone has different standards and situations. In this project, I aim to investigate the success of countries around the world by analyzing different factors that attribute to happiness among citizens of different parts of the world. In this text we will use data to analyze happiness around the world.
Data Overview
The data I used for this project was taken from World Happiness Report. Each country is given an overall happiness score for each year and the overall happiness score can be broken down into the following 6 categories:
- GDP per Capita
- Healthy Life Expectancy
- Freedom to Make Life Choices
- Generosity
- Perception of Corruption
- Social Support
A country is given a score for each of the 6 categories and each category score measures how that category improves people's lives compared to Dystopia. Dystopia is a hypothetical country with the lowest scores in all of the 6 categories. The overall score is the summation of the 6 category scores and a residual component called Dystopia Residual that reflect the extent to which the 6 variables over or under estimate the average score.
Analysis
World Map
My shiny dashboard contains 2 main tabs: World Map and Explore. The World Map tab allows the user to select the year and categories to create a new overall score. The user input is reflected in the world map which shows a darker green for countries with higher scores. The actual data that drives the map is also shown in the bottom.

This map shows that Americas, Europe, Australia and New Zealand have higher happiness score than Africa and Asia for the year 2019. Since everyone has different priorities that make their lives happy, users can choose the criteria that are most important for them and investigate how countries rank based on their individual preferences for happiness.
Variables
Let's zoom in to the explore page to investigate correlations and trends.
In the variables tab of the explore page, we can investigate which category scores are highly correlated with the overall score by selecting Happiness Score on the Y-axis and desired criteria to investigate on the X-axis.

The three highest correlated categories with respect to the overall score are GDP per capita, healthy life expectancy and social support. This shows that countries that are happier due to GDP, healthy life expectancy and social support are more likely to be happier overall.

On the contrary, generosity, perception of corruption and freedom to make life choices were the lowest correlated categories. Therefore, having a high score for these categories does not necessarily lead to higher overall happiness.
Trends
On the trends tab, users can analyze which countries had the most increase or decrease in scores for a selected time range.

The graphs above show top 5 increasing and decreasing countries from 2015 to 2019. With such trending information, countries can understand their current situation with respect to previous years and take actions to make their citizens happier or keep them happy. Further research can be done to analyze trends of happiness scores with factors that may contribute to happiness such as political stability, income disparity and incarceration rates.
Regions
Similar to the world map page, regions tab allows users to select criteria of their interest and group by the sub region or continent. A bar graph shows the aggregated score from user's input for each region and the data table is shown below.

Our observations from the world map page that showed Americas, Oceania and Europe to be happier than Asia and Africa holds true according to the bar chart above.
Conclusion
Through this project, we identified the top 3 correlated categories for overall happiness score were GDP per capita, healthy life expectancy and social support. We also identified which countries were most increasing or decreasing in happiness. This information can serve as a foundation for further analysis studying the cause of decrease or increase in happiness. Furthermore, we quantified that Americas and Oceania are the happiest continents above Europe, Asia and Africa. I hope you can use this dashboard to select criteria that are most important to you and see which countries or regions are happiest to your standards.
The skills I demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.