synopsize
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

synopsize

npm version

Summarize tables of structured data, such as CSV or JSON!

$ npm install -g synopsize

Example, using Capital Metro's fare_rules.txt:

$ synopsize < fare_rules.txt
[0] "fare_id"
  Type: TEXT
  No missing values (83 total)
  There are 3 unique values, which range from a to c
    a: 63
    b: 11
    c: 9
[1] "route_id"
  Type: INTEGER
  No missing values (83 total)
  All values are unique and range from 1 to 990
  10 random examples:
    982
    987
    985
    983
    7
    935
    681
    803
    801
    663
[2] "origin_id"
  Type: TEXT
  83 missing values (out of 83 total), or 100.00%
  No values to show
[3] "destination_id"
  Type: TEXT
  83 missing values (out of 83 total), or 100.00%
  No values to show
[4] "contains_id"
  Type: TEXT
  83 missing values (out of 83 total), or 100.00%
  No values to show

To-do

  • [x] Support newline-delimited JSON as input
  • [ ] Infer more complex types
    • [ ] come up with better names / descriptions
    • [x] custom sort (compareFunction) for each type
  • [ ] Draw histograms for continuous types
  • [ ] Smarter examples when showing random samples
  • [ ] Add option to sort by count instead of value
  • [ ] Width-aware padded output, especially for long values and the value: count tables
  • [ ] Generalize for CLI / web consumption

License

Copyright 2016 Christopher Brown. MIT Licensed

Dependencies (4)

Dev Dependencies (3)

Package Sidebar

Install

npm i synopsize

Weekly Downloads

3

Version

0.2.1

License

MIT

Unpacked Size

13.3 kB

Total Files

6

Last publish

Collaborators

  • chbrown