How to use percentile - 8 common examples

To help you get started, we’ve selected a few percentile examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github newrelic / nr1-browser-analyzer / component / stat-utils.js View on Github external
function fillObject(obj, sample, cohort, bounceCohort) {
  if (cohort) {
    obj.raw.cohort = Object.assign({}, cohort);
    obj.sessions = numeral(cohort.sessions).format("0,0");
    obj.pageviews = cohort.pageviews;
    obj.medianDuration = parseFloat(cohort.medianDuration["50"]).toFixed(2);
    obj.avgPageViews = parseFloat(cohort.avgPageViews).toFixed(2);
    obj.duration75 = parseFloat(cohort["percentile.duration"]["75"]).toFixed(2);
    obj.duration95 = parseFloat(cohort["percentile.duration"]["95"]).toFixed(2);
    obj.duration99 = parseFloat(cohort["percentile.duration"]["99"]).toFixed(2);
  }
  if (sample) {
    obj.raw.sample = Object.assign({}, sample);
    obj.totalSessionLength = calcTotalSessionLength(sample.results),
    obj.totalSamples = sample.results.length,
    obj.bounces = calcBounces(sample.results);
  }
  if (bounceCohort) {
    obj.raw.bounceCohort = Object.assign({}, bounceCohort);
    obj.bounces = bounceCohort.steps[0] - bounceCohort.steps[1];
    obj.totalSamples = bounceCohort.steps[0];
  }
  return obj;
}
github newrelic / nr1-browser-analyzer / component / stat-utils.js View on Github external
function fillObject(obj, sample, cohort, bounceCohort) {
  if (cohort) {
    obj.raw.cohort = Object.assign({}, cohort);
    obj.sessions = numeral(cohort.sessions).format("0,0");
    obj.pageviews = cohort.pageviews;
    obj.medianDuration = parseFloat(cohort.medianDuration["50"]).toFixed(2);
    obj.avgPageViews = parseFloat(cohort.avgPageViews).toFixed(2);
    obj.duration75 = parseFloat(cohort["percentile.duration"]["75"]).toFixed(2);
    obj.duration95 = parseFloat(cohort["percentile.duration"]["95"]).toFixed(2);
    obj.duration99 = parseFloat(cohort["percentile.duration"]["99"]).toFixed(2);
  }
  if (sample) {
    obj.raw.sample = Object.assign({}, sample);
    obj.totalSessionLength = calcTotalSessionLength(sample.results),
    obj.totalSamples = sample.results.length,
    obj.bounces = calcBounces(sample.results);
  }
  if (bounceCohort) {
    obj.raw.bounceCohort = Object.assign({}, bounceCohort);
    obj.bounces = bounceCohort.steps[0] - bounceCohort.steps[1];
    obj.totalSamples = bounceCohort.steps[0];
  }
  return obj;
}
github newrelic / nr1-browser-analyzer / component / stat-utils.js View on Github external
function fillObject(obj, sample, cohort, bounceCohort) {
  if (cohort) {
    obj.raw.cohort = Object.assign({}, cohort);
    obj.sessions = numeral(cohort.sessions).format("0,0");
    obj.pageviews = cohort.pageviews;
    obj.medianDuration = parseFloat(cohort.medianDuration["50"]).toFixed(2);
    obj.avgPageViews = parseFloat(cohort.avgPageViews).toFixed(2);
    obj.duration75 = parseFloat(cohort["percentile.duration"]["75"]).toFixed(2);
    obj.duration95 = parseFloat(cohort["percentile.duration"]["95"]).toFixed(2);
    obj.duration99 = parseFloat(cohort["percentile.duration"]["99"]).toFixed(2);
  }
  if (sample) {
    obj.raw.sample = Object.assign({}, sample);
    obj.totalSessionLength = calcTotalSessionLength(sample.results),
    obj.totalSamples = sample.results.length,
    obj.bounces = calcBounces(sample.results);
  }
  if (bounceCohort) {
    obj.raw.bounceCohort = Object.assign({}, bounceCohort);
    obj.bounces = bounceCohort.steps[0] - bounceCohort.steps[1];
    obj.totalSamples = bounceCohort.steps[0];
  }
  return obj;
}
github studentinsights / studentinsights / app / assets / javascripts / components / BoxAndWhisker.js View on Github external
function percentiles(values) {
  return [
    percentile(0, values),
    percentile(25, values),
    percentile(50, values),
    percentile(75, values),
    percentile(100, values)
  ];
}
github studentinsights / studentinsights / app / assets / javascripts / components / BoxAndWhisker.js View on Github external
function percentiles(values) {
  return [
    percentile(0, values),
    percentile(25, values),
    percentile(50, values),
    percentile(75, values),
    percentile(100, values)
  ];
}
github studentinsights / studentinsights / app / assets / javascripts / components / BoxAndWhisker.js View on Github external
function percentiles(values) {
  return [
    percentile(0, values),
    percentile(25, values),
    percentile(50, values),
    percentile(75, values),
    percentile(100, values)
  ];
}
github studentinsights / studentinsights / app / assets / javascripts / components / BoxAndWhisker.js View on Github external
function percentiles(values) {
  return [
    percentile(0, values),
    percentile(25, values),
    percentile(50, values),
    percentile(75, values),
    percentile(100, values)
  ];
}
github studentinsights / studentinsights / app / assets / javascripts / components / BoxAndWhisker.js View on Github external
function percentiles(values) {
  return [
    percentile(0, values),
    percentile(25, values),
    percentile(50, values),
    percentile(75, values),
    percentile(100, values)
  ];
}

percentile

Calculate a percentile for given array of values

MIT
Latest version published 3 years ago

Package Health Score

47 / 100
Full package analysis

Popular percentile functions