Most important factors for happiness¶

Description¶

When you visit a new country, you often notice the differences in the people living there and their happiness. We often wonder why certain people in certain countries are happy and what actually makes them happy. Happiness is an abstract idea that is hard to determine a cause-and-effect relationship. Studies in the past have attempted to look into genetics to determine happiness, but a conclusive answer has yet to be found. In this project, I hope to examine the main factors in a country that contribute to the populations overall happiness level.

Dataset¶

In [12]:
import pandas as pd

data = pd.read_csv('2015.csv')

data.head()
Out[12]:
Country Region Happiness Rank Happiness Score Standard Error Economy (GDP per Capita) Family Health (Life Expectancy) Freedom Trust (Government Corruption) Generosity Dystopia Residual
0 Switzerland Western Europe 1 7.587 0.03411 1.39651 1.34951 0.94143 0.66557 0.41978 0.29678 2.51738
1 Iceland Western Europe 2 7.561 0.04884 1.30232 1.40223 0.94784 0.62877 0.14145 0.43630 2.70201
2 Denmark Western Europe 3 7.527 0.03328 1.32548 1.36058 0.87464 0.64938 0.48357 0.34139 2.49204
3 Norway Western Europe 4 7.522 0.03880 1.45900 1.33095 0.88521 0.66973 0.36503 0.34699 2.46531
4 Canada North America 5 7.427 0.03553 1.32629 1.32261 0.90563 0.63297 0.32957 0.45811 2.45176

Data Dictionary¶

Data Dictionary:

Country: Represents the country
Region: Represents the area of the world the country is located in
Happiness rank: Determines the rank of the country based on the happiness score
Happiness score: Score determined by using the Gallup World Poll and the Cantril ladder measured from 1 to 10
Standard Error: standard error from the happiness score
Economy (GDP per capita): Extent to which GDP contributes to happiness
Family: Extent to which family contributes to happiness
Health (life expectancy): Extent to which Health contributes to happiness
Freedom: Extent to which freedom contributes to happiness
Trust (Government Corruption): Extent to which trust contributes to happiness
Generosity: Extent to which generosity contributes to happiness
Dystopia Residual: Extent to which Dystopia Residual contributes to happiness

Link to the dataset: https://www.kaggle.com/datasets/unsdsn/world-happiness?resource=download&select=2015.csv

Note about data choice¶

I acknowledge that this is only for one year's worth of data, however, happiness doesn't change as rapidly without any unexpected circumstance to a nation. Additionally, we are looking to identify the characteristics of what makes countries residents more happy, rather than identifying the country with the highest happiness rank.

How I plan to use ML?¶

There are a few ways to analyse this dataset. I plan to cluster groups of countries based on the happiness indicated score. Then I can use this data to determine what are the leading factors that contribute to the country's happiness. This can be implemented in a few different ways, so I plan to try out different models and tweak them to see which result comes out most accurate and effective.