function compileHostSincePoints(points){
  var maxDaysInCohort = 0;
  var averageScoreArray = [];
  for (let p of points){
    maxDaysInCohort = Math.max(maxDaysInCohort, p.daysAsHost);
    averageScoreArray.push(p.score);
  }
  var averageScore = averageArray(averageScoreArray).toFixed(2);
  return {x:maxDaysInCohort,y:averageScore};
}
// Returns array with average score for given "days as host" cohort
Returns array with average score for given "days as host" cohort
Returns array with average score for given " days as host " cohort
function compileHostSincePoints(points){
  var maxDaysInCohort = 0;
  var averageScoreArray = [];
  for (let p of points){
    maxDaysInCohort = Math.max(maxDaysInCohort, p.daysAsHost);
    averageScoreArray.push(p.score);
  }
  var averageScore = averageArray(averageScoreArray).toFixed(2);
  return {x:maxDaysInCohort,y:averageScore};
}
function compileHostSincePoints ( points ) { var maxDaysInCohort = 0 ; var averageScoreArray = [ ] ; for ( let p of points ) { maxDaysInCohort = Math . max ( maxDaysInCohort , p . daysAsHost ) ; averageScoreArray . push ( p . score ) ; } var averageScore = averageArray ( averageScoreArray ) . toFixed ( 2 ) ; return { x : maxDaysInCohort , y : averageScore } ; }
Returns array with average score for given "days as host" cohort
Returns array with average score for given " days as host " cohort