Visualizations

Making data pretty since 1160BC*

How to create a visual in Count

Each cell output can display either a table of results (the default) or a visual.

You can switch between a table and visual using the 'Show visual' button in the cell output:

How to edit a visual

Click the 'Expand' button to reveal the visual editor.

The visual editor allows you to assign columns from the results table onto different chart axis. Each chart is made up of a number Subplots, Layers and Groups.

We'll now dive into each of these concepts in more detail.

Layers

Layers are where we map columns to axes. They are the most fundamental part of each visual.

For each layer you can pick:

  • The layer type (Bar, Circle, Line, Area, Square, Text) - this determines how each element in a column in displayed on the visual.

  • X - the column to place on the x-axis.

  • Y - the column to place on the y-axis.

  • Color - a single color for the layer, or a column to determine the color of each element.

  • Size - a single size for the layer, or a column to determine the size of each element.

  • Path (for Line only) - a column to determine in which order the lines in the layer are joined up.

  • Text (for Text only) - a column to determine the text shown for each element in a text layer.

  • Detail - any number of columns to determine the values shown in the tooltip.

The power of multiple layers

Layers become most powerful when you have more than one layer on a single plot. By default, Count will lay each layer on top of each other, sharing the same axes if possible. But you can always use the secondary X2 (top), and Y2 (right) axes.

For example, if we want to add a line to the chart above to show the total number of streams for their top 10 tracks for each artist, we can do the following:

This layer now has the same y-axis, artist , but streams is now on the bottom X2 axis instead of the top since their scales are very different.

Using secondary axes

To map something on one of the Secondary Axes (Top, or Right), use the X2 and Y2 buttons on the layers.

You can plot multiple layers on the same axes but they will all have to use the same scale.

Subplots

Subplots define the grid of independent plots we want in our final visual. You can add multiple subplots if you want to display data side by side.

The subplots need to come from the same results table, so you cannot have 2 subplots with independent data, only independent axes.

The video below shows how to create and use subplots:

In the example above, we created 2 subplots, one on top of the other. These subplots had different independent y-axes, but they shared an x-axis (month). This is because month was on a Group. Let's learn more about those now...

Groups

Groups are a great way to partition your chart, and create hierarchical axes. Groups are like axes that sit at the highest level so they apply to all subplots and all layers.

The image below shows how to use groups to make a hierarchical axis.

We put both artist and track name in the Y Group. If we were to add any subplots or new axes, that Y Grouping would persist.

Formatting visuals

Once you have the chart you want, formatting that chart can make all the difference when communicating with others.

Styling

To customize the chart styling, select the Style tab in the expanded visual view:

The following image explains the style options:

Customizing your axis

When you select an axis in your Edit Visual builder a new menu will appear that lets you customize your axis including the title, the format, and scale of the values.

Axis titles

There are no restrictions on what you can name your axis, so be as descriptive as you need to make your chart easy to understand. You can even use emojis (👍)

Axis sorting

To sort your chart by one of your axes, you can tick the box for Ascending, Descending, or None in the Sorting section of the menu.

Axis scales

By default, the axis will scale to show the full range of values, but if you want to specify the range, and the scale (e.g. Linear, or Logarithmic), you can do so in the Scale section of the menu.

Axis label formatting

To change the way your axis labels are formatted, you can specify exactly how you want them displayed in the Labels section. This includes:

  • Numbers (e.g. 3M)

  • Currency (e.g. £343.56)

  • Datetime (e.g. 10/10/2020)

  • Percentage (e.g. 12%)

  • Scientific (e.g. 3E10)

For each of the above Label Types, you can also customize:

  • Decimal places displayed

  • Display Units: 1000 -> 1K

  • Negative Values: -123.45 or (123.45)

  • Prefix: string to put at the start of the label

  • Suffix: string to add to the end of the label

  • Thousands operator: 1,000 or 1000

And for dates, the options are:

  • Short date: 10/11/2020

  • Long date: Tuesday, November 10, 2020

Color Customization

You can customize the color of a layer in several ways:

Uniform color

If you have not placed a column on the color axis of a layer, you can select a uniform color for the layer by clicking on the Color axis, and selecting a color from the picker:

The color controls available when there is no column on the color axis.

Continuous color scale

If there is a numerical or datetime column on the color axis, you can choose to use a continuous color scale. In this type of scale, the color of an element in the visual varies smoothly between different color stops. In the image below, the stops are the circles overlaid on the color bar.

Color stops can be dragged left and right to adjust the color scale. If you click on a color stop, you can edit precise details about its position and color. If you press the delete or backspace key while a color stop is open, it will be deleted.

The controls available for continuous scales.

Categorical color scale

If there is any column on the color axis (including string columns), you can choose to use a categorical color scale. In a categorical color scale, you pick a fixed palette of colors which repeat for all of the distinct values in the column on the color axis. You can also pick color overrides, which only affect single values from the column. In the example below, the pink color for Albuquerque has been overriden to red.

The controls available for categorical scales.

Size customization

You can adjust the size of elements in your visual by clicking the size axis. This will adjust:

  • The radius of circles in a Circle layer

  • The width of lines in a Line layer

  • The width of bars in a Bar layer

  • The width of squares in a Square layer

  • The height of text in a Text layer

  • (No effect on an Area layer)

The size controls available when there is no column on the size axis

If you have placed a column on the size axis, you can adjust more options by clicking on the Size text:

  • Domain (min/max) - these are the values in the column which define the smallest and largest sizes (not available for string column types).

  • Size (min/max) - these are the maximum and minimum sizes that will appear on the visual.

  • Reversed - flip the direction of the size scale so that, for example, a value of Domain (min) will appear at a size of Size (max).

The size controls available when there is a column on the size axis

See more visual examples here:

*Gotta love wikipedia.