Custom Colours in Cube, Tree and Map Thematics
Added in Q3 23
There are many ways to apply thematic shading to a FastStats cube, tree or map, helping you to more easily visualise the distribution of records and quickly interpret numeric results. Typically you specify a 'low', 'high' and 'normal' colour and this generates a graduated scale according to the defined bands.
Sometimes, however, you may not want a graduated colour scale and, instead, a non-thematic, 'custom colour' solution is required. Let's take a look at some examples.
Example 1 - custom colour cube
Create a cube which displays the average profit per booking for each Holidays Company Plc store manager, broken down by holiday product. Use custom colours to indicate if the average profit for each manager/product is below, on or above target.
-
Create a new Cube from the FastStats Toolbox and add Manager and Product as dimensions.
-
Right drag the Profit variable into the middle of the cube as a measure and select Mean(Profit).
-
Open the Statistics dialogue and make Mean(Profit) the primary measure.
-
Build the cube.
-
Click to open the Thematic dialogue and from the Type drop-down select User Defined then Edit User Defined.
-
Enter the following bandings and then OK:
0-50
50-100
>100
-
Return to the Thematic dialogue and from the Colour drop-down select Custom and then Edit Colours.
-
In the Choose Category Colours dialogue set the number of bands to 3 and then click on the drop-down next to each banding to select the colour.
-
Click OK then Apply and OK and the cube display updates to reflect your defined settings.
At a glance, the custom colours allow you to see that Ahmed, Johnny and Peter appear to have some work to do whilst, in the main, all others are on or above target.
-
Sort into ascending or descending order by Mean(Profit) for an even clearer display:
Example 2 - custom colour tree
Following very similar steps, let's create a tree that displays the source of a person's holiday booking. Use custom colours to indicate whether the average cost of a booking from each source is considered 'bad', 'okay', or 'good'.
-
Open a new Tree from the FastStats Toolbox and add the Source variable as a dimension.
-
Right drag and drop the Cost variable into the middle of your tree as a measure and select Mean(Cost).
-
Open the Statistics dialogue and make Mean(Cost) the primary measure.
-
Build the tree.
-
Click to open the Thematic dialogue and from the Type drop-down select User Defined then Edit User Defined.
-
Enter the following bandings and then OK:
<=640
>=640 - <=650
>650
-
Return to the Thematic dialogue and from the Colour drop-down select Custom and then Edit Colours.
-
In the Choose Category Colours dialogue set the number of bands to 3 and then click on the drop-down next to each banding to select the colours - red for bad, yellow for okay, and green for good.
-
Click OK then Apply and OK and the cube display updates to reflect your defined settings:
You can now very quickly and easily discern that Google and Yell.com Referral are the sources that represent the higher average cost of holiday bookings.
Example 3 - custom colour map
Create a shaded map to display the average number of bookings by postal area. Use custom colours to indicate whether the average number of bookings in each area is considered to be 'bad', 'okay', or 'good'.
-
Open a new Map from the FastStats Toolbox.
-
In the Layer 1 tab, drag and drop Postal Area onto the Geographic Variable drop-box.
-
Right drag and drop the Number of Bookings variable into the Statistics panel and select Mean.
-
Set Mean(Number of Bookings) as the primary statistic.
-
Build the map.
-
In the Map tab, open the Thematic dialogue and set the Type to User Defined, then Edit User Defined and enter the following bands:
0-1.75
1.75-1.95
>1.95
Now you can set about selecting your colours in exactly the same way as you did for the cube and tree examples above. Click OK to complete the process and view the map:
With the use of non-thematic colours, you can clearly see that postal areas with a lower average number of bookings, shown in red, generally tend to be away from highly populated spots. Aside from a couple of outliers, green areas are primarily in and around London. Yellow areas make up the middle ground.
In addition to specifying non-thematic, custom colour maps, you can also create custom labels for each of the bands in the thematic shading. These are displayed in the map legend and are useful for giving meaning to the custom colours.
See Bing Maps: Shaded Map - Custom Thematic Labels
Related topic: