1.0.5 • Published 8 years ago

threshold-tree v1.0.5

Weekly downloads
2
License
ISC
Repository
-
Last release
8 years ago

threshold-tree

This is a small module which exports a ThresholdTree object. A threshold tree as it is refered to here is a type of tree data structure which collects children of a parent node which constitute less than some threshold% of the total n of that node into an Other child node and constituent subtree.

Since this bit of code was written for d3-log-treemap (forthcoming), a d3 visual data display project, ThresholdTree is an object construct which accepts two parameters: data, a data object as outputted by e.g. d3.csvParse(csvString), and threshold, the ratio of the parent node's total entries each child node must have to preserve independence.

Installation

To get this for Node.JS:

npm install threshold-tree

To build a bundle for front-end using browserify run e.g.:

browserify threshold-tree.js -o umd/threshold-tree.js --standalone tree

The CDN link (via unpkg) is:

https://unpkg.com/threshold-tree@[VERSION]/umd/threshold-tree

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

0.0.1

8 years ago

1.0.0

8 years ago