portal

Alan Birchenough 2023-01-16T22:03:28.314419Z

Apologies in advance if this is a daft question, but I am trying to render a simple vega-lite chart in a REPL context, i.e., I don’t need to output it anywhere, just eyeball it. I note that there is a vega-lite viewer in portal, but I can’t find any instruction on how to use it. I have found that, if I tap a vega-lite JSON spec as a string, the portal vega-lite viewer is available, but if I convert this to EDN, it is not available, no matter whether the EDN has been read in via edn/read-string, or slimply slurped into a string. To render the Clojure form of the spec I have downloaded Oz, but I’m still curious about whether I should have been able to do this with portal. Any thoughts?

djblue 2023-01-16T22:49:34.145579Z

The vega-lite spec looks like:

(s/def ::name string?)
(s/def ::description string?)
(s/def ::$schema
  (s/and string? #(re-matches #"\.github\.io/schema/vega-lite/v\d\.json" %)))

(s/def ::vega-lite
  (s/keys :req-un [::data]
          :opt-un [::name ::description ::$schema]))
This might be the missing piece 🤔

Alan Birchenough 2023-01-16T22:51:19.934909Z

Many thanks for the insight! I will check what I am tapping against that spec.