JSPM

  • Created
  • Published
  • Downloads 34
  • Score
    100M100P100Q69237F
  • License ISC

Forgetsy.js is a scalable trending library designed to track temporal trends in non-stationary categorical distributions

Package Exports

  • forgetsy-js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (forgetsy-js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

forgetsy-js

Nodejs fork of https://github.com/cavvia/forgetsy temporial trending framework. This is still work in progress and needs proper testing so it may contain bugs. The long term goal is to create a RESTFul API. The project use Redis as the backend.

Please fork and make it better.

var Delta = require(__dirname + '/lib/delta');
var moment = require('moment');

var category = 'shares';
var bin = 'video';

Delta.create({
  name: category
  ,time: moment().week()
}, function(e, delta) {
  console.log(e);
  // increment a new bin
  delta.incr({
    bin: bin
    ,by: 1
  }, function(e) {
    // fetch all item
    delta.fetch({
    }, function(e, trends) {
      console.log('trends', trends);
    })
  })
});