Load raw data

Simple exploratory analysis

Note that all features have quite different variances, and Corruption and Legal are highly correlated.

Plot histogram

Note that distributions for GDP Growth is quite skewed.

K means cluster

Pick features & normalization

Since Corruption and Legal are highly correlated, we drop the Courrption variable, i.e., we pick three features for this analysis, Peace, Legal and GDP Grwoth. Let's normalize all the features, effectively making them equally weighted.

Ref. Feature normalization.

Perform elbow method

The marginal gain of adding one cluster dropped quite a bit from k=3 to k=4. We will choose k=3 (not a clear cut though).

Ref. Determining the number of clusters in a dataset.

K means with k=3

Visualize the result (3D plot)

Visualize the result (3 2D plots)

Visualize the result (3 2D plots)

plot country abbreviations instead of dots.

List the result