Skip to content

access to the records in each bin #25

@gordonwoodhull

Description

@gordonwoodhull

It seems in line with our general philosophy on this fork to provide access to the underlying row data for each bin in a group.

This is useful for "complex reductions" such as determining the min, max, median of the rows. Currently one has to maintain an array which duplicates information already maintained by crossfilter groups in the groupIndex variable.

There are some annoying design problems:

  • should the method return the original records (allRecords), or indices to the records (allIndices)?
  • is there any faster way to do this than to iterate over groupIndex and generate a whole bunch of arrays? It's just O(N) but it's a lot of memory allocation.

But I don't think those are as annoying or as error-prone as maintaining duplicate information as a crossfilter client.

I looked for an existing issue here or on square/crossfilter, but couldn't find one, so I'm opening this. I'm sure it's been mentioned many times before, so let's add links to prior discussions/applications as we find them.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions