Skip to content

Commit 6f4cb70

Browse files
committed
aog wip
1 parent 24f3736 commit 6f4cb70

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/data_visualization/aog_in_clojure_part1.clj

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -553,10 +553,10 @@
553553
Example:
554554
(validate! Layer my-layer)"
555555
[schema value]
556-
(when-let [errors (validate schema value)]
557-
(throw (ex-info "Validation failed"
558-
{:errors errors
559-
:value value}))))
556+
#_(when-let [errors (validate schema value)]
557+
(throw (ex-info "Validation failed"
558+
{:errors errors
559+
:value value}))))
560560

561561
(defn valid?
562562
"Check if a value is valid according to a schema.
@@ -2850,6 +2850,13 @@ iris
28502850
(linear)))
28512851
{:col :island})
28522852

2853+
;; equivalently:
2854+
(-> (data penguins)
2855+
(mapping :bill-length-mm :bill-depth-mm {:color :species})
2856+
(=+ (scatter {:alpha 0.5})
2857+
(linear))
2858+
(facet {:col :island}))
2859+
28532860
(kind/test-last [#(and (= (count %) 2)
28542861
(= (:=col (first %)) :island)
28552862
(= (:=color (first %)) :species))])

0 commit comments

Comments
 (0)