Powered by AppSignal & Oban Pro
Would you like to see your link here? Contact us

Livebook 0.6 Features

books/lb_features/lb_0.6.livemd

Livebook 0.6 Features

Mix.install([
  {:kino_vega_lite, "~> 0.1.4"},
  {:explorer, "~> 0.3.1"}
])

New Features

iris = Explorer.Datasets.iris()
iris
VegaLite.new(width: 600, title: "Super Chart")
|> VegaLite.data_from_values(iris, only: ["sepal_length", "sepal_width", "species"])
|> VegaLite.mark(:point)
|> VegaLite.encode_field(:x, "sepal_length", type: :quantitative)
|> VegaLite.encode_field(:y, "sepal_width", type: :quantitative)
|> VegaLite.encode_field(:color, "species", type: :nominal)
graph TD;
  A-->B;
  A-->C;
  B-->D;
  C-->D;