Gauge Visuals

Gauge visuals resemble simple speed dials in automobile dashboards, but they are powerful tools for communicating performance against set targets, projected trends, and a qualitative assessment of the measurement. Gauges show minimum and maximum values on an evenly distributed scale, and qualitative ranges for classifying the primary measurement as different colors, which is very useful for visually distinguishing them from one another.

Gauges are semi-circular by default, and include many setting adjustments.

Consider these three examples of gauge charts, to illustrate their structure.

Example 1: Measure < Projection < Compare To

In this scenario, both the measurement and its projected future value are less than the target value.

elements of gauge visual type where Measure < Projection < Compare To
Example 2: Measure < Compare To < Projection

In this scenario, the measurement is less than the target value, but its projection is expected to exceed the target.

elements of gauge visual type where Measure < Compare To < Projection
Example 3: Compare To < Measure < Projection

In this scenario, the measurement has already exceeded the target value, and the projection is even greater.

elements of gauge visual type where Compare To < Measure < Projection

Like other Arcadia Instant visuals, the gauge visual may be trellised using X and Y shelves, have additional fields on the Tooltips shelf, and use Filters.

This example uses the 2012 and 2013 API Scores for California School Districts.

We are working with the dataset District Performance, built on the ca-district-apis.csv datafile that contains the California School District APIs from 2012 and 2013. The range of possible scores varies from a low of 200 to a high of 1000; however, the statewide API performance target is 800.

  1. Start a new visual based on dataset District Performance.

    See Importing Data, Creating Datasets, and Creating Visuals.

  2. In the visuals menu, find and click Gauge (row 2, column 3).

    selecting gauge chart type
  3. Note that the shelves of the visual changed. They are now X, Y, Measures (mandatory), Compare to, Qualitative Ranges, Projection, Label, Tooltips, and Filters.

    shelves of gauge visual type
  4. Populate the shelves from the available fields (Dimensions, Measures, and so on) in the Data menu.

    • Measure shelf: add the field Api13. Then customize the expression to calculated the waited average of the field, based on the number of students tested in each district (field Valid).

      • Click the (right-arrow) icon to the left of the field, and select the [] Enter/Edit Expression option.
      • In the Enter/Edit Expression modal window, change the expression to the following formula:

        floor(sum([Api13]*[Valid])/sum([Valid]))
      • Click Validate & Save to ensure that everything works.
    • Compare To field: add the field Api13. Then customize the expression to change it to the state-wide target of API=800.

      Click the (right-arrow) icon to the left of the field, and select the [] Enter/Edit Expression option. Change the expression to the scalar value of 800, and click Validate & Save to ensure that everything works.
    • Qualitative Ranges shelf: add the field Api13. Then, specify the equation that returns the upper limit of the first qualitative range. For this visual, we are using simple scalar values.

      Click the (right-arrow) icon to the left of the field, and select the [] Enter/Edit Expression option. Change the expression to the scalar value 600, and click Validate & Save.

      To create other ranges, simply click the (right-arrow) icon to the left of this field, and select the Duplicate option. Then open the Enter/Edit Expression modal window for the duplicate, change the value, and click Validate & Save. In this example, we defined three ranges: at 600, 700. and 800.

      Later, we aliased the qualitative ranges as Poor, Improving, and Satisfactory, in that order.

    • Projection field: add the field Api13. Then, specify the equation that projects the current measurement to some future date by clicking the (right-arrow) icon to the left of the field, selecting the [] Enter/Edit Expression option, and changing the expression to the following SQL clause:

      if(  sum([Api13]*[Valid])/sum([Valid])>800,
           sum([Api13]*[Valid])/sum([Valid])+25,
           sum([Api13]*[Valid])/sum([Valid]) + 50)
    • Label field: add the field Api13, and convert the expression to the following SQL clause:

      concat("API: ", cast(floor(sum([Api13]*[Valid])/sum([Valid])) as string))

      [Optional] Add the field Cname below the first field, and change its aggregation to max([Cname]).

    • Tooltips shelf: add more fields here to provide additional information. We created the following tooltips:
      1. floor(sum([Api12]*[Valid])/sum([Valid]))
      2. floor(sum([Api13]*[Valid])/sum([Valid])) - floor(sum([Api12]*[Valid])/sum([Valid]))
      3. sum([Valid])

      We suggest that you apply an Alias to these fields. We later named them 2012 API Score, 2012 -> 2013 Growth, and Students.

    • Filters shelf: add the filters here. We used Cname for name of the County, selecting the values Alameda, Kings, Marin, Mendocino, Sierra, and Siskiyou.
    • Y shelf: add the field Cname (county name) to trellis the visual. Alias it as County.
    filled shelves of bullet visual
  5. [Optional] Click the Settings menu, select Marks, and de-select the Show trellis borders option. See Showing Trellis Borders.
  6. [Recommended] Click the Settings menu, select Marks, and select the Include a gauge line option. See Displaying Gauge Lines.
  7. [Optional] Click the Colors menu, and select different options for Foreground Color, Pointer Color, and Background Color from the color palette menu. You may change the Projection Opacity and Background Opacity options, too; we left them alone.
  8. [Optional] Alias the fields. We used the names of the shelves for each alias.
  9. Click Refresh Visual.

  10. The new gauge visual appears.

    Notice that the gauge line makes it easier to recognize

    Trellised gauge visual
  11. Change the title to District Performance, by County - Gauge.

    • Click (pencil icon) next to the title of the visualization to edit it, and enter the new name.

    • [Optional] Click (pencil icon) below the title of the visualization to add a brief description of the visual.

  12. At the top left corner of the Visual Designer, click Save.

  13. At the top left corner of the Visual Designer, click Close.

To adjust the gauge display, check all the available settings for this visual.