daff

Ever wanted to compare tables as easily as you compare code? daff (think “data diff”) is for you.

Live example

You can edit this table. The difference will be recalculated immediately. This table should be a common ancestor for the “original” table and the modified table.
You can edit this table. The difference will be recalculated immediately. We are using this as the original version of the table. The difference will show the changes that were made in the modified table.
You can edit this table. The difference will be recalculated immediately. The difference will show the changes that were made in this table with respect to the original table.

This shows the changes made in the modified table with respect to the original table. The format used is the highlighter tabular diff.

You can collapse the diff down to nothing by applying it to the original table. More usefully, you can edit the diff first before applying it. Erasing cells like “+++” or “---” means those changes won't get applied.

Installation

npm install daff -g
pip install daff
gem install daff
composer require paulfitz/daff-php

For more options and languages, see github repository.

Using with git

Do you have a git repository with .csv files in it? You can make git diffs and merges table-aware using daff. To set this up, run:

daff git csv

Your CSV diffs and merges will get smarter, since git will suddenly understand about rows and columns, not just lines:

You can get the same results online on github using Floppy's csvhub chrome extension (no longer available) the Github CSV Diff chrome extension by WeiYang at /wy-z/github-csv-diff.

Help

Make sure to read the README. Then just file an issue or @fitzyfitzyfitzy me, I'll be excited to hear from you.