Ask HN: What's your favorite command-line tool for working with data?

8 points by jeroenjanssens ↗ HN
About a year ago, I wrote a blog post about command-line tools for data science [1]. Thanks to HN, I received a lot of valuable comments and pointers to other great command-line tools! In the past 10 months, I have been writing a book titled Data Science at the Command Line [2]. Ever since that blog post, I've been discovering new tools. On the one hand, that's quite frustrating because it's difficult to keep up and include everything in the book. On the other hand, it's fantastic to see that the command line is still very popular!

In order to gain a better overview of what's available, I thought it'd be nice to ask on HN what your favorite tools are to work with data. Many new tools have been developed in the past year, but your favorite one may just be 10 years old. You may think that I'm too late with this question because the book is already finished, but fortunately the book also discusses the underlying concepts which haven't changed too much in the past forty years.

I'm very much looking forward to hearing about your favorite command-line tools. Bonus points if you reply in CSV format "command,url,reason\n", so I can easily scrape the comments :)

Thanks!

PS. For those who are interested, next Wednesday, I'll be doing a webcast about this topic [3], where I might share the outcome of this discussion.

[1] https://news.ycombinator.com/item?id=6412190

[2] http://shop.oreilly.com/product/0636920032823.do

[3] http://www.oreilly.com/pub/e/3115

16 comments

[ 2.4 ms ] story [ 42.4 ms ] thread
jq has proven useful for dealing with JSON. A nice way to reduce or reformat your data.

http://stedolan.github.io/jq/

jq,http://stedolan.github.io/jq/,best tool to handle JSON files in command line #The tool that immediately comes to my mind is jq, a tool to transform and process JSON objects. It's one of those powerful tools that is super easy to learn and once I started using it I just couldn't live without. The only negative thing I have to say is that it does not have good native support to transform between JSON and CSV.
GNU sed 4.2.1 awk 3.0.4 and grep 2.4.2, http://www.git-scm.com/ , Bundled with Windows Git (which needs an updated find)

Python with pandas, http://pandas.pydata.org/ , If I need HDF5 or time series

ffmpeg, ffmpeg.org, If I'm generating animations

* I look forward to your book :)

txr, http://nongnu.org.txr, Use it all the time and like it a lot! That keeps me interested in working on it. Started five years and and still at it today, more than 1500 commits later, and 27000 LOC.
Jeroen, I'm just reading your [1] for the first time now. Are you aware of Dirk Eddelbuettel's `littler`? I believe that might overlap with your Rio tool to some degree.
Here's a tiny tool I like: https://gist.github.com/isomorphisms/9537586

It just prints the first `head` line and then random few rows instead of the top few. For me this is nicer than looking at the top 5 lines every time. I'm peeping at different parts of the table and thus gradually getting acquainted with it.

After all your command-line data munging (possibly in a Unix pipeline), if you want to convert the resulting text to PDF (without leaving the command line :-), check this post:

[xtopdf] PDFWriter can create PDF from standard input:

http://jugad2.blogspot.in/2013/12/xtopdf-pdfwriter-can-creat...

It needs xtopdf and ReportLab (use v1.17) and Python (use 2.2 or higher).

Online overview of xtopdf: http://slid.es/vasudevram/xtopdf

xtopdf on Bitbucket:

https://bitbucket.org/vasudevram/xtopdf