Ā (:require [tupelo.core :as t]Ā
Ā Ā Ā Ā Ā Ā [datascript.core :as d]
Ā Ā Ā Ā Ā Ā [clojure.set :as set] ))
Ā [ {:type :x :local/id 1, Ā :obs/A "11", Ā Ā :obs/value 2.0, Ā Ā :obs/color "yellow"}
Ā Ā {:type :x :local/id 2, Ā :obs/A "12", Ā Ā :obs/value 4.0, Ā Ā :obs/color "blue"}
Ā Ā {:type :x :local/id 3, Ā :obs/A "13", Ā Ā :obs/value 3.0, Ā Ā :obs/color "green"}
Ā Ā {:type :x :local/id 3, Ā :obs/A "15", Ā Ā :obs/value 7.0, Ā Ā :obs/color "red"}Ā
Ā Ā {:type :y :local/id 2, Ā :obs/A "11", Ā Ā :obs/value 7.0, Ā Ā :obs/shape "square"}
Ā Ā {:type :y :local/id 2, Ā :obs/A "13", Ā Ā :obs/value 4.0, Ā Ā :obs/shape "circle"}
Ā Ā {:type :y :local/id 6, Ā :obs/A "15", Ā Ā :obs/value 3.0, Ā Ā :obs/shape "triangle"} ] )
(newline) (println "data") (pretty data)
(def conn (d/create-conn {}))
Ā (d/q '[:find ?a ?value1 ?value2
Ā Ā Ā Ā Ā Ā Ā Ā [?ex :type :x] [?ex :obs/A ?a] [?ex :obs/value ?value1]
Ā Ā Ā Ā Ā Ā Ā Ā [?ey :type :y] [?ey :obs/A ?a] [?ey :obs/value ?value2]
(newline) (println "labelled-result") (pretty labelled-result)