data-science 2024-10-28

Any cider users? I’m curious how people view tablecloth or dataset tables in emacs

I also really like cider-pprint-eval-last-sexp as otform proposed. Sometimes I use clay-make-last-sexp or clay-make-defun-at-point with https://github.com/scicloj/clay.el to send datasets to the browser. Then they can be styled with zebra colours etc., Then they can also be turned into interactive tables and hold some visualizations inside. https://scicloj.github.io/clay/clay_book.examples.html#datasets https://scicloj.github.io/clay/clay_book.examples.html#tables

I have sometimes used clerk for this as well (tho not usually via tap>) but cider-pprint-eval-last-sexp is probably what I use most often

hello, couple of stupid questions about tech.ml.dataset: 1- how to append new rows into a dataset? 2- is there a way to return json str instead of writing directly into a file? I'd like to use this to preview data in my web app, so datasets are really small.

re: 1 - I create a new dataset with the data and then concat the two usually. This from the Tablecloth documentation might help: https://scicloj.github.io/tablecloth/#joinconcat-datasets

šŸ‘ 1
šŸ™Œ 1

tablecloth will also let you get the rows back as maps using (tc/rows ds :as-maps) IIRC which can then easily be turned into json using whatever json tooling you have

šŸ‘ 1
šŸ™Œ 1

I am not using tablecloth though but I'll consider it further.

Thanks man

there will be tmd things that are being called underneath, I just don't know what they are off the top of my head. Tablecloth is very helpful though

I drop into tmd for things like group-by-column-agg and even into hamfisted for some of the parallel reducing there

yea, I like tc api better but i feel like using tmd will force me (in a away) into writing things that are more performant

just a hunch, I'll most likely end up using tc

tc sugar helps me go faster and then I can drop down to the stuff underneath when I need to

I think this is exactly the use case. If you need a performance - go for TMD and it's reducing pathways, if you work on small/mid-sized dataset TC should be enough.