What are the reduceAdd, reduceSum , reduceRemove functions in crossfilter? How should they be used?

Remember that map reduce reduces a dataset by keys of a particular dimension. For example lets use a crossfilter instance with records: [ { name: “Gates”, age: 57, worth: 72000000000, gender: “m” }, { name: “Buffet”, age: 59, worth: 58000000000, gender: “m” }, { name: “Winfrey”, age: 83, worth: 2900000000, gender: “f” }, { name: … Read more

Is there a way to tell crossfilter to treat elements of array as separate records instead of treating whole array as single key?

Solved it myself, here’s fiddle with working code http://jsfiddle.net/uhXf5/6/ Here’s code in case someone will came across similar problem: function reduceAdd(p, v) { v.tags.forEach (function(val, idx) { p[val] = (p[val] || 0) + 1; //increment counts }); return p; } function reduceRemove(p, v) { v.tags.forEach (function(val, idx) { p[val] = (p[val] || 0) – 1; … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)