JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 20
  • Score
    100M100P100Q57790F
  • License MIT

An email data analysis library.

Package Exports

  • @cull/pore

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 (@cull/pore) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

pore for Cull

An email data analysis library.

Installation

npm install @cull/pore

Usage

Generate analytical collections from email envelopes (see @cull/imap).

Origin

Analyze sender data to identify distinct senders, addresses and domains. Also, generate a collection of nodes (computing the number of emails for each distinct value) and links connecting the three for use with a data visualization library like d3-sankey.

import { Origin } from '@cull/pore';

// envelopes retrieved from a `@cull/imap` Client
let envelopes = [];

let analysis = new Origin(envelopes);

// optionally apply filters
analysis.filter([datum => datum.from.domain === 'cull.email']);

let senders = [...analysis.senders]; // distinct senders
let addresses = [...analysis.addresses]; // distinct addresses
let domains = [...analysis.domains]; // distinct domains
let sankey = analysis.sankey(); // generate nodes and links

Also, see tests.

Chronology

Analyze chronological data to bucket data by date, hour, day of week and a nested computation by day of week and then by hour.

import { Chronology } from '@cull/pore';

// envelopes retrieved from a `@cull/imap` Client
let envelopes = [];

let analysis = new Chronology(envelopes);

// optionally apply filters
analysis.filter([datum => datum.from.domain === 'cull.email']);

let byDate = [...analysis.byDate];
let byHour = [...analysis.byHour];
let byWeekday = [...analysis.byWeekday];
let byHourByWeekday = [...analysis.byHourByWeekday];

Also, see tests.

Development

makefile codifies directives for building, testing, linting and other development oriented tasks.