clerk

teodorlu 2023-10-16T13:01:19.235889Z

Two Clerk observations today: • Being able to use TeX for table headers is awesome. • I realize that I prefer the map-of-seqs representation for table data. But I can’t (I think?) control header order directly with map-of-seqs, so I convert to seq-of-seqs instead.

teodorlu 2023-10-16T13:02:11.873039Z

Table was made with this code.

teodorlu 2023-10-16T13:17:37.188629Z

Love the sticky table header! Don’t think I’ve seen that before.

🖤 1
teodorlu 2023-10-18T07:15:51.067019Z

Good point - this can be solved and evaluated in userspace.

teodorlu 2023-10-17T08:38:55.761519Z

clerk/col, clerk/row and clerk/vl and clojure data is a huge improvement over last time I did work like this (that time using Excel). (I know vega supports grids. I haven’t used those yet. Still, I like being able to tile arbitrary Clerk viewers)

mkvlr 2023-10-18T06:10:22.828159Z

been thinking if we should support sorting for the map-of-seqs representation

mkvlr 2023-10-18T06:11:03.166569Z

one of the problems is that you’d then need to specify the keys twice

teodorlu 2023-10-18T06:50:09.566389Z

> one of the problems is that you’d then need to specify the keys twice > For me personally, I'd happily do that. The second key specification could also work as a select-keys, letting me pick the columns that matter. Or "pick which keys show up first", perhaps this idea needs some more time.

mkvlr 2023-10-18T06:52:14.110469Z

you could try this out by changing clerk’s table viewer to do this

mkvlr 2023-10-18T06:52:25.952669Z

one way would be metadata on the seq

teodorlu 2023-10-21T10:33:20.786349Z

I realize that simply adding “let me sort table headers when rendering a clerk table of map of seqs” wouldn’t really have solved my problem, because I wanted to style the headers with TeX anyway. And in order to control header styles and control header order, seq-of-seqs and clerk/use-headers worked without issues. I converted my data to a different data representation, and Clerk rendered the result nicely. Because (A) it’s all data, and (B) the table viewer can use another viewer to render the result of a cell, and (C) viewers can be written in userspace, this looks like a solved problem. If I wanted a reusable steel section profile table viewer, creating a (defn steel-section-profile-table-viewer [,,,] ,,,) is probably the right thing for me to do.