client/dataset-server

Implementation of a dataset backed by a server, which in turn uses fi. postgreSQL Fully asynchronous, based on socketIO.

Most methods below result in a message with the methodName and a data object, containing:

  • dataset: dataset.toJSON()
  • facetId: facet.get(), or
  • filterId: filter.getId()

Extra messages are available for synchronizing state, which can be both send and received:

  • syncFilters
  • syncFacets
  • syncDataset

these take the Dataset.toJSON() as content. Data can be requested by sending getData with dataset and filter ID, on which the server responds with a newData message containing filterId and data.

Source:

Methods

(inner) connect()

Connect to the spot-server using a websocket on port 3080 and setup callbacks

Source:

(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) scanData(dataset)

Autoconfigure a dataset

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, 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

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: