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.
In this scenario, both the measurement and its projected future value are less than the target value.
In this scenario, the measurement is less than the target value, but its projection is expected to exceed the target.
In this scenario, the measurement has already exceeded the target value, and the projection is even greater.
800
for all gauges.Like other Arcadia Enterprise 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.
Start a new visual based on dataset District Performance.
See Importing Data, Creating Datasets, and Creating Visuals.
In the visuals menu, find and click Gauge (row 2, column 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.
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
).
In the Enter/Edit Expression modal window, change the expression to the following formula:
floor(sum([Api13]*[Valid])/sum([Valid]))
Compare To field: add the field Api13
. Then
customize the expression to change it to the state-wide target of
API=800
.
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])
.
floor(sum([Api12]*[Valid])/sum([Valid]))
floor(sum([Api13]*[Valid])/sum([Valid])) -
floor(sum([Api12]*[Valid])/sum([Valid]))
sum([Valid])
We suggest that you apply an Alias to these fields. We
later named them 2012 API Score
, 2012 -> 2013
Growth
, and Students
.
Cname
for name of the County, selecting the values Alameda,
Kings, Marin, Mendocino, Sierra, and Siskiyou.Cname
(county name) to
trellis the visual. Alias it as County
.Click Refresh Visual.
The new gauge visual appears.
Notice that the gauge line makes it easier to recognize
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.
At the top left corner of the Visual Designer, click Save.
At the top left corner of the Visual Designer, click Close.
To adjust the gauge display, check all the available settings for this visual.