VegaLite.encode

You're seeing just the function encode, go back to VegaLite module for more information.
Link to this function

encode(vl, channel, opts)

View Source

Specs

encode(t(), atom(), keyword()) :: t()

Adds an encoding entry to the specification.

Visual channel represents a property of a visual mark, for instance the :x and :y channels specify where a point should be placed. Encoding defines the source of values for those channels.

In most cases you want to map specific data field to visual channels, prefer the encode_field/4 function for that.

All provided options are converted to channel properties.

Examples

Vl.new()
|> Vl.encode(:x, value: 2)
|> ...

Vl.new()
|> Vl.encode(:y, aggregate: :count, type: :quantitative)
|> ...

Vl.new()
|> Vl.encode(:y, field: "price")
|> ...

See the docs for more details.