Freq sheet: bin by date #1650
Replies: 4 comments 15 replies
-
👍 Yes, that would be great. One of my most common Visidata actions is adding a derived column in order bucket data by month. I suppose one difficulty of creating this feature would be choosing/specifying the bucket size. 🤔 I often choose to bucket by month (via an expression column I don't have a good idea for how to configure the date bucketing in the same way we can for numerical binning either since I don't know if a global default makes sense. If the frequency analysis sheet was interactive then I could imagine a plug-in/feature offering a set of key bindings to toggle between some date binning strategies. Maybe something like the menu based picker for aggregators? Although it'd be nice to retain the flexibility to specify a date formatter/function for custom date binning. PS. Thank you to everyone in the Visidata community for this most excellent tool. ❤️ |
Beta Was this translation helpful? Give feedback.
-
So we'd be looking to bin by a certain "period of time". When should these periods start? At the earliest date in the column? Maybe a solution to this would be to take the first date to be binned and center the timedelta on it and work from there? I've not looked at the current binning code 🤷♂️ |
Beta Was this translation helpful? Give feedback.
-
@saulpw I wonder if there could be two commands one that creates a binned frequency sheet and one that doesn't, rather than have it as an option. This is because I rarely go to the option sheet to toggle values, it takes a lot of steps. If you want the binned Frequency sheet, you would just run the binning command, if not use the non-binning command. Then another suggestion is that once you are in a frequency sheet there should be commands to toggle between binned and unbinned. One issue with the binning, is the size is also option based. I sort of wished once you are on a frequency sheet you could edit the binning; binned yes/no, if binned, number of bins. There are times I just wish the number of bins was based on the number of available screen rows to show all values without scrolling. Also, I sort of want string value binning, think of the pages of a Dictionary, where the words are ordered alphabetically, and then the bins are the words on a page. |
Beta Was this translation helpful? Give feedback.
-
I think that would be worth trying. Is this the Guides discussed in #1733 or is it something more? It does sound like there is a separate sheet in the sidebar that would be ok. My concern would be how good a match the Sheet UI is for a form. If it was like the options sheet, I feel it would be useful if there was a restricted mode where the editable cell is already in edit mode sort of like how Shift-Up or Shift-Down work once you are in edit mode. If you click on a row or navigate to a row only the value cell has focus and is ready to be modified. In this case I want something closer to a traditional UI form where it is not possible to edit the labels and once a field is focused it is ready to edit. I do like having a quick way to override defaults and this sounds like it might be that and that would be very helpful even without the suggestion above. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is it possible to bin by date range like you can bin by integer?
Would this be useful for anyone else?
Beta Was this translation helpful? Give feedback.
All reactions