Visual analysis of world happiness from 2015–2019. We all chase happiness in our lives. Yes, money is important but if you ask most people, they want to be happy.
We all chase happiness in our lives. Yes, money is important but if you ask most people, they want to be happy. But what constitutes happiness? It is an answer I have tried to search for in a lot of books and blogs including a number of medium articles!
So you can guess my excitement and surprise when I found out that an abstract concept such as happiness could be quantified!
The World Happiness Report is a “..landmark survey of the state of global happiness that ranks 156 countries by how happy their citizens perceive themselves to be.” It is a publication of the Sustainable Development Solutions Network and is based on data collected from the Gallup World Poll. According to the report,.. “the rankings are based on answers to the main life evaluation question asked in the poll. This is called the Cantril ladder: it asks respondents to think of a ladder, with the best possible life for them being a 10, and the worst possible life being a 0. They are then asked to rate their own current lives on that 0 to 10 scale.”
Having studied economics and public policy during graduate school, I naturally get excited by data on socio-economic development. Moreover, the publication is gaining global recognition as governments, organizations and civil society are increasingly using happiness indicators to inform policy-making decisions. So I decided to better understand this concept through data visualization.
The objective of the visual analysis was to:
Data for the previous years can be easily obtained from Kaggle. There are 5 CSV files containing data on 141 countries for the years 2015 to 2019. The columns following the happiness score estimate the extent to which each of six indicators — GDP per Capita, social or family support, health or life expectancy, freedom, government trust or perception of corruption, and generosity — contribute to making life evaluations higher in each country.
The dataset was fairly clean and easy to work with. Data cleaning and preprocessing were done using Python. After renaming columns (so that they have consistent names) and basic cleaning, the 5 CSV files were merged into one final dataset. The final pandas data-frame has 141 rows corresponding to each country and 46 columns corresponding to happiness indicators and scores across the different years.
Dataframe (image by author)
Now coming to the interesting part!
The visualization was done using Tableau and for a select few countries including the top 10 happiest nations (on average), the bottom 5 (least happy) nations, and the countries of interest e.g. India, China, USA, UK, Syria, UAE, and Spain. Also, for most of the plots, data from the most recent report, that is, 2019 was considered.
I also created a “Happiness Spotlight” calculated field based on the range of happiness scores. This calculated field makes it very easy to visualize the data as it color-codes the data. The minimum cut-offs were obtained by binning the happiness scores into ‘Low’, ‘Medium’, and ‘High’ in Python.
data-visualization data-science public-policy python happiness
🔵 Intellipaat Data Science with Python course: https://intellipaat.com/python-for-data-science-training/In this Data Science With Python Training video, you...
🔥To access the slide deck used in this session for Free, click here: https://bit.ly/GetPDF_DataV_P 🔥 Great Learning brings you this live session on 'Data Vis...
🔥Intellipaat Python for Data Science Course: https://intellipaat.com/python-for-data-science-training/In this python for data science video you will learn e...
Master Applied Data Science with Python and get noticed by the top Hiring Companies with IgmGuru's Data Science with Python Certification Program. Enroll Now
Online Data Science Training in Noida at CETPA, best institute in India for Data Science Online Course and Certification. Call now at 9911417779 to avail 50% discount.