anonymous-graph-stats
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

anonymous-graph-stats

Anonymous statistics for graph objects in Typescript for node.js and browser

Graph stats produces metrics for a small graph object made of nodes, edges and attributes. These metrics are useful for understanding the size and the shape of the graph. The metrics should never contain any private content, but mostly counts of elements. However, these metrics are pretty detailed to reduce ambiguity and facilitate decisions making. A csv example and json example based on the following json input.

Usage

You will have to provide a context that expects a list of tags and units: Only these predefined tags and units will be used for stats purpose.

const defaultCtx = {
  supportedTags: ['alpha', 'beta', 'delta'],
  supportedUnits: ['km', 'GBP'],
};

Produce the stats:

const statsRows = getStats(defaultCtx, jsonGraph);
const csvRows = toCSV(statsRows, ',');

License

MIT © 2020 Flarebyte - Olivier Huin

/anonymous-graph-stats/

    Package Sidebar

    Install

    npm i anonymous-graph-stats

    Weekly Downloads

    2

    Version

    0.2.0

    License

    MIT

    Unpacked Size

    575 kB

    Total Files

    15

    Last publish

    Collaborators

    • olih