What do you use to plot histograms (and possibly other charts) with Clojure? I have some data in CSV and want to visualize it quickly.
If you have ClojureScript, I use plotly
or on Clojure you can use plotly with libpython-clj
Most Clojurians use oz or saite/hanami
I've been happy with clj-plot for things lately, but that is because I need to generate a lot of static charts for pdfs
I don't have ClojureScript. I like Oz but it looks rather low-level for this stuff (no built-in charts?) I was looking for something like incanter's histogram but more flexible and nicer.
Try libpython-clj
then
I have used incanter for generating histogram. You can find example in this repo > https://github.com/phoenix2082/punter
Thanks for the pointers. I ended up playing with Oz and it wasn’t too hard to draw basic histograms
Oz is fairly simple once you realise it's just a hash-map I did a number of example in Clojure here https://github.com/practicalli/oz-visualisations And some more info here. https://practicalli.github.io/blog/posts/visualising-uk-covid19-data-with-oz/ You can also use the vega-lite examples, as JavaScript or converting to Clojure
Do we have a fix as to why the arc pie chart is not displaying/throwing an exception yet...
One thing to keep in mind: As far as charting is concerned, Oz is really just Vega-Lite and Vega under the hood. And as you've discovered, Vega-Lite in particular really is pretty easy to use for basic use cases. However, I hope you also find (as I and others have) that it's also really good at "growing with you" in power & expressiveness as you find yourself needing to do more detailed and interactive visualizations. It's really just a great framework.
Finally, a number of other tools in the ecosystem (such as Saite, Hanami, Darkstar, Gorilla-REPL) also use Vega & Vega-Lite, so the grammar is very portable, and you're got some choices as far as tooling that fits your preferences & context.
Please enjoy responsibly!
I also added a support for custom visualizations on Chlorine (socket-REPL package for Atom), so if there's someone that already use it, ping me (there's like... zero documentation so far, and it's still crude, but it works 😄)
Yes; Didn't mean to leave your tooling out above @mauricio.szabo, but it seems to further highlight just how much clj(s) support there is out there for Vega now!
@metasoarous no problem, I don't really remember if I already published that Atom now have support for this kind of extension 🙂
(But, I don't know if Chlorine works with Vega... probably you will have to do some wiring by hand, because when you require vega
on Atom it requires as a Node.JS library and don't find "canvas" or something)
But, if you can require a library in JS, it probably works with Chlorine now 🙂.
Oh; My bad. I may have misunderstood when you said "support for custom visualizations".
I look forward to seeing the docs on that then.
There is another option. If you want to be strictly server-side you can use darkstar just to convert a vega json string into an svg and render that. https://github.com/applied-science/darkstar
Yup; For the record, I mentioned Darkstar above 🙂
And doesn't http://tech.ml.dataset have some basic vega utilities?
Sorry, yes I see that now. I just quickly scanned. Not any more, everything like that was moved to tech.viz. That is why I now have the simpledata repository that people can just and then use immediately; the tech system now requires 3 separate dependencies if you want to train a classifier and see a plot of the output.
Dope 🙂