Published
Edited
Mar 2, 2020
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
sampleStats = function(arg){
updateButton;
let sample = selectedData.filter(
r => r['TRQUEUEDTIME'] >= arg.left && r['TRQUEUEDTIME'] < arg.right );
let outliers = sample.filter(
r => r['norm_DT'] > normDtStats.outlierThreshold);
let faultyTrRatio = outliers.length / sample.length;
let faultyTrLossSum = outliers.map(r=>r['DT']-r['TT_lowerbound']).reduce( (a,b) => +a+b );
let faultyTrLossAverage = faultyTrLossSum / outliers.length;
let trLossExpectation = faultyTrLossSum / sample.length;
return {
faultyTrRatio : faultyTrRatio,
faultyTrLossAverage : faultyTrLossAverage,
trLossExpectation : trLossExpectation,
faultyTrLossSum : faultyTrLossSum,
range : [arg.left, arg.right],
sample : sample,
outliers : outliers.sort( (a,b) => b['DT'] - a['DT'] )
};
//[brushedRegion.left, brushedRegion.right];
}(brushedRegion);
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
md `unsound transfer loss sum : ${(unsoundTransfers.map(r=>r['DT']-r['TT_lowerbound']).reduce( (a,b) => +a+b )).toFixed(2) } sec`
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
d3= require('d3')
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more