ezs-analytics
analytics statements form EZS
Last updated 2 years ago by touv .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install ezs-analytics 
SYNC missed versions from official npm registry.

A collection of ezs analytics functions.

This package cannot be used alone. ezs has to be installed

Usage

import ezs from 'ezs';
import analytics from 'ezs-analytics';

ezs.use(analytics);

process.stdin
    .pipe(ezs('STATEMENT_NAME', { STATEMENT_PARAMETERS })
    .pipe(process.stdout);

Statements

Table of Contents

count

Take Object object getting some fields with json path, and do ...

Parameters

Returns Object

distinct

Take Object object getting some fields with json path, and do ...

Parameters

  • data
  • feed
  • path String path (optional, default id)

Returns Object

distribute

Take Object like { id, value } and throw a serie of number value

Parameters

  • data
  • feed
  • id String path to use for id (optional, default id)
  • value String path to use for value (optional, default value)
  • step String step between each valut (optional, default 1)
  • start Number first value to throw (optional, default minvalueinthestream)
  • size Number size of the distribution (optional, default (minvalue-maxvalue)inthestream)
  • default Number default value for missing object (optional, default 0)

Returns Object

drop

Take Object and throw the same object only if there the value of the select field is not equals than a value

Parameters

  • data
  • feed
  • path String path of the field to compare (optional, default value)
  • if Number value to compare (optional, default '')

Returns Object

exploding

Take Object and take values with [value] path (must be an array) and throw object of each value. The new object is build with [id] and eac value.

Parameters

  • data
  • feed
  • id String path to use for id (optional, default id)
  • value String path to use for value (optional, default value)

Returns Object

filter

Take Object and throw the same object only if there the value of the select field is equals than a value

Parameters

  • data
  • feed
  • path String path of the field to compare (optional, default value)
  • if Number value to compare (optional, default '')

Returns Object

graph

Take Object object getting some fields with json path, and do ...

Parameters

Returns Object

greater

Take Object and throw the same object only if there the value of the select field is greater (or equal) than a value

Parameters

  • data
  • feed
  • path String path of the field to compare (optional, default value)
  • than Number value to compare (optional, default 0)
  • strict Boolean greater than but not equal (optional, default false)

Returns Object

groupingByEquality

Take Object like { id, value } and reduce all value with the same id in single object

Parameters

  • data
  • feed
  • id String path to use for id (optional, default id)
  • value String path to use for value (optional, default value)

Returns Object

groupingByHamming

Take Object like { id, value } and reduce all value with ID which have the same Hamming distance in single object

Parameters

  • data
  • feed
  • id String path to use for id (optional, default id)
  • value String path to use for value (optional, default value)

Returns Object

groupingByLevenshtein

Take Object like { id, value } and reduce all value with ID which have the same Levenshtein distance in single object

Parameters

  • data
  • feed
  • id String path to use for id (optional, default id)
  • value String path to use for value (optional, default value)
  • distance Number minimal levenshtein distance to have a same id (optional, default 1)

Returns Object

groupingByModulo

Take Object like { id, value } and reduce all value with the same modulo comptuation in ansingle object

Parameters

  • data
  • feed
  • id String path to use for id (optional, default id)
  • value String path to use for value (optional, default value)

Returns Object

keys

Take Object and throws all its keys

Parameters

Returns Object

less

Take Object and throw the same object only if there the value of the select field is less (or equal) than a value

Parameters

  • data
  • feed
  • path String path of the field to compare (optional, default value)
  • than Number value to compare (optional, default 0)
  • strict Boolean less than but not equal (optional, default false)

Returns Object

maximizing

Take special Object like {id, value} and replace value with the max of values

Parameters

  • data
  • feed
  • id String path to use for id (optional, default id)
  • value String path to use for value (optional, default value)

Returns Object

merging

Take special Object like {id, value} and replace value with the merge of values

Parameters

  • data
  • feed
  • id String path to use for id (optional, default id)
  • value String path to use for value (optional, default value)

Returns Object

minimizing

Take special Object like {id, value} and replace value with the min of values

Parameters

  • data
  • feed
  • id String path to use for id (optional, default id)
  • value String path to use for value (optional, default value)

Returns Object

pair

Take Object object getting some fields with json path, and do ...

Parameters

Returns Object

pluck

Take Object object getting value of fields (with json path) and throws a object of each value

Parameters

  • data
  • feed
  • path String path to use form group by (optional, default id)

Returns Object

reducing

Take Object group value of { id, value } objectpath

Parameters

  • data
  • feed
  • id String path to use for id (optional, default id)
  • value String path to use for value (optional, default value)

Returns Object

segment

Take Object object getting some fields with json path, and throw segment of value. Ex: get [a,b,c] and throw [a,b], [b,c]

Parameters

  • data
  • feed
  • path String path (optional, default value)
  • aggregate Boolean aggregate all values for all paths (or not) (optional, default true)

Returns Object

slice

Take Object and throw the same object onl if there in the section of the stream between start and start + size stream is numbered from 1

Parameters

  • data
  • feed
  • start Number start of the slice (optional, default 0)
  • size Number size of the slice (optional, default 10)

Returns Object

sort

Take all Object and sort them with dedicated key

Parameters

  • data
  • feed
  • path String path to use for id (optional, default id)

Returns Object

summing

Take special Object like {id, value} and replace value with the sum of values

Parameters

  • data
  • feed
  • id String path to use for id (optional, default id)
  • value String path to use for value (optional, default value)

Returns Object

topics

Take Object and take values with [value] path (must be an array)

Parameters

  • data
  • feed
  • id String path to use for id (optional, default id)
  • value String path to use for value (optional, default value)

Returns Object

tune

Take all Object and sort them with selected field

Parameters

  • data
  • feed
  • path String path to use for the sort key (optional, default id)

Returns Object

value

Take Object object and getting the value field

Parameters

  • data
  • feed
  • path String the pah of the value field (optional, default value)

Returns Object

Current Tags

  • 1.8.1                                ...           latest (2 years ago)

15 Versions

  • 1.8.1                                ...           2 years ago
  • 1.8.0                                ...           2 years ago
  • 1.7.0                                ...           2 years ago
  • 1.6.1                                ...           2 years ago
  • 1.6.0                                ...           2 years ago
  • 1.5.0                                ...           2 years ago
  • 1.4.1                                ...           2 years ago
  • 1.4.0                                ...           2 years ago
  • 1.3.2                                ...           2 years ago
  • 1.3.1                                ...           2 years ago
  • 1.3.0                                ...           2 years ago
  • 1.2.1                                ...           2 years ago
  • 1.2.0                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (12)
Dev Dependencies (12)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |