I have the following problem, I want to make a boxplot (with dc.js) per service (A, B, C, D) to represent (q1, q2, q3, q4 and outliers) the time each is delayed.
My data contains an id, category, the time it takes and other data, the problem is that I have is that I have repeated rows due to the other additional data that are important to have for other graphics.
For example,
Id / category / time / other data
1 / B / 2 / ...
155 / A / 51 / ..
155 / A / 51 / ..
156 / A / "NaN" / ..
157 / C / 10 / ..
etc
Before adding the additional data, I had no problem with the repeated data and used the following code.
var categorydim=ndx.dimension(function(d){return d["category"]});
var categorydim.group().reduce(
function(p,v){
if (v["time"]>0.){
p.push(v["time"])};
return p;
},
function(p,v){
if (v["time"]>0.){
p.splice(p.indexOf(v["time"]),1)};
return p;
},
function(){
return[];
}
)
But now I must for example stay with a single value of id 155. Do you have any idea to do it in crossfilter? Or with reductio.js?
How to exclude repeated data?