Trend Lines and Reference Lines In Tableau
Recommended by 0 users
Trend Lines and Reference Lines in Tableau:
Use the Tableau trend line feature to incrementally construct interactive models of behavior. With trend lines you can answer such questions as whether profit is predicted by sales, or whether average delays at an airport are significantly correlated with the month of the year.
Visualizing granular data sometimes results in random-looking plots. Trend lines help you interpret the data by fitting a straight or curved line that best represents the pattern contained within detailed data plots. Reference lines provide visual comparisons to benchmark figures, constants, or calculated values that provide insight into marks that don’t conform to expected or desired values.
The chart on the left employs a linear regression line to plot the trend in volatile weekly sales figures. The pattern of sales is volatile— making it difficult to see the overall pattern. The trend isn’t very pronounced, but the trend line helps you see that sales are trending down slightly. That question can be answered by pointing at the trend line and reviewing the statistical values displayed or by pointing at the trend line, right-clicking, and selecting describe trend model.
Trend line and reference line diagram :
Describe the trend model diagram :
Describing the trend model exposes the statistical values that describe the trend line plot. If you are a statistician, all the figures means something to you. If you aren’t a statistics expert, they help you evaluate the reliability and predictive value of the trend line plot. If the P-Value is greater than .05, then the trend line doesn’t provide much predictive value. R-Squared provides an indicator of how well the line fits the individual marks. The linear regression trend line displayed on the left side clearly doesn’t have much predictive value (P-Value is .513291, which implies a confident interval of less than 50 percent), nor does the line fit the marks particularly well. The R-Square value (.008) is very low, indicating that the plot doesn’t fit the marks very precisely. Tableau does the best job, it can fit the line to the plot, but if the marks are randomly scattered, the R- Squared value will be low. The combination of low P-Value and R-Squared value means that the trend line on the left side does not provide much predictive value.
The chart on the right uses the same data as the chart on the left, but this time a reference line has been applied to show the target value of $ 85,000. A reference distribution has also been calculated to show two standard deviations from the mean value of the plot. Assuming the data is normally distributed— marks outside of that range indicate abnormal variation that would warrant further investigation to determine the cause of the variance.
You don’t need to become a statistics expert to use trend lines and reference lines. But, understanding the basics will certainly help you interpret what the plots indicate. A web search will provide more details regarding the mathematics, if you are interested.
Adding Trend Lines and Reference Lines to Your Charts
There are many options available for presenting trend lines and the reference lines in Tableau. Take a look below at each one, in more detail.
When you add trend lines to the view, you can specify how you want them to look and behave. Add a trend line to your visualization by right-clicking on the white space on the worksheet and selecting the menu option trend lines/show trend lines. This adds a linear regression line options which are available if you point at the trend line, right-click, and select edit trend lines.
The trend line options menu diagram :
The trend line menu provides options for changing the trend line type. If your chart uses color to express a dimension, you can choose to create separate trend lines for each colored line in the view-or not. Selecting show confidence bands add upper and lower bounding lines based on the variation of the data. If you’re applying trend lines in charts like scatter plots, you can also force the trend line to intercept the vertically y-axis at zero.
One way to enhance your Tableau visualizations is by adding a reference line.
You can use a reference line to mark a specific value or area on an axis in your view. Or you can add a reference line to any continuous axis. Reference lines are straight lines that originate from a constant or computed value on an axis. There are many different options for reference lines and you can apply more than one reference line to the axis. To add a reference line, right-click on the axis from which you want to apply the reference line. Be careful to point at the white space and not at the title or axis label. The reference line menu selections are used to add the standard deviation reference distribution displayed in the time series plot.
Reference line menu standard deviation reference line diagram :
The same chart includes a second reference line that displays a constant. This was added by selecting the reference “line” type to display a manually-entered constant value of $85,000
Two more reference line examples along with the related reference line menu selections, reference line displaying (median) with reference bands for maximum and minimum values. Note the use of the Symmetric Color option. Selecting this causes the color bands outside of the widest quintile lines to use the same color hue. If Symmetric Color wasn’t selected, the band color would get darker from top to bottom. Alternatively, if the symmetric options were left unchecked and the reverse was selected, the color bands would get lighter from top to bottom.
Applying color fill above or below reference lines calls attention to specific areas of your visualization. Use trend lines and reference lines in moderation. They add insight to your visualizations, but too many reference lines can lead to chart clutter and make it more difficult to understand.
References bands and references distributions diagram :
Types of Reference Lines and Bands
Reference distributions are a variation of reference bands. A reference distribution adds a gradient of shading to indicate the distribution of values along the axis. Distributions can be defined by confidence interval, percentages, percentiles, quantiles, or standard deviation. In addition to the shading, you can add a line to mark a constant or computed value along the axis.
Enroll For Instructor Led Live Tableau Training @ Mindmajix