In this chapter, we will cover:
Understanding how to create and use trend lines
Understanding and using the forecasting functionality
Understanding and using reference lines - bullet chart
Understanding how to perform clustering
In this chapter, we will cover:
Understanding how to create and use trend lines
Understanding and using the forecasting functionality
Understanding and using reference lines - bullet chart
Understanding how to perform clustering
There are often circumstances when we need to show some benchmarks and then compare actual performance against those benchmarks. We may also be required to find out the trend of our business to understand whether the underlying market conditions are working in our favor or not. Further, looking at the historic performance, we may also be required to do some forecasting in order to decide on future targets. Keeping these points in minds, we will focus on some specific analytics in terms of computing and understanding the trends in our data; using the built-in forecasting model to compute a forecast from our data; and, lastly, understanding how we can benchmark our data against thresholds using reference lines.
Trend lines are typically used to observe the relationship or correlation between two variables, where the shape of the trend line indicates the type of the relationship between the variables; for example, how is our profit value related to our marketing expenses, or how is our profit value related to the discounts that we are offering?
Further, trend lines can also be used to indicate the general pattern or direction of time series data; for example, to plot the change in variables such as sales, profit or cost over a period of time. While line charts, when used to show such changes, may show fluctuations in values over a period of time, a trend line plotted in addition to this line chart would also help us understand the general direction of the change.
At times, trend lines can also be used for basic forecasting, based on an extrapolation of the trend line.
Let us go through the following recipe to see how to generate a trend line.
There may be several circumstances where we need to read historical data and to extrapolate this historical data to get an approximate idea of what to expect in the future. These forecasted values can help us in, say, budget planning or even redefining our current strategies.
The forecasting functionality in Tableau uses an built-in statistical model that enables us to estimate future values by extrapolating historical data while also taking trend and seasonality into consideration. Among the various models that are available for forecasting, Tableau uses the exponential smoothing model.
An important point to remember is that there are plenty of external factors that govern the actual data and hence the forecast will give us an approximate idea of what to expect in future. The accuracy of this forecast however will depend on the quality of the historical data.
Reference lines are typically used for providing a visual comparison against benchmark values. Imagine having a vertical bar chart showing product sales. Further, imagine that these products have a budget value that they are supposed to achieve. Now, if we are able to show a small line which represents the budget thresholds for each of the products, then we can provide a quick visual display to see which products are not exceeding target and which products are exceeding the target. The chart type which is typically used to do a target versus actual comparison is called a bullet chart.
Bullet charts were developed by Stephen Few. A bullet chart is an extension of the regular bar chart, where the length or height of the bar represents the actual values and the horizontal or vertical reference line represents the target.
Often we are required to quickly locate distinct and well separated groups in our data, for example, grouping customers who have the same buying patterns, or patients with similar symptoms, and so on. More often than not, this can be done using the grouping functionality that we saw in previous chapters.
However, this can be challenging, as finding patterns via manual inspection for complex and distributed datasets with no obvious patterns can be very tough.
The new clustering functionality in Tableau automatically groups together similar data points by finds patterns in data using a K-means algorithm to help the user explore patterns in the data that would be tough to pick out otherwise.
Let us explore the clustering functionality in more detail in the recipe.
We will use a new dataset for the following recipe. The dataset is a .tde
, file which has been uploaded on the following link:
https://1drv.ms/u/s!Av5QCoyLTBpnhks3n2mxItiI7-tb.
The file...