Visidata: [wishlist] ordering by date adds a hr line between rows having a distinct difference to the previous row (e.g. visual group by day)

Created on 20 Mar 2020  路  4Comments  路  Source: saulpw/visidata

Something that helps a lot with time based analysis is to be able to see distinct groups of rows based on a specific time delta between the previous and next row. It's a simple concept, but likely harder to implement 馃槵

A really simple example of this as below, where lines are highlighted between the rows when the next row falls on the next day:
IMG-20200320-WA0000-01

This particular example has a delta of a day, but ideally it would be customisable and could visually show groups of hours, minutes etc.

This might also be a handy feature for any column type when ordering is used. It just makes it easier to see a definitive difference in the next/prev rows.

This is also well implemented with lnav based on the rows' timestamp: https://github.com/tstack/lnav

I guess this feature would include the ability to:

  • Set the line size (thickness)
  • Have an adjustable delta (in options?), set to day, minute delta. etc.
  • Have the size delta dynamically scalable with hotkeys allowing the delta to be scaled while looking at the data itself (rather than having to dive into options to make the change)
  • This may also work well for float and int columns
wishlist

Most helpful comment

I'm glad to say I have a working version of this that I'm happy to share in the next few days! I'm just doing some testing as best I can and working out some (mainly options related) niggles. Then happy to submit it somewhere (as a plugin?) and get some feedback on it 馃憤

All 4 comments

Interesting idea, @geekscrapy ! There might be a way to do this with a colorizer, which would apply the underline attribute if the value in a certain column was different in the next row. c.getTypedValue(r) != c.getTypedValue(rows[rowindex[rowid(r)]]) or something like that, using the rownum plugin possibly (for the rowindex).

Closing as per wishlist policy. Please update here if you or anyone gets something working!

I tried something similar, in https://github.com/saulpw/visidata/issues/430
The feedback from Saul on that thread might be helpful. It was for me.

And anjakefala added docs here:
https://github.com/saulpw/visidata-book/blob/master/colorizers.md

And a simple colorizer from Saul here:
https://github.com/saulpw/visidata/issues/434#issuecomment-595629536

These details were the develop version.

The code has better examples of colorizers.

I'm glad to say I have a working version of this that I'm happy to share in the next few days! I'm just doing some testing as best I can and working out some (mainly options related) niggles. Then happy to submit it somewhere (as a plugin?) and get some feedback on it 馃憤

Yes, please submit it as a plugin! ^^

Was this page helpful?
0 / 5 - 0 ratings