Playing with cross tabulation and correlation in javascript