Vega-LiteTest Gallery

Advanced Calculations

Calculation of percentage of total using a window transform.

Calculation of difference from average using a window transform.

Calculation of difference from annual average using a window transform.

A scatterplot showing each movie in the database and the difference from the average movie rating (residual) calculated using a window transform.

Line chart showing ranks over time for thw World Cup 2018 Group F teams. Ranking is calculated using the window transform.

Waterfall chart of monthly profit and loss.

Filtering the top-k items. A bar graph showing the scores of the top 5 students. This shows an example of the window transform, for how the top K (5) can be filtered, and also how a rank can be computed for each student.

Top-k items with 'others'. Adapted by this example by Trevor Manz.

Using the lookup transform to combine data from two separate data sources that share a common key.

Cumulative Frequency Distribution. The cumulative frequency distribution can be calculated using a window transform.

Layered Histogram and Cumulative Histogram.

Faceted density estimates of Iris morphology measures.

Stacked density estimates of Iris morphology measures.

Alhough Vega-Lite supports only a single scale per axis, one can create a parallel coordinate plot by folding variables, using `joinaggregate` to normalize their values and using ticks and rules to manually create axes.

By setting aggregate to an object with opArgMax (or opArgMin) describing the field to maximize/minimize, the following plot shows the production budget of the film with the highest US Gross in each major genre.

Plot showing average data with raw values in the background.

Plot showing a 30 day rolling average with raw values in the background.

Benchmarking results shown as a line chart.