clerk

Drew Verlee 2024-07-04T04:13:11.998209Z

Are their any minimal examples of weighted directed graphs in vega, vega-list or ploty someone can point to?

phronmophobic 2024-07-04T04:33:51.453389Z

Have you considered clerk's mermaid.js integration?

Drew Verlee 2024-07-04T04:35:07.660519Z

I haven't.

Drew Verlee 2024-07-04T04:35:11.644869Z

Looking...

phronmophobic 2024-07-04T04:37:18.352319Z

it kinda depends on how you want to visualize them

Drew Verlee 2024-07-04T05:00:24.104809Z

The mermaid view is fine, but i would rather the input be a triplet [start stop weight] then a text (e.g -->) . I figure out how to do this with ubergraph (see picture) but it leaves a bit to be desired. like i wish the {} was gone and the word weight isn't necessary. Not sure thats easily fixable. i would need to glance at the docs again...

Drew Verlee 2024-07-04T05:05:01.139069Z

The mermaid ones look better for my usecase:

phronmophobic 2024-07-04T05:05:45.046949Z

you can also try clj-graphviz, which uses clerk for documentation. although, I’m not sure I’m totally happy with how I wrote it. It’s sometimes clunky to succinctly control how code is visualized along with output. https://phronmophobic.github.io/clj-graphviz/

👀 1
Drew Verlee 2024-07-04T05:08:50.613419Z

i'm fine with clunky + easy. would using clj-graphviz require a call to clerk/with-viewer {:transform-fn ... :render-fn ...} ?

phronmophobic 2024-07-04T05:16:49.411739Z

It’s been a while, but as long as you don’t care about showing the code that produced the image, you should be able to just use a helper function that returns an image.

👍 1
phronmophobic 2024-07-04T05:17:21.530479Z

my implementation was a bit clunky because I cared about how the code and the output looked

2024-07-04T05:37:34.459239Z

This notebook has (at the very bottom) an example of something like what you’re trying to do https://github.com/nextjournal/clerk-demo/blob/main/notebooks/semantic.clj

phronmophobic 2024-07-04T05:38:27.746669Z

Here's the clj-graphviz documentation notebook, https://github.com/phronmophobic/clj-graphviz/blob/main/notebooks/docs.clj

Drew Verlee 2024-07-04T06:10:02.066689Z

Thanks a ton!! I'll look first thing in the morning.

Andreas S. 2025-05-05T07:57:25.333229Z

Hi! Im trying to use clerk with wikidata mundaneum. When I try to use the basics notebook I get the following error: Could not locate mundaneum/query__init.class, mundaneum/query.clj or mundaneum/query.cljc on classpath. any ideas?