Skip to content

Commit e27ed77

Browse files
committed
closes #103, update documentation and demo
1 parent 9eb9fb9 commit e27ed77

File tree

17 files changed

+909
-6
lines changed

17 files changed

+909
-6
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ modelStudio_my_test.R
2525
[.]pkl$
2626
[.]pickle$
2727
[.]ipynb$
28+
^data-raw$

R/data.R

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#' World Happiness Report
2+
#'
3+
#' Datasets \code{happiness_train} and \code{happiness_test} are real data from the
4+
#' World Happiness Reports. Happiness is scored according to economic production,
5+
#' social support, etc. \code{happiness_train} accumulates the data from years 2015-2018,
6+
#' while \code{happiness_test} is the data from the year 2019, which imitates the
7+
#' out-of-time validation.
8+
#'
9+
#' The following columns: GDP per Capita, Social Support, Life Expectancy,
10+
#' Freedom, Generosity, Corruption describe the extent to which these factors
11+
#' contribute in evaluating the happiness in each country.
12+
#' \itemize{
13+
#' \item \textbf{score} - target variable, continuous value between 0 and 10 (regression)
14+
#' \item gdp_per_capita
15+
#' \item social_support
16+
#' \item healthy_life_expectancy
17+
#' \item freedom_life_choices
18+
#' \item generosity
19+
#' \item perceptions_of_corruption
20+
#' }
21+
#'
22+
#' @aliases happiness_test
23+
#' @docType data
24+
#' @name happiness_train
25+
#' @usage data(happiness_train); data(happiness_test)
26+
#' @format \code{happiness_train}: a data frame with 625 rows and 7 columns,
27+
#' \code{happiness_test}: a data frame with 156 rows and 7 columns
28+
NULL

R/modelStudio.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@
150150
#' explainer_HR <- explain(model_HR,
151151
#' data = HR_matrix,
152152
#' y = HR$status == "fired",
153+
#' type = "classification",
153154
#' label = "xgboost")
154155
#'
155156
#' # pick observations

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ library("ranger")
4141
library("modelStudio")
4242

4343
# fit a model
44-
model <- ranger(survived ~., data = titanic_imputed, probability = TRUE)
44+
model <- ranger(score ~., data = happiness_train)
4545

4646
# create an explainer for the model
4747
explainer <- explain(model,
48-
data = titanic_imputed,
49-
y = titanic_imputed$survived,
48+
data = happiness_test,
49+
y = happiness_test$score,
5050
label = "Random Forest")
5151

5252
# make a studio for the model

data-raw/2015.csv

Lines changed: 159 additions & 0 deletions
Large diffs are not rendered by default.

data-raw/2016.csv

Lines changed: 158 additions & 0 deletions
Large diffs are not rendered by default.

data-raw/2017.csv

Lines changed: 156 additions & 0 deletions
Large diffs are not rendered by default.

data-raw/2018.csv

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
Overall rank,Country or region,Score,GDP per capita,Social support,Healthy life expectancy,Freedom to make life choices,Generosity,Perceptions of corruption
2+
1,Finland,7.632,1.305,1.592,0.874,0.681,0.202,0.393
3+
2,Norway,7.594,1.456,1.582,0.861,0.686,0.286,0.340
4+
3,Denmark,7.555,1.351,1.590,0.868,0.683,0.284,0.408
5+
4,Iceland,7.495,1.343,1.644,0.914,0.677,0.353,0.138
6+
5,Switzerland,7.487,1.420,1.549,0.927,0.660,0.256,0.357
7+
6,Netherlands,7.441,1.361,1.488,0.878,0.638,0.333,0.295
8+
7,Canada,7.328,1.330,1.532,0.896,0.653,0.321,0.291
9+
8,New Zealand,7.324,1.268,1.601,0.876,0.669,0.365,0.389
10+
9,Sweden,7.314,1.355,1.501,0.913,0.659,0.285,0.383
11+
10,Australia,7.272,1.340,1.573,0.910,0.647,0.361,0.302
12+
11,United Kingdom,7.190,1.244,1.433,0.888,0.464,0.262,0.082
13+
12,Austria,7.139,1.341,1.504,0.891,0.617,0.242,0.224
14+
13,Costa Rica,7.072,1.010,1.459,0.817,0.632,0.143,0.101
15+
14,Ireland,6.977,1.448,1.583,0.876,0.614,0.307,0.306
16+
15,Germany,6.965,1.340,1.474,0.861,0.586,0.273,0.280
17+
16,Belgium,6.927,1.324,1.483,0.894,0.583,0.188,0.240
18+
17,Luxembourg,6.910,1.576,1.520,0.896,0.632,0.196,0.321
19+
18,United States,6.886,1.398,1.471,0.819,0.547,0.291,0.133
20+
19,Israel,6.814,1.301,1.559,0.883,0.533,0.354,0.272
21+
20,United Arab Emirates,6.774,2.096,0.776,0.670,0.284,0.186,N/A
22+
21,Czech Republic,6.711,1.233,1.489,0.854,0.543,0.064,0.034
23+
22,Malta,6.627,1.270,1.525,0.884,0.645,0.376,0.142
24+
23,France,6.489,1.293,1.466,0.908,0.520,0.098,0.176
25+
24,Mexico,6.488,1.038,1.252,0.761,0.479,0.069,0.095
26+
25,Chile,6.476,1.131,1.331,0.808,0.431,0.197,0.061
27+
26,Taiwan,6.441,1.365,1.436,0.857,0.418,0.151,0.078
28+
27,Panama,6.430,1.112,1.438,0.759,0.597,0.125,0.063
29+
28,Brazil,6.419,0.986,1.474,0.675,0.493,0.110,0.088
30+
29,Argentina,6.388,1.073,1.468,0.744,0.570,0.062,0.054
31+
30,Guatemala,6.382,0.781,1.268,0.608,0.604,0.179,0.071
32+
31,Uruguay,6.379,1.093,1.459,0.771,0.625,0.130,0.155
33+
32,Qatar,6.374,1.649,1.303,0.748,0.654,0.256,0.171
34+
33,Saudi Arabia,6.371,1.379,1.331,0.633,0.509,0.098,0.127
35+
34,Singapore,6.343,1.529,1.451,1.008,0.631,0.261,0.457
36+
35,Malaysia,6.322,1.161,1.258,0.669,0.356,0.311,0.059
37+
36,Spain,6.310,1.251,1.538,0.965,0.449,0.142,0.074
38+
37,Colombia,6.260,0.960,1.439,0.635,0.531,0.099,0.039
39+
38,Trinidad & Tobago,6.192,1.223,1.492,0.564,0.575,0.171,0.019
40+
39,Slovakia,6.173,1.210,1.537,0.776,0.354,0.118,0.014
41+
40,El Salvador,6.167,0.806,1.231,0.639,0.461,0.065,0.082
42+
41,Nicaragua,6.141,0.668,1.319,0.700,0.527,0.208,0.128
43+
42,Poland,6.123,1.176,1.448,0.781,0.546,0.108,0.064
44+
43,Bahrain,6.105,1.338,1.366,0.698,0.594,0.243,0.123
45+
44,Uzbekistan,6.096,0.719,1.584,0.605,0.724,0.328,0.259
46+
45,Kuwait,6.083,1.474,1.301,0.675,0.554,0.167,0.106
47+
46,Thailand,6.072,1.016,1.417,0.707,0.637,0.364,0.029
48+
47,Italy,6.000,1.264,1.501,0.946,0.281,0.137,0.028
49+
48,Ecuador,5.973,0.889,1.330,0.736,0.556,0.114,0.120
50+
49,Belize,5.956,0.807,1.101,0.474,0.593,0.183,0.089
51+
50,Lithuania,5.952,1.197,1.527,0.716,0.350,0.026,0.006
52+
51,Slovenia,5.948,1.219,1.506,0.856,0.633,0.160,0.051
53+
52,Romania,5.945,1.116,1.219,0.726,0.528,0.088,0.001
54+
53,Latvia,5.933,1.148,1.454,0.671,0.363,0.092,0.066
55+
54,Japan,5.915,1.294,1.462,0.988,0.553,0.079,0.150
56+
55,Mauritius,5.891,1.090,1.387,0.684,0.584,0.245,0.050
57+
56,Jamaica,5.890,0.819,1.493,0.693,0.575,0.096,0.031
58+
57,South Korea,5.875,1.266,1.204,0.955,0.244,0.175,0.051
59+
58,Northern Cyprus,5.835,1.229,1.211,0.909,0.495,0.179,0.154
60+
59,Russia,5.810,1.151,1.479,0.599,0.399,0.065,0.025
61+
60,Kazakhstan,5.790,1.143,1.516,0.631,0.454,0.148,0.121
62+
61,Cyprus,5.762,1.229,1.191,0.909,0.423,0.202,0.035
63+
62,Bolivia,5.752,0.751,1.223,0.508,0.606,0.141,0.054
64+
63,Estonia,5.739,1.200,1.532,0.737,0.553,0.086,0.174
65+
64,Paraguay,5.681,0.835,1.522,0.615,0.541,0.162,0.074
66+
65,Peru,5.663,0.934,1.249,0.674,0.530,0.092,0.034
67+
66,Kosovo,5.662,0.855,1.230,0.578,0.448,0.274,0.023
68+
67,Moldova,5.640,0.657,1.301,0.620,0.232,0.171,0.000
69+
68,Turkmenistan,5.636,1.016,1.533,0.517,0.417,0.199,0.037
70+
69,Hungary,5.620,1.171,1.401,0.732,0.259,0.061,0.022
71+
70,Libya,5.566,0.985,1.350,0.553,0.496,0.116,0.148
72+
71,Philippines,5.524,0.775,1.312,0.513,0.643,0.120,0.105
73+
72,Honduras,5.504,0.620,1.205,0.622,0.459,0.197,0.074
74+
73,Belarus,5.483,1.039,1.498,0.700,0.307,0.101,0.154
75+
74,Turkey,5.483,1.148,1.380,0.686,0.324,0.106,0.109
76+
75,Pakistan,5.472,0.652,0.810,0.424,0.334,0.216,0.113
77+
76,Hong Kong,5.430,1.405,1.290,1.030,0.524,0.246,0.291
78+
77,Portugal,5.410,1.188,1.429,0.884,0.562,0.055,0.017
79+
78,Serbia,5.398,0.975,1.369,0.685,0.288,0.134,0.043
80+
79,Greece,5.358,1.154,1.202,0.879,0.131,0.000,0.044
81+
80,Lebanon,5.358,0.965,1.179,0.785,0.503,0.214,0.136
82+
81,Montenegro,5.347,1.017,1.279,0.729,0.259,0.111,0.081
83+
82,Croatia,5.321,1.115,1.161,0.737,0.380,0.120,0.039
84+
83,Dominican Republic,5.302,0.982,1.441,0.614,0.578,0.120,0.106
85+
84,Algeria,5.295,0.979,1.154,0.687,0.077,0.055,0.135
86+
85,Morocco,5.254,0.779,0.797,0.669,0.460,0.026,0.074
87+
86,China,5.246,0.989,1.142,0.799,0.597,0.029,0.103
88+
87,Azerbaijan,5.201,1.024,1.161,0.603,0.430,0.031,0.176
89+
88,Tajikistan,5.199,0.474,1.166,0.598,0.292,0.187,0.034
90+
89,Macedonia,5.185,0.959,1.239,0.691,0.394,0.173,0.052
91+
90,Jordan,5.161,0.822,1.265,0.645,0.468,0.130,0.134
92+
91,Nigeria,5.155,0.689,1.172,0.048,0.462,0.201,0.032
93+
92,Kyrgyzstan,5.131,0.530,1.416,0.594,0.540,0.281,0.035
94+
93,Bosnia and Herzegovina,5.129,0.915,1.078,0.758,0.280,0.216,0.000
95+
94,Mongolia,5.125,0.914,1.517,0.575,0.395,0.253,0.032
96+
95,Vietnam,5.103,0.715,1.365,0.702,0.618,0.177,0.079
97+
96,Indonesia,5.093,0.899,1.215,0.522,0.538,0.484,0.018
98+
97,Bhutan,5.082,0.796,1.335,0.527,0.541,0.364,0.171
99+
98,Somalia,4.982,0.000,0.712,0.115,0.674,0.238,0.282
100+
99,Cameroon,4.975,0.535,0.891,0.182,0.454,0.183,0.043
101+
100,Bulgaria,4.933,1.054,1.515,0.712,0.359,0.064,0.009
102+
101,Nepal,4.880,0.425,1.228,0.539,0.526,0.302,0.078
103+
102,Venezuela,4.806,0.996,1.469,0.657,0.133,0.056,0.052
104+
103,Gabon,4.758,1.036,1.164,0.404,0.356,0.032,0.052
105+
104,Palestinian Territories,4.743,0.642,1.217,0.602,0.266,0.086,0.076
106+
105,South Africa,4.724,0.940,1.410,0.330,0.516,0.103,0.056
107+
106,Iran,4.707,1.059,0.771,0.691,0.459,0.282,0.129
108+
107,Ivory Coast,4.671,0.541,0.872,0.080,0.467,0.146,0.103
109+
108,Ghana,4.657,0.592,0.896,0.337,0.499,0.212,0.029
110+
109,Senegal,4.631,0.429,1.117,0.433,0.406,0.138,0.082
111+
110,Laos,4.623,0.720,1.034,0.441,0.626,0.230,0.174
112+
111,Tunisia,4.592,0.900,0.906,0.690,0.271,0.040,0.063
113+
112,Albania,4.586,0.916,0.817,0.790,0.419,0.149,0.032
114+
113,Sierra Leone,4.571,0.256,0.813,0.000,0.355,0.238,0.053
115+
114,Congo (Brazzaville),4.559,0.682,0.811,0.343,0.514,0.091,0.077
116+
115,Bangladesh,4.500,0.532,0.850,0.579,0.580,0.153,0.144
117+
116,Sri Lanka,4.471,0.918,1.314,0.672,0.585,0.307,0.050
118+
117,Iraq,4.456,1.010,0.971,0.536,0.304,0.148,0.095
119+
118,Mali,4.447,0.370,1.233,0.152,0.367,0.139,0.056
120+
119,Namibia,4.441,0.874,1.281,0.365,0.519,0.051,0.064
121+
120,Cambodia,4.433,0.549,1.088,0.457,0.696,0.256,0.065
122+
121,Burkina Faso,4.424,0.314,1.097,0.254,0.312,0.175,0.128
123+
122,Egypt,4.419,0.885,1.025,0.553,0.312,0.092,0.107
124+
123,Mozambique,4.417,0.198,0.902,0.173,0.531,0.206,0.158
125+
124,Kenya,4.410,0.493,1.048,0.454,0.504,0.352,0.055
126+
125,Zambia,4.377,0.562,1.047,0.295,0.503,0.221,0.082
127+
126,Mauritania,4.356,0.557,1.245,0.292,0.129,0.134,0.093
128+
127,Ethiopia,4.350,0.308,0.950,0.391,0.452,0.220,0.146
129+
128,Georgia,4.340,0.853,0.592,0.643,0.375,0.038,0.215
130+
129,Armenia,4.321,0.816,0.990,0.666,0.260,0.077,0.028
131+
130,Myanmar,4.308,0.682,1.174,0.429,0.580,0.598,0.178
132+
131,Chad,4.301,0.358,0.907,0.053,0.189,0.181,0.060
133+
132,Congo (Kinshasa),4.245,0.069,1.136,0.204,0.312,0.197,0.052
134+
133,India,4.190,0.721,0.747,0.485,0.539,0.172,0.093
135+
134,Niger,4.166,0.131,0.867,0.221,0.390,0.175,0.099
136+
135,Uganda,4.161,0.322,1.090,0.237,0.450,0.259,0.061
137+
136,Benin,4.141,0.378,0.372,0.240,0.440,0.163,0.067
138+
137,Sudan,4.139,0.605,1.240,0.312,0.016,0.134,0.082
139+
138,Ukraine,4.103,0.793,1.413,0.609,0.163,0.187,0.011
140+
139,Togo,3.999,0.259,0.474,0.253,0.434,0.158,0.101
141+
140,Guinea,3.964,0.344,0.792,0.211,0.394,0.185,0.094
142+
141,Lesotho,3.808,0.472,1.215,0.079,0.423,0.116,0.112
143+
142,Angola,3.795,0.730,1.125,0.269,0.000,0.079,0.061
144+
143,Madagascar,3.774,0.262,0.908,0.402,0.221,0.155,0.049
145+
144,Zimbabwe,3.692,0.357,1.094,0.248,0.406,0.132,0.099
146+
145,Afghanistan,3.632,0.332,0.537,0.255,0.085,0.191,0.036
147+
146,Botswana,3.590,1.017,1.174,0.417,0.557,0.042,0.092
148+
147,Malawi,3.587,0.186,0.541,0.306,0.531,0.210,0.080
149+
148,Haiti,3.582,0.315,0.714,0.289,0.025,0.392,0.104
150+
149,Liberia,3.495,0.076,0.858,0.267,0.419,0.206,0.030
151+
150,Syria,3.462,0.689,0.382,0.539,0.088,0.376,0.144
152+
151,Rwanda,3.408,0.332,0.896,0.400,0.636,0.200,0.444
153+
152,Yemen,3.355,0.442,1.073,0.343,0.244,0.083,0.064
154+
153,Tanzania,3.303,0.455,0.991,0.381,0.481,0.270,0.097
155+
154,South Sudan,3.254,0.337,0.608,0.177,0.112,0.224,0.106
156+
155,Central African Republic,3.083,0.024,0.000,0.010,0.305,0.218,0.038
157+
156,Burundi,2.905,0.091,0.627,0.145,0.065,0.149,0.076

data-raw/2019.csv

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
Overall rank,Country or region,Score,GDP per capita,Social support,Healthy life expectancy,Freedom to make life choices,Generosity,Perceptions of corruption
2+
1,Finland,7.769,1.340,1.587,0.986,0.596,0.153,0.393
3+
2,Denmark,7.600,1.383,1.573,0.996,0.592,0.252,0.410
4+
3,Norway,7.554,1.488,1.582,1.028,0.603,0.271,0.341
5+
4,Iceland,7.494,1.380,1.624,1.026,0.591,0.354,0.118
6+
5,Netherlands,7.488,1.396,1.522,0.999,0.557,0.322,0.298
7+
6,Switzerland,7.480,1.452,1.526,1.052,0.572,0.263,0.343
8+
7,Sweden,7.343,1.387,1.487,1.009,0.574,0.267,0.373
9+
8,New Zealand,7.307,1.303,1.557,1.026,0.585,0.330,0.380
10+
9,Canada,7.278,1.365,1.505,1.039,0.584,0.285,0.308
11+
10,Austria,7.246,1.376,1.475,1.016,0.532,0.244,0.226
12+
11,Australia,7.228,1.372,1.548,1.036,0.557,0.332,0.290
13+
12,Costa Rica,7.167,1.034,1.441,0.963,0.558,0.144,0.093
14+
13,Israel,7.139,1.276,1.455,1.029,0.371,0.261,0.082
15+
14,Luxembourg,7.090,1.609,1.479,1.012,0.526,0.194,0.316
16+
15,United Kingdom,7.054,1.333,1.538,0.996,0.450,0.348,0.278
17+
16,Ireland,7.021,1.499,1.553,0.999,0.516,0.298,0.310
18+
17,Germany,6.985,1.373,1.454,0.987,0.495,0.261,0.265
19+
18,Belgium,6.923,1.356,1.504,0.986,0.473,0.160,0.210
20+
19,United States,6.892,1.433,1.457,0.874,0.454,0.280,0.128
21+
20,Czech Republic,6.852,1.269,1.487,0.920,0.457,0.046,0.036
22+
21,United Arab Emirates,6.825,1.503,1.310,0.825,0.598,0.262,0.182
23+
22,Malta,6.726,1.300,1.520,0.999,0.564,0.375,0.151
24+
23,Mexico,6.595,1.070,1.323,0.861,0.433,0.074,0.073
25+
24,France,6.592,1.324,1.472,1.045,0.436,0.111,0.183
26+
25,Taiwan,6.446,1.368,1.430,0.914,0.351,0.242,0.097
27+
26,Chile,6.444,1.159,1.369,0.920,0.357,0.187,0.056
28+
27,Guatemala,6.436,0.800,1.269,0.746,0.535,0.175,0.078
29+
28,Saudi Arabia,6.375,1.403,1.357,0.795,0.439,0.080,0.132
30+
29,Qatar,6.374,1.684,1.313,0.871,0.555,0.220,0.167
31+
30,Spain,6.354,1.286,1.484,1.062,0.362,0.153,0.079
32+
31,Panama,6.321,1.149,1.442,0.910,0.516,0.109,0.054
33+
32,Brazil,6.300,1.004,1.439,0.802,0.390,0.099,0.086
34+
33,Uruguay,6.293,1.124,1.465,0.891,0.523,0.127,0.150
35+
34,Singapore,6.262,1.572,1.463,1.141,0.556,0.271,0.453
36+
35,El Salvador,6.253,0.794,1.242,0.789,0.430,0.093,0.074
37+
36,Italy,6.223,1.294,1.488,1.039,0.231,0.158,0.030
38+
37,Bahrain,6.199,1.362,1.368,0.871,0.536,0.255,0.110
39+
38,Slovakia,6.198,1.246,1.504,0.881,0.334,0.121,0.014
40+
39,Trinidad & Tobago,6.192,1.231,1.477,0.713,0.489,0.185,0.016
41+
40,Poland,6.182,1.206,1.438,0.884,0.483,0.117,0.050
42+
41,Uzbekistan,6.174,0.745,1.529,0.756,0.631,0.322,0.240
43+
42,Lithuania,6.149,1.238,1.515,0.818,0.291,0.043,0.042
44+
43,Colombia,6.125,0.985,1.410,0.841,0.470,0.099,0.034
45+
44,Slovenia,6.118,1.258,1.523,0.953,0.564,0.144,0.057
46+
45,Nicaragua,6.105,0.694,1.325,0.835,0.435,0.200,0.127
47+
46,Kosovo,6.100,0.882,1.232,0.758,0.489,0.262,0.006
48+
47,Argentina,6.086,1.092,1.432,0.881,0.471,0.066,0.050
49+
48,Romania,6.070,1.162,1.232,0.825,0.462,0.083,0.005
50+
49,Cyprus,6.046,1.263,1.223,1.042,0.406,0.190,0.041
51+
50,Ecuador,6.028,0.912,1.312,0.868,0.498,0.126,0.087
52+
51,Kuwait,6.021,1.500,1.319,0.808,0.493,0.142,0.097
53+
52,Thailand,6.008,1.050,1.409,0.828,0.557,0.359,0.028
54+
53,Latvia,5.940,1.187,1.465,0.812,0.264,0.075,0.064
55+
54,South Korea,5.895,1.301,1.219,1.036,0.159,0.175,0.056
56+
55,Estonia,5.893,1.237,1.528,0.874,0.495,0.103,0.161
57+
56,Jamaica,5.890,0.831,1.478,0.831,0.490,0.107,0.028
58+
57,Mauritius,5.888,1.120,1.402,0.798,0.498,0.215,0.060
59+
58,Japan,5.886,1.327,1.419,1.088,0.445,0.069,0.140
60+
59,Honduras,5.860,0.642,1.236,0.828,0.507,0.246,0.078
61+
60,Kazakhstan,5.809,1.173,1.508,0.729,0.410,0.146,0.096
62+
61,Bolivia,5.779,0.776,1.209,0.706,0.511,0.137,0.064
63+
62,Hungary,5.758,1.201,1.410,0.828,0.199,0.081,0.020
64+
63,Paraguay,5.743,0.855,1.475,0.777,0.514,0.184,0.080
65+
64,Northern Cyprus,5.718,1.263,1.252,1.042,0.417,0.191,0.162
66+
65,Peru,5.697,0.960,1.274,0.854,0.455,0.083,0.027
67+
66,Portugal,5.693,1.221,1.431,0.999,0.508,0.047,0.025
68+
67,Pakistan,5.653,0.677,0.886,0.535,0.313,0.220,0.098
69+
68,Russia,5.648,1.183,1.452,0.726,0.334,0.082,0.031
70+
69,Philippines,5.631,0.807,1.293,0.657,0.558,0.117,0.107
71+
70,Serbia,5.603,1.004,1.383,0.854,0.282,0.137,0.039
72+
71,Moldova,5.529,0.685,1.328,0.739,0.245,0.181,0.000
73+
72,Libya,5.525,1.044,1.303,0.673,0.416,0.133,0.152
74+
73,Montenegro,5.523,1.051,1.361,0.871,0.197,0.142,0.080
75+
74,Tajikistan,5.467,0.493,1.098,0.718,0.389,0.230,0.144
76+
75,Croatia,5.432,1.155,1.266,0.914,0.296,0.119,0.022
77+
76,Hong Kong,5.430,1.438,1.277,1.122,0.440,0.258,0.287
78+
77,Dominican Republic,5.425,1.015,1.401,0.779,0.497,0.113,0.101
79+
78,Bosnia and Herzegovina,5.386,0.945,1.212,0.845,0.212,0.263,0.006
80+
79,Turkey,5.373,1.183,1.360,0.808,0.195,0.083,0.106
81+
80,Malaysia,5.339,1.221,1.171,0.828,0.508,0.260,0.024
82+
81,Belarus,5.323,1.067,1.465,0.789,0.235,0.094,0.142
83+
82,Greece,5.287,1.181,1.156,0.999,0.067,0.000,0.034
84+
83,Mongolia,5.285,0.948,1.531,0.667,0.317,0.235,0.038
85+
84,North Macedonia,5.274,0.983,1.294,0.838,0.345,0.185,0.034
86+
85,Nigeria,5.265,0.696,1.111,0.245,0.426,0.215,0.041
87+
86,Kyrgyzstan,5.261,0.551,1.438,0.723,0.508,0.300,0.023
88+
87,Turkmenistan,5.247,1.052,1.538,0.657,0.394,0.244,0.028
89+
88,Algeria,5.211,1.002,1.160,0.785,0.086,0.073,0.114
90+
89,Morocco,5.208,0.801,0.782,0.782,0.418,0.036,0.076
91+
90,Azerbaijan,5.208,1.043,1.147,0.769,0.351,0.035,0.182
92+
91,Lebanon,5.197,0.987,1.224,0.815,0.216,0.166,0.027
93+
92,Indonesia,5.192,0.931,1.203,0.660,0.491,0.498,0.028
94+
93,China,5.191,1.029,1.125,0.893,0.521,0.058,0.100
95+
94,Vietnam,5.175,0.741,1.346,0.851,0.543,0.147,0.073
96+
95,Bhutan,5.082,0.813,1.321,0.604,0.457,0.370,0.167
97+
96,Cameroon,5.044,0.549,0.910,0.331,0.381,0.187,0.037
98+
97,Bulgaria,5.011,1.092,1.513,0.815,0.311,0.081,0.004
99+
98,Ghana,4.996,0.611,0.868,0.486,0.381,0.245,0.040
100+
99,Ivory Coast,4.944,0.569,0.808,0.232,0.352,0.154,0.090
101+
100,Nepal,4.913,0.446,1.226,0.677,0.439,0.285,0.089
102+
101,Jordan,4.906,0.837,1.225,0.815,0.383,0.110,0.130
103+
102,Benin,4.883,0.393,0.437,0.397,0.349,0.175,0.082
104+
103,Congo (Brazzaville),4.812,0.673,0.799,0.508,0.372,0.105,0.093
105+
104,Gabon,4.799,1.057,1.183,0.571,0.295,0.043,0.055
106+
105,Laos,4.796,0.764,1.030,0.551,0.547,0.266,0.164
107+
106,South Africa,4.722,0.960,1.351,0.469,0.389,0.130,0.055
108+
107,Albania,4.719,0.947,0.848,0.874,0.383,0.178,0.027
109+
108,Venezuela,4.707,0.960,1.427,0.805,0.154,0.064,0.047
110+
109,Cambodia,4.700,0.574,1.122,0.637,0.609,0.232,0.062
111+
110,Palestinian Territories,4.696,0.657,1.247,0.672,0.225,0.103,0.066
112+
111,Senegal,4.681,0.450,1.134,0.571,0.292,0.153,0.072
113+
112,Somalia,4.668,0.000,0.698,0.268,0.559,0.243,0.270
114+
113,Namibia,4.639,0.879,1.313,0.477,0.401,0.070,0.056
115+
114,Niger,4.628,0.138,0.774,0.366,0.318,0.188,0.102
116+
115,Burkina Faso,4.587,0.331,1.056,0.380,0.255,0.177,0.113
117+
116,Armenia,4.559,0.850,1.055,0.815,0.283,0.095,0.064
118+
117,Iran,4.548,1.100,0.842,0.785,0.305,0.270,0.125
119+
118,Guinea,4.534,0.380,0.829,0.375,0.332,0.207,0.086
120+
119,Georgia,4.519,0.886,0.666,0.752,0.346,0.043,0.164
121+
120,Gambia,4.516,0.308,0.939,0.428,0.382,0.269,0.167
122+
121,Kenya,4.509,0.512,0.983,0.581,0.431,0.372,0.053
123+
122,Mauritania,4.490,0.570,1.167,0.489,0.066,0.106,0.088
124+
123,Mozambique,4.466,0.204,0.986,0.390,0.494,0.197,0.138
125+
124,Tunisia,4.461,0.921,1.000,0.815,0.167,0.059,0.055
126+
125,Bangladesh,4.456,0.562,0.928,0.723,0.527,0.166,0.143
127+
126,Iraq,4.437,1.043,0.980,0.574,0.241,0.148,0.089
128+
127,Congo (Kinshasa),4.418,0.094,1.125,0.357,0.269,0.212,0.053
129+
128,Mali,4.390,0.385,1.105,0.308,0.327,0.153,0.052
130+
129,Sierra Leone,4.374,0.268,0.841,0.242,0.309,0.252,0.045
131+
130,Sri Lanka,4.366,0.949,1.265,0.831,0.470,0.244,0.047
132+
131,Myanmar,4.360,0.710,1.181,0.555,0.525,0.566,0.172
133+
132,Chad,4.350,0.350,0.766,0.192,0.174,0.198,0.078
134+
133,Ukraine,4.332,0.820,1.390,0.739,0.178,0.187,0.010
135+
134,Ethiopia,4.286,0.336,1.033,0.532,0.344,0.209,0.100
136+
135,Swaziland,4.212,0.811,1.149,0.000,0.313,0.074,0.135
137+
136,Uganda,4.189,0.332,1.069,0.443,0.356,0.252,0.060
138+
137,Egypt,4.166,0.913,1.039,0.644,0.241,0.076,0.067
139+
138,Zambia,4.107,0.578,1.058,0.426,0.431,0.247,0.087
140+
139,Togo,4.085,0.275,0.572,0.410,0.293,0.177,0.085
141+
140,India,4.015,0.755,0.765,0.588,0.498,0.200,0.085
142+
141,Liberia,3.975,0.073,0.922,0.443,0.370,0.233,0.033
143+
142,Comoros,3.973,0.274,0.757,0.505,0.142,0.275,0.078
144+
143,Madagascar,3.933,0.274,0.916,0.555,0.148,0.169,0.041
145+
144,Lesotho,3.802,0.489,1.169,0.168,0.359,0.107,0.093
146+
145,Burundi,3.775,0.046,0.447,0.380,0.220,0.176,0.180
147+
146,Zimbabwe,3.663,0.366,1.114,0.433,0.361,0.151,0.089
148+
147,Haiti,3.597,0.323,0.688,0.449,0.026,0.419,0.110
149+
148,Botswana,3.488,1.041,1.145,0.538,0.455,0.025,0.100
150+
149,Syria,3.462,0.619,0.378,0.440,0.013,0.331,0.141
151+
150,Malawi,3.410,0.191,0.560,0.495,0.443,0.218,0.089
152+
151,Yemen,3.380,0.287,1.163,0.463,0.143,0.108,0.077
153+
152,Rwanda,3.334,0.359,0.711,0.614,0.555,0.217,0.411
154+
153,Tanzania,3.231,0.476,0.885,0.499,0.417,0.276,0.147
155+
154,Afghanistan,3.203,0.350,0.517,0.361,0.000,0.158,0.025
156+
155,Central African Republic,3.083,0.026,0.000,0.105,0.225,0.235,0.035
157+
156,South Sudan,2.853,0.306,0.575,0.295,0.010,0.202,0.091

data-raw/LICENSE.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
LICENSE: CC0: Public Domain
2+
SOURCE: https://www.kaggle.com/unsdsn/world-happiness

0 commit comments

Comments
 (0)