Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added a few simple kinds to catalog #9

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 37 additions & 5 deletions notebooks/kinds.clj
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
;; # Catalogue of visualization kinds

(ns kinds
(:require [scicloj.kindly.v4.api :as kindly]
[scicloj.kindly.v4.kind :as kind]
[clojure.math :as math]
[tablecloth.api :as tc]
[tablecloth.column.api :as tcc]))
(:require
[clojure.math :as math]
[clojure.test :refer [is]]
[scicloj.kindly.v4.kind :as kind]
[tablecloth.api :as tc]
[tablecloth.column.api :as tcc]))

;; ## Plain values

Expand Down Expand Up @@ -86,6 +87,25 @@ people-as-vectors
:dataset (tc/dataset {:x (range 3)
:y [:A :B :C]})}

;; ## kind/seq
;; Renders as plain seq with recursive kind semantics
(kind/seq [1 2 3 4])

;; ## kind/vector
;; Renders as plain vector with recursive kind semantics
(kind/vector [1 2 3])


;; ## kind/map
;; Renders as plain map with recursive kind semantics
(kind/map {1 "A" :B 'C})

;; ## kind/set
;; Renders as plain set with recursive kind semantics

(kind/set #{1 2 3})


;; ## Hidden

;; Values of `kind/hidden` are simply not displayed.
Expand Down Expand Up @@ -1070,3 +1090,15 @@ tree-image

;; If you are interested in this option, please reach out. We can test it with your project needs, and it will help stabilizing a useful API.

(kind/test-last)

;; test
;;; `kind/test` displays as success or failure
(kind/test (is (= 1 1)))



;; ## var
;; `kind-var` renders as the var name of the defined var
(kind/var
(def a "hello"))