sgreben / jp

dead simple terminal plots from JSON data. single binary, no dependencies. linux, osx, windows.
MIT License
1.32k stars 33 forks source link

CSV support? #12

Closed vielmetti closed 6 years ago

vielmetti commented 6 years ago

CSV is the format I end up more often than not when dealing with older systems. It would be welcome to have some well-thought out strategy for plotting and graphing CSV information, whether that's changes to jp, or documentation of other tools that neatly transform CSV to JSON in a format that's readily consumable by jp.

vielmetti commented 6 years ago

For the moment I'm looking at https://www.npmjs.com/package/csv2json as part of a pipeline.

sgreben commented 6 years ago

Thank you for the suggestion!

I've added support for simple CSV files (no handling of headers; each cell is parsed as a float, and if that fails, it remains a string) in 1.1.2. There's now also a simple example in the README.

Of course, there is a lot more that can be done (e.g. headers, column types, format options). I'd like to focus on JSON as the primary input format, so I would defer these more involved operations to CSV-focused tools.

sgreben commented 6 years ago

Added basic CSV support in 3ca42b8dca6cc9705f7a783413726422429dc3fa.