K means get and prepare data