This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-07-04
Channels
- # architecture (35)
- # babashka (1)
- # beginners (60)
- # biff (6)
- # cider (21)
- # clerk (14)
- # clojure (10)
- # clojure-europe (42)
- # clojure-nl (1)
- # clojure-norway (15)
- # clojure-sweden (6)
- # clojure-uk (12)
- # clojurescript (19)
- # community-development (1)
- # data-science (2)
- # datalevin (1)
- # datomic (22)
- # gratitude (1)
- # honeysql (1)
- # hyperfiddle (8)
- # introduce-yourself (5)
- # leiningen (12)
- # lsp (18)
- # off-topic (20)
- # overtone (6)
- # pedestal (5)
- # specter (5)
- # sql (12)
- # xtdb (2)
Are their any minimal examples of weighted directed graphs in vega, vega-list or ploty someone can point to?
Have you considered clerk's mermaid.js integration?
I haven't.
Looking...
it kinda depends on how you want to visualize them
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...
The mermaid ones look better for my usecase:
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/
i'm fine with clunky + easy. would using clj-graphviz require a call to clerk/with-viewer {:transform-fn ... :render-fn ...} ?
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.
my implementation was a bit clunky because I cared about how the code and the output looked
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
Here's the clj-graphviz documentation notebook, https://github.com/phronmophobic/clj-graphviz/blob/main/notebooks/docs.clj
Thanks a ton!! I'll look first thing in the morning.