Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 1.66 KB

README.md

File metadata and controls

44 lines (30 loc) · 1.66 KB

dedav4s

Declarative Data Viz 4 Scala - a thin shim around vega and vega lite.

Documentation

Video

javadoc

Elevator pitch

3 sec pitch

The aim is to make "simple" plotting cases as simple as possible in interactive / scripting scala environments. The idea is to expose vega / lite, in a fairly "raw" manner. There are "plot targets" for the all the "common" environments that I have wanted.

Project status

This library works well enough for my needs, and I've been using it for a couple of years now.

Generating the DSL

Clone quicktype npm run build... or paste into app.quicktype.io

script/quicktype -o vega-lite.scala -t VegaLiteDsl -l scala3 --no-combine-classes -s schema --framework circe --src https://raw.githubusercontent.com/vega/schema/master/vega-lite/v5.7.1.json  --package viz.vega.dsl.vegaLite
script/quicktype -o vega.scala -t Vega -l scala3 --no-combine-classes -s schema --package viz.dsl.vega --framework circe --src https://raw.githubusercontent.com/vega/schema/master/vega/v5.24.0.json

Currently, there are some niggling problems which remain after generation;

  1. Some givens of union types have duplicate shapes, need to comment out the encoder / decoders for some of them
  2. introduce a nulltype parameter.

Import map

{
  "imports": {
    "##vega-embed": "https://cdn.jsdelivr.net/npm/vega-embed@6/+esm",
    "##vega-view": "https://cdn.jsdelivr.net/npm/vega-view@5/+esm"
  }
}