practicalli / clojure-data-science

Techniques and tools for data science with Clojure
https://practical.li/clojure-data-science
Creative Commons Attribution Share Alike 4.0 International
4 stars 0 forks source link

Visualisation introduction with libraries and examples #59

Open practicalli-johnny opened 3 years ago

practicalli-johnny commented 3 years ago

Introduction to Visualization

Point to references on

Ascii visualizations

(defn trunc [x] (double (/ (int (* 100 x)) 100)))

(defn gauss [x] (/ (Math/exp (- ( 1/2 x x))) (Math/sqrt ( 2 Math/PI))))

(println (table ^{:format raw} [:x {:name :y :format bar}] (map (fn [x] {:x (trunc x) :y (int (* 80 (gauss x)))}) (range -2.8 2.8 0.15))))



#### Oz
The swiss army knife of visualization for Clojure/Script

**Projects**
- https://github.com/practicalli/oz-visualisations
- https://github.com/practicalli/covid19-dashboard

#### Viz.clj
Aimed at beginners, low requirements and understanding required.  Leads on to Hanami
https://github.com/scicloj/viz.clj

#### Hanami
https://github.com/jsa-aerial/hanami
Interactive arts and charts visualizations with Clojure(Script), Vega-lite, and Vega. Flower viewing 花見 (hanami)

#### Resources

Vega examples in Observable
https://observablehq.com/@mahog/vega-lite-demo-lets-make-a-scatterplot-matrix

Seaborn - python visualization library
http://seaborn.pydata.org/