Nathan Reese Nathan Reese - 8 months ago 39
Javascript Question

Can someone expand upon some common Crossfilter variable names?

The crossfilter group.reduce add and remove functions take parameters p and v. What are p and v short for in this context?

In numerous crossfilter examples, crossfilter is stored in a variable called ndx. What is ndx short for?




group.reduce follows a similar pattern to the JS built-in Array.reduce with the first argument of the callback being the previous value and the second argument being the current value.

So, p is the value returned by the previous invocation (or the value returned from init in first iteration) and c is the current value for the row being operated on.