Univariate k-Means Clustering with elbow method

Find the code for this at http://github.com/janfreyberg/shiny-elbow-kmeans. Find the accompanying blogpost at http://www.janfreyberg.com/blog/2017-01-27-interactive-univariate-clustering/ There's also a bivariate version of this (for two-dimensional data) at http://shiny.janfreyberg.com/elbow-kmeans-bivariate

Step 1: Data Entry

In the box below, enter your data in whatever format you'd like.

Step 2: Find the elbow

To identify where the elbow lies, you need to pick where the residual variation starts to decrease at a markedly lower rate. Pick that point in the plot above. In the default example, it would be at the third point from the left.

Step 3: Check the outcome

Make sure the clusters identified make sense in the plot above, and don't divide the data too finely.

Step 4: Get your results