data-science 2024-02-16

Not Clojure-specific, but maybe interesting to this group as it can be used with Clojure: https://observablehq.com/framework/

๐Ÿ‘ 1
๐Ÿ’ฏ 1

> Makes sense. I guess the next step would be to file an issue. https://github.com/observablehq/framework/issues/967

๐Ÿ™ 2

> I wonder about a #squint wrapper/preprocessor for the front end, which would couple nicely with Clojure based data loaders on the back end. thanks for sharing the idea, it made me experiment a bit. still unpolished, but promising ๐Ÿ‘‡

๐Ÿ‘ 1

Do they provide an API for this kind of thing?

nope, Iโ€™ve wired stuff up locally. but itโ€™s easy enough to ask them if providing an API would be a thing theyโ€™d support.

๐Ÿ‘๐Ÿป 1

Makes sense. I guess the next step would be to file an issue.

๐Ÿ‘ 1

This is great

On a complementary direction, @kiraemclean and I tried to generate Observable code from Clojure forms, directly generating JS code on the JVM. Here is a partial draft, just trying the concept. Since Observable Plot, as well as other components, are rather regular in the way they are coded, we could use a basic code-generation function, rather than a full Clojure to JS transpiler. Observable's inter-component interaction seems really nice so far. Many thanks for proposing this direction.

โค๏ธ 1
Rupert (Sevva/All Street) 2024-02-16T11:45:46.593439Z

How do you use it with Clojrue?

This looks really fantastic, and their analysis of whatโ€™s missing from the ecosystem is very much in line with some of the shortcomings of notebook tools that Iโ€™ve experienced. In particular I commend the choice of using an https://observablehq.com/framework/config, which is the only thing thatโ€™s actually customizable enough to suit the huge variety of user needs for a tool like this. I wonder about a #squint wrapper/preprocessor for the front end, which would couple nicely with Clojure based data loaders on the back end.

Thanks for sharing this, very inspiring. https://scicloj.github.io/clay/ offers rendering through https://quarto.org/, which is another Markdown format with rich visualizations and tooling support. Quarto support Observable visualizations (though probably not version 2.0 yet), so it was convenient to add basic Observable support to Clay: https://scicloj.github.io/clay/#observable For now, files can be used to communicate data between the JVM Clojure process and the browser Observable calls. I'd be happy to explore further. Feature requests would be helpful.

@afoltzm > some of the shortcomings of notebook tools that Iโ€™ve experienced could you tell a bit about those shortcomings and experiences?

@rupert One possibility is to use it as a data loader.

๐Ÿ‘ 1

Is this as a result of practice, attainment and general awesomeness alone, or have you started using some fabulous new tools that you might be prepared to share with us..?

still the same tmd/tc + clerk/vega-lite stuff I've been using for the last year or so. Just getting a bit better at putting together the vega-lite charts (learned how to use hconcat and vconct and combine the specs nicely)

having each chart as a little map of data that you can tweak is pretty good

That does sound very useful & fun. I haven't done any charting in CLJS for a while and I found myself doing a lot of painful re-tooling of libraries and stuff, so hearing that vega-lite is working well for you is of interest. What's tmc/tc? (I am not sure Googling that is going to go well)

tmd/tc (see edit above) is tech.ml.dataset and tablecloth

the cljs aspects of the charting don't really hit me that much as clerk hides an awful lot of the pain from me