Facet

Faceting allows you to repeat a visual across all values of a column, and provide a way to create hierarchical axes.

For example, the following chart is grouping the Netflix Country (GB, US) by each type (Limited Series, Movie, etc.). This is achieved by putting Type in the Rows field under Facet.

  • Facets group the data into distinct partitions, and repeat the subplot(s) for each partition

  • Facets can contain hierarchies with up to 8 levels

Layouts for tables and heatmaps

Another common way to use facet is to create tables or cohort charts. The following example uses the Rows to show two columns in the data, and the Cols to generate the columns in the table.

In this case, the Rows aren't hierarchies but by placing them under Facet as Rows we can have as many columns as we want.

Layouts for repeated marks

A third way to use facet is if you want to repeat a mark across several different categories. For example, in this chart a track's danceability and energy is repeated across each individual artist. This is achieved by putting main_artist in the Rows field under Facet.

Last updated