Skip to content

Phalanstere/TimeCluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TimeCluster

Description

It might occur to you that you have a lot of timestamped objects that you want to cluster.

<iframe src="https://musebrarian.github.io//" width="100%" height="600"></iframe>

Features:

The idea behind this library is to cluster a given array of timestamped objects.

    // you can embed the file via node.js require command 
	var TimeCluster = require("./lib/timeCluster.js"); 
  • then you define an object and pass an array of timestamped objects
	var x = new TimeCluster(list);
  • you can specify a timframe, like this:
	var x = new TimeCluster(list, "day"); // valid calls are "minute", "hour", "day", "week", "year"
  • and you can also specify the field which contains the timestamp
	var x = new TimeCluster(list, "day", "date");  // default is "time"	
  • The functions returns an array of clustered objects