SlideShare a Scribd company logo
1 of 8
Download to read offline
2017 World Happiness Report Data Analysis
Prepared by:
Achilleas Papatsimpas
Mathematician, M.Sc. Statistics and Operational Research
We will use for this project the 2017_world_happiness.csv dataset from Kaggle. Our
dataset consists of 155 countries and various characteristics such as the Happiness
Score or the Economy GDP per capita are investigated. The aim of this project is to
analyze the factors that affect the World happiness score and investigate possible
correlations with Python.
I. Variable Definitions (Helliwell et. Al (2017))
 Happiness score or subjective well-being: the national average response to the
question of life evaluations. The English wording of the question is “Please
imagine a ladder, with steps numbered from 0 at the bottom to 10 at the top.
 Economy..GDP.per.capita: the statistics of GDP per capita in purchasing power
parity (PPP) at constant 2011 international dollar prices.
 Healthy Life Expectancy (HLE): the time series of total life expectancy to healthy
life expectancy by simple multiplication, assuming that the ratio remains
constant within each country over the sample period.
 Family: the national average of the binary responses (either 0 or 1) to the GWP
question “If you were in trouble, do you have relatives or friends you can count
on to help you whenever you need them, or not?”
 Freedom: Freedom to make life choices is the national average of responses to
the GWP question “Are you satisfied or dissatisfied with your freedom to choose
what you do with your life?”.
 Generosity: the residual of regressing national average of response to the GWP
question “Have you donated money to a charity in the past month?” on GDP
per capita.
 Trust..Government.Corruption.: The measure is the national average of the
survey responses to two questions in the GWP: “Is corruption widespread
throughout the government or not” and “Is corruption widespread within
businesses or not?” The overall perception is just the average of the two 0-or-1
responses.
 Dystopia: an imaginary country that has the world’s least-happy people. The
purpose in establishing Dystopia is to have a benchmark against which all
2017 WORLD HAPPINESS REPORT DATA ANALYSIS
2
countries can be favorably compared (no country performs more poorly than
Dystopia) in terms of each of the six key variables, thus allowing each sub-bar
to be of positive width.
First, we import the data in Python:
import pandas as pd # data processing
import seaborn as sns
import matplotlib.pyplot as plt
my_data=pd.read_csv("../input/2017_world_hapiness.csv")
my_data.head()
II. Descriptive Statistics for the Happiness Score
print(my_data['Happiness.Score'].describe())
plt.figure(figsize=(9, 8))
sns.distplot(my_data['Happiness.Score'], color='g', bins=10,
hist_kws={'alpha': 0.4});
count 155.000000
mean 5.354019
std 1.131230
min 2.693000
25% 4.505500
50% 5.279000
75% 6.101500
max 7.537000
Name: Happiness.Score, dtype: float64
The mean Happiness Score worldwide is 5.354 which means that the global population
is moderately satisfied by its way of life. The standard deviation is 1.1312 and the
2017 WORLD HAPPINESS REPORT DATA ANALYSIS
3
median is 5.279. From the above histogram we can conclude that the variable
Happiness.Score seems to be normally distributed.
III. Descriptive Statistics for all Variables
my_data.describe()
The mean GDP per capita worldwide is 0.984718 and the mean satisfaction with
people’s freedom to choose what they do with their life is 0.408786. This can be
considered as unsatisfactory with the freedom to make life choices.
Additionally, the mean for the trust of Government corruption is 0.123120 which shows
that it is mainly widespread throughout the government.
IV. Boxplots for the variables
boxplot = my_data.boxplot(column=['Happiness.Score',
'Economy..GDP.per.Capita.', 'Family',
'Health..Life.Expectancy.', 'Freedom', 'Generosity',
'Dystopia.Residual', 'Trust..Government.Corruption.'],
figsize=(18,8))
2017 WORLD HAPPINESS REPORT DATA ANALYSIS
4
From the above boxplots we have the presence of extreme values for the variables
Family, Generosity, Dystopia Residual and Trust Government corruption. Also, the
variance is higher in the Happiness.Score variable comparing to the other variables.
V. Histograms for all the variables
my_data.hist(figsize=(16, 20), bins=20, xlabelsize=8,
ylabelsize=8);
From the above histograms it seems that:
 Economy..GDP.per.capita, Family, Freedom, Healthy Life Expectancy (HLE) are
left skewed
2017 WORLD HAPPINESS REPORT DATA ANALYSIS
5
 Generosity and Trust..Government.Corruption. are right skewed.
VI. Correlations with Happiness Score
Next, we will investigate which variables are strongly correlated with Happiness Score.
my_data_corr = my_data.corr()['Happiness.Score'][:-1]
golden_features_list = my_data_corr[abs(my_data_corr) >
0.5].sort_values(ascending=False)
print("There is {} strongly correlated values with
Happiness.Score:n{}".format(len(golden_features_list),
golden_features_list))
There is 8 strongly correlated values with Happiness.Score:
Happiness.Score 1.000000
Economy..GDP.per.Capita. 0.812469
Health..Life.Expectancy. 0.781951
Family 0.752737
Freedom 0.570137
Happiness.Rank -0.992774
Name: Happiness.Score, dtype: float64
Economy.GDP.per.Capita, Health.Life.Expectancy, Family and Freedom are strongly
correlated and have statistically significant correlations with Happiness Score.
A heat map of the 8 strongly correlated values with Happiness.Score is presented
below.
corr = my_data.drop('Happiness.Rank', axis=1).corr()
plt.figure(figsize=(12, 10))
sns.heatmap(corr[(corr >= 0.5) | (corr <= -0.4)],
cmap='viridis', vmax=1.0, vmin=-1.0,
linewidths=0.1,
annot=True, annot_kws={"size": 8},
square=True);
2017 WORLD HAPPINESS REPORT DATA ANALYSIS
6
Higher GDP per capita, Family, Health life expectancy and Freedom levels seem to be
significant factors for a higher Happiness Score.
VII. Scatter dots
plt.scatter(my_data['Happiness.Score'],
my_data['Economy..GDP.per.Capita.'], edgecolors='r')
plt.xlabel('Happiness Score')
plt.ylabel('GDP per Capita')
plt.show()
2017 WORLD HAPPINESS REPORT DATA ANALYSIS
7
plt.scatter(my_data['Happiness.Score'],
my_data['Health..Life.Expectancy.'], edgecolors='g')
plt.xlabel('Happiness Score')
plt.ylabel('Health Life Expectancy')
plt.show()
plt.scatter(my_data['Happiness.Score'],
my_data['Family'], edgecolors='c')
plt.xlabel('Happiness Score')
plt.ylabel('Family')
plt.show()
plt.scatter(my_data['Happiness.Score'],
my_data['Freedom'], edgecolors='m')
plt.xlabel('Happiness Score')
plt.ylabel('Freedom')
plt.show()
2017 WORLD HAPPINESS REPORT DATA ANALYSIS
8
We graphed happiness score with GDP per capita, Family, Health life expectancy and
Freedom. From this, we can see a positive correlation. As the above variables increase
so does the overall happiness score. This is very informative and gives us insight into
why people are happy in certain countries.
VIII. Conclusions
The mean Happiness Score worldwide is 5.354 which indicates that there exists a
moderate satisfaction from the global population. Economy.GDP.per.Capita,
Health.Life.Expectancy, Family and Freedom are strongly correlated and have
statistically significant correlations with Happiness Score, which is presented with a
heat map and scatter dot diagrams.
IX. Bibliography
Helliwell John F., Huang Haifang and Wang Shun (2017), The social foundations of
world happiness", World Happiness Report 2017

More Related Content

What's hot

Regression vs correlation and causation
Regression vs correlation and causationRegression vs correlation and causation
Regression vs correlation and causationGarimaGupta229
 
Central place theory of august losch
Central place theory of august loschCentral place theory of august losch
Central place theory of august loschDibakarSarkar5
 
Population density and distribution
Population density and distributionPopulation density and distribution
Population density and distributiontudorgeog
 
Population Distribution
Population DistributionPopulation Distribution
Population Distributionjacksonthree
 
Heteroscedasticity Remedial Measures.pptx
Heteroscedasticity Remedial Measures.pptxHeteroscedasticity Remedial Measures.pptx
Heteroscedasticity Remedial Measures.pptxPatilDevendra5
 
Logic (PROPOSITIONS)
Logic (PROPOSITIONS)Logic (PROPOSITIONS)
Logic (PROPOSITIONS)D Nayanathara
 
Definition,meaning, scope,approach, and aim of urban-geography
Definition,meaning, scope,approach, and aim of urban-geographyDefinition,meaning, scope,approach, and aim of urban-geography
Definition,meaning, scope,approach, and aim of urban-geographyKamrul Islam Karim
 
Matrix and it's Application
Matrix and it's ApplicationMatrix and it's Application
Matrix and it's ApplicationMahmudle Hassan
 
Theories of Migration
Theories of Migration Theories of Migration
Theories of Migration Nandlal Mishra
 
Appilation of matrices in real life
Appilation of matrices in real lifeAppilation of matrices in real life
Appilation of matrices in real lifeStudent
 
Core-Periphery Model of John Friedmann
Core-Periphery Model of John FriedmannCore-Periphery Model of John Friedmann
Core-Periphery Model of John FriedmannMihir Adhikary
 
Migration 8
Migration 8Migration 8
Migration 8mrscox
 
Application of matrix in business
Application of matrix in businessApplication of matrix in business
Application of matrix in businessFreelancer
 
Statistical techniques in geographical analysis
Statistical techniques in geographical analysisStatistical techniques in geographical analysis
Statistical techniques in geographical analysisakida mbugi
 
Applications of Matrices
Applications of MatricesApplications of Matrices
Applications of Matricessanthosh kumar
 

What's hot (20)

Regression vs correlation and causation
Regression vs correlation and causationRegression vs correlation and causation
Regression vs correlation and causation
 
Central place theory of august losch
Central place theory of august loschCentral place theory of august losch
Central place theory of august losch
 
Population density and distribution
Population density and distributionPopulation density and distribution
Population density and distribution
 
Population Distribution
Population DistributionPopulation Distribution
Population Distribution
 
Population & environment
Population & environmentPopulation & environment
Population & environment
 
Heteroscedasticity Remedial Measures.pptx
Heteroscedasticity Remedial Measures.pptxHeteroscedasticity Remedial Measures.pptx
Heteroscedasticity Remedial Measures.pptx
 
Postmodern Geography
Postmodern GeographyPostmodern Geography
Postmodern Geography
 
Logic (PROPOSITIONS)
Logic (PROPOSITIONS)Logic (PROPOSITIONS)
Logic (PROPOSITIONS)
 
Definition,meaning, scope,approach, and aim of urban-geography
Definition,meaning, scope,approach, and aim of urban-geographyDefinition,meaning, scope,approach, and aim of urban-geography
Definition,meaning, scope,approach, and aim of urban-geography
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
Matrix and it's Application
Matrix and it's ApplicationMatrix and it's Application
Matrix and it's Application
 
Theories of Migration
Theories of Migration Theories of Migration
Theories of Migration
 
Rural – urban migration
Rural – urban migrationRural – urban migration
Rural – urban migration
 
Appilation of matrices in real life
Appilation of matrices in real lifeAppilation of matrices in real life
Appilation of matrices in real life
 
Core-Periphery Model of John Friedmann
Core-Periphery Model of John FriedmannCore-Periphery Model of John Friedmann
Core-Periphery Model of John Friedmann
 
Migration 8
Migration 8Migration 8
Migration 8
 
Application of matrix in business
Application of matrix in businessApplication of matrix in business
Application of matrix in business
 
Statistical techniques in geographical analysis
Statistical techniques in geographical analysisStatistical techniques in geographical analysis
Statistical techniques in geographical analysis
 
Isomorphism
IsomorphismIsomorphism
Isomorphism
 
Applications of Matrices
Applications of MatricesApplications of Matrices
Applications of Matrices
 

Similar to 2017 World Happiness Report Data Analysis

Impact of the income on happiness according to the social context
Impact of the income on happiness according to the social contextImpact of the income on happiness according to the social context
Impact of the income on happiness according to the social contextClmentRieux
 
assignment of statistics 2.pdf
assignment of statistics 2.pdfassignment of statistics 2.pdf
assignment of statistics 2.pdfSyedDaniyalKazmi2
 
A Critical Analysis of Happiness Economics
A Critical Analysis of Happiness EconomicsA Critical Analysis of Happiness Economics
A Critical Analysis of Happiness EconomicsEgan Cornachione
 
Beyond GDP: Measuring well-being and progress of Nations
Beyond GDP: Measuring well-being and progress of NationsBeyond GDP: Measuring well-being and progress of Nations
Beyond GDP: Measuring well-being and progress of NationsKübra Bayram
 
Concrete and Whole-Picture Type Indices to Measure Policy Preference over Inc...
Concrete and Whole-Picture Type Indices to Measure Policy Preference over Inc...Concrete and Whole-Picture Type Indices to Measure Policy Preference over Inc...
Concrete and Whole-Picture Type Indices to Measure Policy Preference over Inc...Koji Yamamoto
 
Putting well being metrics into policy action, Richard Layard
Putting well being metrics into policy action, Richard LayardPutting well being metrics into policy action, Richard Layard
Putting well being metrics into policy action, Richard LayardStatsCommunications
 
---Quantitative Project  World Income and Health Inequality.docx
---Quantitative Project  World Income and Health Inequality.docx---Quantitative Project  World Income and Health Inequality.docx
---Quantitative Project  World Income and Health Inequality.docxtienmixon
 
Reuters/Ipsos Core Political Survey: Presidential Approval Tracker (03/11/2020)
Reuters/Ipsos Core Political Survey: Presidential Approval Tracker (03/11/2020)Reuters/Ipsos Core Political Survey: Presidential Approval Tracker (03/11/2020)
Reuters/Ipsos Core Political Survey: Presidential Approval Tracker (03/11/2020)Ipsos Public Affairs
 
The State of Global Well-Being
The State of Global Well-BeingThe State of Global Well-Being
The State of Global Well-BeingStinson
 
REGRESSION ANALYSIS ON HEALTH INSURANCE COVERAGE RATE
REGRESSION ANALYSIS ON HEALTH INSURANCE COVERAGE RATEREGRESSION ANALYSIS ON HEALTH INSURANCE COVERAGE RATE
REGRESSION ANALYSIS ON HEALTH INSURANCE COVERAGE RATEChaoyi WU
 
Martin Boddy - Getting the Measure of Prosperity
Martin Boddy - Getting the Measure of ProsperityMartin Boddy - Getting the Measure of Prosperity
Martin Boddy - Getting the Measure of ProsperitySouth West Observatory
 
macro_theory_assignment_Seckar_Demirci
macro_theory_assignment_Seckar_Demircimacro_theory_assignment_Seckar_Demirci
macro_theory_assignment_Seckar_DemirciHarun Demirci
 
The Effect of Aid on Growth
The Effect of Aid on GrowthThe Effect of Aid on Growth
The Effect of Aid on GrowthDr Lendy Spires
 
Economics and human well being
Economics and human well beingEconomics and human well being
Economics and human well beingAlejandroMejia90
 
Reuters/Ipsos Core Political Survey: Congressional Approval Tracker (02/20/2020)
Reuters/Ipsos Core Political Survey: Congressional Approval Tracker (02/20/2020)Reuters/Ipsos Core Political Survey: Congressional Approval Tracker (02/20/2020)
Reuters/Ipsos Core Political Survey: Congressional Approval Tracker (02/20/2020)Ipsos Public Affairs
 
Relationship between economic growth and happiness
Relationship between economic growth and happinessRelationship between economic growth and happiness
Relationship between economic growth and happinessUdit Goel
 
Tears Of A Tiger Essay
Tears Of A Tiger EssayTears Of A Tiger Essay
Tears Of A Tiger EssayAshley Bonham
 

Similar to 2017 World Happiness Report Data Analysis (20)

Impact of the income on happiness according to the social context
Impact of the income on happiness according to the social contextImpact of the income on happiness according to the social context
Impact of the income on happiness according to the social context
 
assignment of statistics 2.pdf
assignment of statistics 2.pdfassignment of statistics 2.pdf
assignment of statistics 2.pdf
 
A Critical Analysis of Happiness Economics
A Critical Analysis of Happiness EconomicsA Critical Analysis of Happiness Economics
A Critical Analysis of Happiness Economics
 
Beyond GDP: Measuring well-being and progress of Nations
Beyond GDP: Measuring well-being and progress of NationsBeyond GDP: Measuring well-being and progress of Nations
Beyond GDP: Measuring well-being and progress of Nations
 
Concrete and Whole-Picture Type Indices to Measure Policy Preference over Inc...
Concrete and Whole-Picture Type Indices to Measure Policy Preference over Inc...Concrete and Whole-Picture Type Indices to Measure Policy Preference over Inc...
Concrete and Whole-Picture Type Indices to Measure Policy Preference over Inc...
 
Country Project
Country ProjectCountry Project
Country Project
 
Putting well being metrics into policy action, Richard Layard
Putting well being metrics into policy action, Richard LayardPutting well being metrics into policy action, Richard Layard
Putting well being metrics into policy action, Richard Layard
 
---Quantitative Project  World Income and Health Inequality.docx
---Quantitative Project  World Income and Health Inequality.docx---Quantitative Project  World Income and Health Inequality.docx
---Quantitative Project  World Income and Health Inequality.docx
 
Wellbeing: key issues
Wellbeing: key issuesWellbeing: key issues
Wellbeing: key issues
 
Reuters/Ipsos Core Political Survey: Presidential Approval Tracker (03/11/2020)
Reuters/Ipsos Core Political Survey: Presidential Approval Tracker (03/11/2020)Reuters/Ipsos Core Political Survey: Presidential Approval Tracker (03/11/2020)
Reuters/Ipsos Core Political Survey: Presidential Approval Tracker (03/11/2020)
 
The State of Global Well-Being
The State of Global Well-BeingThe State of Global Well-Being
The State of Global Well-Being
 
REGRESSION ANALYSIS ON HEALTH INSURANCE COVERAGE RATE
REGRESSION ANALYSIS ON HEALTH INSURANCE COVERAGE RATEREGRESSION ANALYSIS ON HEALTH INSURANCE COVERAGE RATE
REGRESSION ANALYSIS ON HEALTH INSURANCE COVERAGE RATE
 
Martin Boddy - Getting the Measure of Prosperity
Martin Boddy - Getting the Measure of ProsperityMartin Boddy - Getting the Measure of Prosperity
Martin Boddy - Getting the Measure of Prosperity
 
macro_theory_assignment_Seckar_Demirci
macro_theory_assignment_Seckar_Demircimacro_theory_assignment_Seckar_Demirci
macro_theory_assignment_Seckar_Demirci
 
Hdi calculation
Hdi calculationHdi calculation
Hdi calculation
 
The Effect of Aid on Growth
The Effect of Aid on GrowthThe Effect of Aid on Growth
The Effect of Aid on Growth
 
Economics and human well being
Economics and human well beingEconomics and human well being
Economics and human well being
 
Reuters/Ipsos Core Political Survey: Congressional Approval Tracker (02/20/2020)
Reuters/Ipsos Core Political Survey: Congressional Approval Tracker (02/20/2020)Reuters/Ipsos Core Political Survey: Congressional Approval Tracker (02/20/2020)
Reuters/Ipsos Core Political Survey: Congressional Approval Tracker (02/20/2020)
 
Relationship between economic growth and happiness
Relationship between economic growth and happinessRelationship between economic growth and happiness
Relationship between economic growth and happiness
 
Tears Of A Tiger Essay
Tears Of A Tiger EssayTears Of A Tiger Essay
Tears Of A Tiger Essay
 

More from Achilleas Papatsimpas

Marshall – Olkin distributions in R
Marshall – Olkin distributions in RMarshall – Olkin distributions in R
Marshall – Olkin distributions in RAchilleas Papatsimpas
 
Marketing in the Hellenic private secondary education during the recession
Marketing in the Hellenic private secondary education during the recession Marketing in the Hellenic private secondary education during the recession
Marketing in the Hellenic private secondary education during the recession Achilleas Papatsimpas
 
Important Probability distributions (in Greek)
Important Probability distributions (in Greek)Important Probability distributions (in Greek)
Important Probability distributions (in Greek)Achilleas Papatsimpas
 
Level of measurement between 2 variables
Level of measurement between 2 variablesLevel of measurement between 2 variables
Level of measurement between 2 variablesAchilleas Papatsimpas
 
Flow chart for popularly used statistical tests
Flow chart for popularly used statistical testsFlow chart for popularly used statistical tests
Flow chart for popularly used statistical testsAchilleas Papatsimpas
 
Solving exponential and logarithmic equations (In Greek)
Solving exponential and logarithmic equations (In Greek)Solving exponential and logarithmic equations (In Greek)
Solving exponential and logarithmic equations (In Greek)Achilleas Papatsimpas
 

More from Achilleas Papatsimpas (7)

Marshall – Olkin distributions in R
Marshall – Olkin distributions in RMarshall – Olkin distributions in R
Marshall – Olkin distributions in R
 
Marketing in the Hellenic private secondary education during the recession
Marketing in the Hellenic private secondary education during the recession Marketing in the Hellenic private secondary education during the recession
Marketing in the Hellenic private secondary education during the recession
 
Important Probability distributions (in Greek)
Important Probability distributions (in Greek)Important Probability distributions (in Greek)
Important Probability distributions (in Greek)
 
Level of measurement between 2 variables
Level of measurement between 2 variablesLevel of measurement between 2 variables
Level of measurement between 2 variables
 
Logistic regression in Myopia data
Logistic regression in Myopia dataLogistic regression in Myopia data
Logistic regression in Myopia data
 
Flow chart for popularly used statistical tests
Flow chart for popularly used statistical testsFlow chart for popularly used statistical tests
Flow chart for popularly used statistical tests
 
Solving exponential and logarithmic equations (In Greek)
Solving exponential and logarithmic equations (In Greek)Solving exponential and logarithmic equations (In Greek)
Solving exponential and logarithmic equations (In Greek)
 

Recently uploaded

VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130Suhani Kapoor
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...soniya singh
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxEmmanuel Dauda
 
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)jennyeacort
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxFurkanTasci3
 
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDRafezzaman
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样vhwb25kk
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一F sss
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfSocial Samosa
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...Pooja Nehwal
 
How we prevented account sharing with MFA
How we prevented account sharing with MFAHow we prevented account sharing with MFA
How we prevented account sharing with MFAAndrei Kaleshka
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Jack DiGiovanna
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...dajasot375
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubaihf8803863
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...Suhani Kapoor
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptSonatrach
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPramod Kumar Srivastava
 

Recently uploaded (20)

VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
 
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptx
 
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
 
Call Girls in Saket 99530🔝 56974 Escort Service
Call Girls in Saket 99530🔝 56974 Escort ServiceCall Girls in Saket 99530🔝 56974 Escort Service
Call Girls in Saket 99530🔝 56974 Escort Service
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptx
 
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
 
How we prevented account sharing with MFA
How we prevented account sharing with MFAHow we prevented account sharing with MFA
How we prevented account sharing with MFA
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
 

2017 World Happiness Report Data Analysis

  • 1. 2017 World Happiness Report Data Analysis Prepared by: Achilleas Papatsimpas Mathematician, M.Sc. Statistics and Operational Research We will use for this project the 2017_world_happiness.csv dataset from Kaggle. Our dataset consists of 155 countries and various characteristics such as the Happiness Score or the Economy GDP per capita are investigated. The aim of this project is to analyze the factors that affect the World happiness score and investigate possible correlations with Python. I. Variable Definitions (Helliwell et. Al (2017))  Happiness score or subjective well-being: the national average response to the question of life evaluations. The English wording of the question is “Please imagine a ladder, with steps numbered from 0 at the bottom to 10 at the top.  Economy..GDP.per.capita: the statistics of GDP per capita in purchasing power parity (PPP) at constant 2011 international dollar prices.  Healthy Life Expectancy (HLE): the time series of total life expectancy to healthy life expectancy by simple multiplication, assuming that the ratio remains constant within each country over the sample period.  Family: the national average of the binary responses (either 0 or 1) to the GWP question “If you were in trouble, do you have relatives or friends you can count on to help you whenever you need them, or not?”  Freedom: Freedom to make life choices is the national average of responses to the GWP question “Are you satisfied or dissatisfied with your freedom to choose what you do with your life?”.  Generosity: the residual of regressing national average of response to the GWP question “Have you donated money to a charity in the past month?” on GDP per capita.  Trust..Government.Corruption.: The measure is the national average of the survey responses to two questions in the GWP: “Is corruption widespread throughout the government or not” and “Is corruption widespread within businesses or not?” The overall perception is just the average of the two 0-or-1 responses.  Dystopia: an imaginary country that has the world’s least-happy people. The purpose in establishing Dystopia is to have a benchmark against which all
  • 2. 2017 WORLD HAPPINESS REPORT DATA ANALYSIS 2 countries can be favorably compared (no country performs more poorly than Dystopia) in terms of each of the six key variables, thus allowing each sub-bar to be of positive width. First, we import the data in Python: import pandas as pd # data processing import seaborn as sns import matplotlib.pyplot as plt my_data=pd.read_csv("../input/2017_world_hapiness.csv") my_data.head() II. Descriptive Statistics for the Happiness Score print(my_data['Happiness.Score'].describe()) plt.figure(figsize=(9, 8)) sns.distplot(my_data['Happiness.Score'], color='g', bins=10, hist_kws={'alpha': 0.4}); count 155.000000 mean 5.354019 std 1.131230 min 2.693000 25% 4.505500 50% 5.279000 75% 6.101500 max 7.537000 Name: Happiness.Score, dtype: float64 The mean Happiness Score worldwide is 5.354 which means that the global population is moderately satisfied by its way of life. The standard deviation is 1.1312 and the
  • 3. 2017 WORLD HAPPINESS REPORT DATA ANALYSIS 3 median is 5.279. From the above histogram we can conclude that the variable Happiness.Score seems to be normally distributed. III. Descriptive Statistics for all Variables my_data.describe() The mean GDP per capita worldwide is 0.984718 and the mean satisfaction with people’s freedom to choose what they do with their life is 0.408786. This can be considered as unsatisfactory with the freedom to make life choices. Additionally, the mean for the trust of Government corruption is 0.123120 which shows that it is mainly widespread throughout the government. IV. Boxplots for the variables boxplot = my_data.boxplot(column=['Happiness.Score', 'Economy..GDP.per.Capita.', 'Family', 'Health..Life.Expectancy.', 'Freedom', 'Generosity', 'Dystopia.Residual', 'Trust..Government.Corruption.'], figsize=(18,8))
  • 4. 2017 WORLD HAPPINESS REPORT DATA ANALYSIS 4 From the above boxplots we have the presence of extreme values for the variables Family, Generosity, Dystopia Residual and Trust Government corruption. Also, the variance is higher in the Happiness.Score variable comparing to the other variables. V. Histograms for all the variables my_data.hist(figsize=(16, 20), bins=20, xlabelsize=8, ylabelsize=8); From the above histograms it seems that:  Economy..GDP.per.capita, Family, Freedom, Healthy Life Expectancy (HLE) are left skewed
  • 5. 2017 WORLD HAPPINESS REPORT DATA ANALYSIS 5  Generosity and Trust..Government.Corruption. are right skewed. VI. Correlations with Happiness Score Next, we will investigate which variables are strongly correlated with Happiness Score. my_data_corr = my_data.corr()['Happiness.Score'][:-1] golden_features_list = my_data_corr[abs(my_data_corr) > 0.5].sort_values(ascending=False) print("There is {} strongly correlated values with Happiness.Score:n{}".format(len(golden_features_list), golden_features_list)) There is 8 strongly correlated values with Happiness.Score: Happiness.Score 1.000000 Economy..GDP.per.Capita. 0.812469 Health..Life.Expectancy. 0.781951 Family 0.752737 Freedom 0.570137 Happiness.Rank -0.992774 Name: Happiness.Score, dtype: float64 Economy.GDP.per.Capita, Health.Life.Expectancy, Family and Freedom are strongly correlated and have statistically significant correlations with Happiness Score. A heat map of the 8 strongly correlated values with Happiness.Score is presented below. corr = my_data.drop('Happiness.Rank', axis=1).corr() plt.figure(figsize=(12, 10)) sns.heatmap(corr[(corr >= 0.5) | (corr <= -0.4)], cmap='viridis', vmax=1.0, vmin=-1.0, linewidths=0.1, annot=True, annot_kws={"size": 8}, square=True);
  • 6. 2017 WORLD HAPPINESS REPORT DATA ANALYSIS 6 Higher GDP per capita, Family, Health life expectancy and Freedom levels seem to be significant factors for a higher Happiness Score. VII. Scatter dots plt.scatter(my_data['Happiness.Score'], my_data['Economy..GDP.per.Capita.'], edgecolors='r') plt.xlabel('Happiness Score') plt.ylabel('GDP per Capita') plt.show()
  • 7. 2017 WORLD HAPPINESS REPORT DATA ANALYSIS 7 plt.scatter(my_data['Happiness.Score'], my_data['Health..Life.Expectancy.'], edgecolors='g') plt.xlabel('Happiness Score') plt.ylabel('Health Life Expectancy') plt.show() plt.scatter(my_data['Happiness.Score'], my_data['Family'], edgecolors='c') plt.xlabel('Happiness Score') plt.ylabel('Family') plt.show() plt.scatter(my_data['Happiness.Score'], my_data['Freedom'], edgecolors='m') plt.xlabel('Happiness Score') plt.ylabel('Freedom') plt.show()
  • 8. 2017 WORLD HAPPINESS REPORT DATA ANALYSIS 8 We graphed happiness score with GDP per capita, Family, Health life expectancy and Freedom. From this, we can see a positive correlation. As the above variables increase so does the overall happiness score. This is very informative and gives us insight into why people are happy in certain countries. VIII. Conclusions The mean Happiness Score worldwide is 5.354 which indicates that there exists a moderate satisfaction from the global population. Economy.GDP.per.Capita, Health.Life.Expectancy, Family and Freedom are strongly correlated and have statistically significant correlations with Happiness Score, which is presented with a heat map and scatter dot diagrams. IX. Bibliography Helliwell John F., Huang Haifang and Wang Shun (2017), The social foundations of world happiness", World Happiness Report 2017