Skip to content

Commit 05c4331

Browse files
committed
aog wip
1 parent 6f4cb70 commit 05c4331

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/data_visualization/aog_in_clojure_part1.clj

Lines changed: 10 additions & 6 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.
@@ -2845,14 +2845,18 @@ iris
28452845
;; regressions for each (species × island) combination.
28462846

28472847
(facet (=* (data penguins)
2848-
(mapping :bill-length-mm :bill-depth-mm {:color :species})
2848+
(mapping :bill-length-mm
2849+
:bill-depth-mm
2850+
{:color :species})
28492851
(=+ (scatter {:alpha 0.5})
28502852
(linear)))
28512853
{:col :island})
28522854

28532855
;; equivalently:
28542856
(-> (data penguins)
2855-
(mapping :bill-length-mm :bill-depth-mm {:color :species})
2857+
(mapping :bill-length-mm
2858+
:bill-depth-mm
2859+
{:color :species})
28562860
(=+ (scatter {:alpha 0.5})
28572861
(linear))
28582862
(facet {:col :island}))

0 commit comments

Comments
 (0)