What does HackerNews think of vnlog?
Process labelled tabular ASCII data using normal UNIX tools
Magic comment with field labels is required, and you can then use the usual unix tools for processing. It's magical.
What took me a bit to grok at the start was how feedgnuplot's different flags change how it assigns semantic meaning to different data columns. So by default the first column is simply treated as data (y) while the implicit row index becomes the x axis. If you add --domain the first column becomes your domain (x) and the second column your data (y) allowing you to create a scatter plot. If you have multiple curves you can add --dataid with --domain which makes the first column x, the second column the id of the curve that point belongs to, and the third column the data itself (y). You can throw in more dimensions of visualization by mapping columns to colors, point size, or 3d.
Typing it out it sounds more complicated than it really is. Combined with vnlog to easily select columns and filter rows it becomes a really powerful command line tool set.
Works wonderfully in the shell, in conjunction with feedgnuplot for plotting.
< data.vnl vnl-filter -p thiscolumn,thatcolumn 'thiscolumn != "foo"'
If you don't strictly need csv, those tools are quite nice, and have a really friendly learning curve. Disclaimer: I'm the authorI can open and edit that file quickly using bash. From within VIM I can quickly commit to reduce the # keystrokes. More details: https://github.com/jodavaho/bashlog#git-integration
(Really though, you can just save as an environment variable your file location)
The text file is structured with space-delimited text, like this: https://github.com/dkogan/vnlog
My current structure for tracking a contribution to an OKR item (e.g. "meditate") by date (e.g., 2020-01-15) and amount (e.g., "1") is simply:
"# date item amount"
Easy to open, easy to plop down today's date and the item / amount. Save multiple date/item entries and add them inscripts ... Easy to save. Done.
The work came in building stuff to plot it:
I have other files that link "items" to goals or other metadata like categories, etc. Like a relational database, but easily edited in text.
For example, to make a link from daily items to Key Results
"# item okr"
The OKR categories are usually Fighting (I box), Tech, Mental health, and Social, but YMMV
Another example is "workout-mapping.vnl" with structure: "# item muscle-group factor"
etc etc.
vnlog has nice vnl-join commands that quickly build the table and all linked metadata and output formatted text (one command). Then reading that in R is easy ...
``` data <- read.table('../2020-Q4-OKR.vnl',skip=2,stringsAsFactors = FALSE) ```
Aggregating by date is easy:
``` data.agg<- aggregate(x=data$Amount,by=list(data$Date),FUN=sum) ```
Then plot using ggplot2.
Examples from 2020 Q4 (just ran the numbers yesterday!)
https://josh.vanderhook.info/media/okr.png