tempTable = {
let twoDims = flights
.groupby({
time0: (d) => op.round(d.time),
distance0: (d) => op.round(d.distance / 100) * 100
})
.rollup({
mean_speed: (d) => op.round(op.mean(d.distance / d.time)),
count: (d) => op.count()
})
.orderby("time0", "distance0")
.reify();
let oneDim = flights
.groupby({
time0: (d) => op.round(d.time)
})
.rollup({
mean_speed: (d) => op.round(op.mean(d.distance / d.time))
})
.orderby("time0")
.reify();
return append(oneDim, twoDims);
}