Transformation

Edit this page

Data transformations in Vega-Lite are described via either top-level transforms (the transform property) or field transforms inside encoding (aggregate, bin, timeUnit, and sort).

When both types of transforms are specified, the top-level transforms are executed first based on the order in the array. Then the inline transforms are executed in this order: bin, timeUnit, aggregate, and sort.

Top-level Transform Property

{
  "data": ... ,
  "transform": [
     ...
  ],
  "mark": ... ,
  "encoding": ... ,
  ...
}

The top-level transform object is an array of objects describing transformations. The transformations are executed in the order in which they are specified in the array. Vega-Lite’s transform supports the following types of transformations: