Return

Screen Shot 2022-07-04 at 11.00.18 AM.png

World Happiness Index - EDA and Clustering

This notebook is a brief exploration of the World Happiness Index to observe how it has changed over time, what global disparities there are, and what variables contribute a country's happiness. Special consideration will be given to Colombia.

This analysis will make use of the 2021 World Index Report database as well as one that contains historical data.

Website of the World Happiness Report: https://worldhappiness.report/

Screen Shot 2022-07-04 at 10.44.44 AM.png

Library import

Information loading

Dataframe exploration

The highest Index recorded is 7.8, the lowest is 2.52.

Graphic Analysis

World Map

I'll start by plotting a world map to get a sense of the Index's global distribution.

The map shows us some clear differences between continents. Africa and Asia are the regions with the lowest rates, while Europe and North America have the highest. The scores of the countries in each continent are somewhat consistent between them, we can observe 'happy continents' and others 'sad' or less happy.

Happiness Index by Region

North America and Western Europe have the highest happiness indexes, whereas Sub-Saharan Africa and South Asia have the lowest.

The confidence intervals show that almost all Latin American and Caribbean countries have rates that are higher than the global average.

What countries are the happiest and saddest?

Despite the fact that South Asia and North America had the lowest and highest average rates in 2021, the countries at the top of the list are primarily European, while the countries at the bottom are mostly from Africa.

Colombia is ranked 52nd in the world, with a score that is higher than the global average.

Countries in North America and Western Europe are "happy," while those in South Asia are "sad." But what about the countries in the middle?

What is the relationship between the Happiness Index and the metrics that make it up?

Per capita income, life expectancy, and social support are the variables with the highest estimated importance and are most correlated with the Happiness Index. Generosity does not appear to have relevance.

Happines Score, Life Expectancy and GDP

We can see a strong linear relationship between the happiness index, life expectancy, and per capita income. The happiest countries are those that are richest and have a higher life expectancy.

Most of the Latin American and Caribbean countries are positioned above the world average. Colombia occupies an intermediate position compared to its neighbors.

Corruption, Social Support and Happines Index

Countries with low perceptions of corruption have the highest levels of social support and are also the happiest, with the exception of Rwanda. Low levels of social support and a high perception of corruption characterize the saddest.

Colombia is one of the Latin American countries with the most negative perceptions of corruption.

Freedom to Make Choices, Social Support and Happines Index

The happiness index (circle size), social support, and freedom to make decisions all have a strong linear relationship; countries with high registers are the happiest.

Colombia's social support and freedom to make life decisions are both higher than the global average; this is true for each of the Index's metrics.

The index's evolution over time

Year 2021, a set back year

The worldwide happiness index, which had been rising in recent years, plummeted in 2021, owing to the COVID-19 Pandemic, most likely. It appears that it took approximately two years for it to have the largest adverse impact on the global population's happiness.

The recent broadening of the confidence interval shows that the impact was uneven across the sample of countries, with some experiencing strong increases in happiness while others had sharp drops. The latest was the one who dragged the mean down.

51.7% of the countries reached a lower level of happiness in 2021 compared to 2019. 41.6% improved their measurement and 6.7% remained at the same level.

WHR metric behavior over time

Despite the pandemic, all of the index's indicators are better than they were ten years ago.

When we compare the median for the years 2020 and 2021, we can see a drop in each of the metrics linked to the happiness index.

However, if we look at the last ten years, between 2011 and 2021, the metrics have improved (an improvement in perception of corruption is represented by a decrease in its metric), which appears to indicate that, despite the negative effects of the pandemic, there are now higher levels of per capita income, social support, life expectancy, and personal liberty.

Happier and sadder countries across time

When we look at the top ten countries in terms of happiness, we can see that they tend to be consistent over time, even though they are close to the lowest levels that have been recorded since 2007, with the exception of Canada, which is behind and Finland, which has one of the highest indices.

The countries with lower time indices have more variability in their results. Afghanistan is the country with the lowest score, ranking second lowest since 2007, only ahead of its own score from the previous year.

Since 2007, the bottom half of the table has been dominated by African countries, while the top half has been dominated by European countries. This shows that the 2021 results, rather than being based on chance, appear to be adapting to a pattern over time.

Colombia also demonstrates consistency through time, drawing attention to the fact that the year 2021 saw one of the lowest figures ever recorded.

How many countries have taken the first and last three spots?

Since 2005, only 11 countries have occupied the top three spots in the ranking, implying a concentration at the top. The bottom three spots are occupied by 22 countries.

What's going on with the regions?

In comparison to 2011, the regions that are the happiest today are Europe, Sub-Saharan Africa, and the Independent States; this last has had the greatest increase in happiness levels (7.4 percent ). The remainder of the world's regions have lost ground, including North America, which remains in first place.

Latin America and the Caribbean have had a -2.3 percent decline in their rankings during the last decade. This decline is being caused by a drop in Latin American countries, while in the Caribbean has increased. Costa Rica is the happiest country in the region in 2021.

Colombia over time

The happiest countries appear to maintain their happiness through time, whilst the poorest countries appear to be becoming worse.

This graph confirms yet again that Colombia is currently at one of the lowest levels in recent years.

Colombia vs. the first and last place

Colombia se encuentra por debajo de Finlandia y por encima de Afganistán en cada una de las métricas del Índice, a excepción de la métrica de generosidad, la cual, tras estar históricamente por debajo de estos dos países, en el 2020 repuntó y se situó por encima de Finlandia.

Colombia is below Finland and ahead of Afghanistan in each of the index's metrics, with the exception of the generosity metric, which, after historically being behind both of these countries, repunted and moved ahead of Finland in 2020.

Clustering

Finally, I'll use the K-means clustering approach to find groups of countries that share similar characteristics.

Clusters are defined as groups of data objects that are more comparable to other data objects in their cluster than to data objects in other clusters.

The clustering technique is a collection of techniques for dividing data into groups or clusters. It is the process of dividing a set of data into groups in which members of the same group share comparable characteristics. The goal of K-means is simple: group comparable data points and find subyacent patterns.

I'll use the Elbow Method to select the number of clusters.

To run the model, I'll choose k=3 clusters. This will categorize the countries reported into three groups based on common patrons found in their metrics.

Conclusions

Colombia