Implementation of a dataset backed by Crossfilter, ie. fully client side filtering without the need for a server or database. Due to limitation of crossfilter with array (or data that has no natrual ordering), this will not work as expected:
- dimension:
function (d) {return [d.x, d.y, d.z]} - group:
function (d) {return [d.x / 10 , d.y / 10, d.z / 10]}
Therfore, we preform grouping already in the dimension itself, and join the array to a string. Strings have a natural ordering and thus can be used as dimension value.
- dimension:
function (d) -> "d.x/10|d.y/10|d.z/10" - group:
function (d) {return d;}
- Source:
Members
(inner) crossfilter
Crossfilter instance, see here
- Source:
Methods
(inner) initDataFilter(dataset, filter)
Initialize the data filter, and construct the getData callback function on the filter.
Parameters:
| Name | Type | Description |
|---|---|---|
dataset |
Dataset | |
filter |
Filter |
- Source:
(inner) releaseDataFilter(dataset, filter)
The opposite or initDataFilter, it should remove the filter and deallocate other configuration related to the filter.
Parameters:
| Name | Type | Description |
|---|---|---|
dataset |
Dataset | |
filter |
Filter |
- Source:
(inner) sampleDataset(dataset, N) → {Array.<Object>}
sampleDataset returns an array containing N random datums from the dataset
Parameters:
| Name | Type | Description |
|---|---|---|
dataset |
Dataset | |
N |
intger | Number of elements to pick |
- Source:
Returns:
Array N data Objects
- Type
- Array.<Object>
(inner) scanData(dataset)
Autoconfigure a dataset:
- pick 10 random elements
- create facets for their properties
- add facets' values over the sample to the facet.description
Parameters:
| Name | Type | Description |
|---|---|---|
dataset |
Dataset |
- Source:
(inner) setCategories(dataset, facet)
setCategories finds finds all values on an ordinal (categorial) axis Updates the categorialTransform of the facet
Parameters:
| Name | Type | Description |
|---|---|---|
dataset |
Dataset | |
facet |
Facet |
- Source:
(inner) setExceedances(dataset, facet)
Calculate value where exceedance probability is one in 10,20,30,40,50,
and the same for subceedance (?), ie the exceedance of the dataset where each point is replaced by its negative.
Approximate from data: 1 in 10 is larger than value at index trunc(0.1 * len(data))
Set the facet.continuousTransform to the approximate mapping.
Parameters:
| Name | Type | Description |
|---|---|---|
dataset |
Dataset | |
facet |
Facet |
- Source:
(inner) setMinMax(dataset, facet)
setMinMax sets the range of a continuous or time facet
Parameters:
| Name | Type | Description |
|---|---|---|
dataset |
Dataset | |
facet |
Facet |
- Source:
(inner) setPercentiles(dataset, facet)
Calculate 100 percentiles (ie. 1,2,3,4 etc.), and initialize the facet.continuousTransform
to an approximate percentile mapping.
Use the recommended method from NIST
See also the discussion on Wikipedia
Parameters:
| Name | Type | Description |
|---|---|---|
dataset |
Dataset | |
facet |
Facet |
- Source:
(inner) updateDataFilter(dataset, filter)
Change the filter parameters for an initialized filter
Parameters:
| Name | Type | Description |
|---|---|---|
dataset |
Dataset | |
filter |
Filter |
- Source: