SP141 QuickReferenceGuide
SP141 QuickReferenceGuide
This document has been provided for the purpose of giving you a takeaway
for the Spotfire training experience. The pages in this document contain
important concept reminders, organized by the key learning objectives for
this course.
Course SP141 TIBCO Spotfire Analyst Advanced Calculations - Key learning objectives:
SPOTFIRE EXPRESSIONS - Build expressions to incorporate functions and property controls to enhance visual analysis
Page 2 • Insert Calculated Column • Columns • Properties
• Custom Expression • Functions • Recent expressions
Page 3 • Property Controls • List box • Insert as Value
• Input field • Drop-down list • Insert as Text
• Slider • Label • $map and $esc functions
Page 4 • Binning functions • Logical functions • Operators
• Conversion functions • Math functions • Property functions
• Date and Time functions • Ranking functions • Spatial functions
Page 5 • Statistical functions • Text functions • Expression shortcuts
Page 6 • Expression syntax • Loose format • THEN, [Value]
Page 7 • OVER • Axis.Axis Name • NavigatePeriod
Page 8 • Node navigation • Previous() • Parent()
• All() • AllPrevious() • Intersect()
RELATIONSHIPS & PREDICTIONS – Forecast future values or predict columns based on existing values
Page 9 • Lines & Curves • Calculated lines • Drawn lines
Page 10 • Forecast • Holt-Winters • Confidence interval
Page 11 • Data Relationships • numerical vs. categorical • R-squared values
• numerical vs. numerical • categorical vs. categorical • p-values
Page 12 • Regression Modeling • Model Summary • Diagnostic Visualizations
Page 13 • Classification Modeling • Model Summary • Diagnostic Visualizations
STATISTICAL ENGINES - Configure data functions to use the functionality of R, S+, SAS, and MATLAB within Spotfire
Page 14 • Entering TERR script
Page 15 • Data Function • Statistical engines • Samples
Page 16 • Register Data Function • Script • Input and Output
MULTIVARIATE DATA ANALYSIS - Explore computational tools in order to bring order to multivariate data
Page 17 • Normalization • Empty values • Replace or break lines
Page 18 • Line Similarity • Correlation similarity • Euclidean distance
Page 19 • K-means Clustering • Interpret results • Additional information
Page 20 • Hierarchical Clustering • Dendrograms • Clustering methods
Page 21 • Pruning line • Cluster ID column • Clustering settings
© TIBCO Software Inc. Page 1 TIBCO Spotfire Analyst Advanced Calculations – Quick Reference Guide
SPOTFIRE EXPRESSIONS
Calculate new columns or alter the expression applied to a visualization property using this dialog:
Available columns can Properties are values stored outside Functions can be found by
be added to the expression; the data table and can be used as part of viewing a specific functions
use the search field to limit the expression. Right-click to Insert as Category, or use the
columns displayed Value when property is part of a search field to limit
mathematical calculation. functions displayed
Expressions dialog
Recent expressions allows you to insert an Display name may edit a custom
expression you have recently created recently, perhaps expression on a visualization property
in another visualization or even another analysis session just to change the title on the selector
© TIBCO Software Inc. Page 2 TIBCO Spotfire Analyst Advanced Calculations – Quick Reference Guide
SPOTFIRE EXPRESSIONS
$esc , used to replace ‘[‘ and ‘]’ to indicate that a property value is a column name
© TIBCO Software Inc. Page 3 TIBCO Spotfire Analyst Advanced Calculations – Quick Reference Guide
SPOTFIRE EXPRESSIONS
Spotfire functions are organized Binning functions are an option for implementing binning
into categories:
instead of using: Insert ▼ Binned Column …
-or-
Spatial functions
select examples
GreatCircleDistance returns the shortest distance between two points, calculated on the surface of a unit sphere
© TIBCO Software Inc. Page 4 TIBCO Spotfire Analyst Advanced Calculations – Quick Reference Guide
SPOTFIRE EXPRESSIONS
Text functions
select examples
UniqueConcatenate return only one from replicates
Substitute replace text
Trim removes whitespace from the beginning and end of string
Right, Left, Mid return specific characters from string
Upper, Lower change case
RXReplace, ~= functions are based on regular expressions
© TIBCO Software Inc. Page 5 TIBCO Spotfire Analyst Advanced Calculations – Quick Reference Guide
SPOTFIRE EXPRESSIONS
• Function(Arg1, Arg2, Arg3) , arguments are separated by ‘,’ and may be columns, #s, or text
Examples: Sum([Electronics],[Furniture],[Toys])
Avg([Profit])/Sqrt(3)
Substitute(“pound sign”, [Label], “hash”)
case is ignored
Examples: AVG([TOYS]) Avg([toys])
avg([Toys]) avg([toys])
• THEN , a keyword which breaks an expression into separate portions to facilitate processing on
database computational engines or perform more efficient calculations on in-memory data
Example: Sum([Sales])
THEN Avg([Value]) OVER (LastPeriods(3,[Axis.X]))
THEN If (Count() OVER (LastPeriods(3,[Axis.X]))=3,[Value], null )
• [Value] , a placeholder variable which represents the results of the previous THEN expression
Example: Sum([Sales]) THEN [Value] / Sum([Value]) OVER (All([Axis.X]))
© TIBCO Software Inc. Page 6 TIBCO Spotfire Analyst Advanced Calculations – Quick Reference Guide
SPOTFIRE EXPRESSIONS
NavigatePeriod
Arg 1: Hierarchy to navigate Optional ...
[Axis.Name] Arg 4: Level to move down to
Arg 2: Level to move to in hierarchy number of steps
0, 1, 2 (relative to leaf level) name of level
“Month”, “Quarter”, “Year”
Arg 3: Number of steps to move sideways in hierarchy When Arg 4 is omitted, you are
-2, -1, 0, 1, 2 navigated to the leaf level
Syntax is:
[Axis.Axis Name]
© TIBCO Software Inc. Page 7 TIBCO Spotfire Analyst Advanced Calculations – Quick Reference Guide
SPOTFIRE EXPRESSIONS
All() function
Previous() function
AllPrevious() function
Parent() function
Intersect() function
© TIBCO Software Inc. Page 8 TIBCO Spotfire Analyst Advanced Calculations – Quick Reference Guide
RELATIONSHIPS & PREDICTIONS
© TIBCO Software Inc. Page 9 TIBCO Spotfire Analyst Advanced Calculations – Quick Reference Guide
RELATIONSHIPS & PREDICTIONS
Visualization Properties
♦ Lines & Curves
• Forecast – Holt-Winters ...
© TIBCO Software Inc. Page 10 TIBCO Spotfire Analyst Advanced Calculations – Quick Reference Guide
RELATIONSHIPS & PREDICTIONS
Tools ▼ Data Relationships … The Data Relationships tool allows you to make pair-wise
comparisons of data columns, in an effort to determine if there are
any potential relationships between the data in those columns.
* Parametric – assumes that the data is normally distributed and that the
variances of the groups or errors are approximately equal
† Nonparametric – uses the rank order of the data rather than the actual
values; is appropriate when the parametric assumption
of normality and equality of variance is not met
Interpreting results:
As R2 values approach 1, the Interacting with the results table will
correlation or inverse correlation allow you to view the raw data
between X and Y variables is stronger. columns for the marked rows in the
corresponding results visualizations.
© TIBCO Software Inc. Page 11 TIBCO Spotfire Analyst Advanced Calculations – Quick Reference Guide
RELATIONSHIPS & PREDICTIONS
Normal Quantile-Quantile Shape of curve ideal is straight line (see help for other line shapes)
© TIBCO Software Inc. Page 12 TIBCO Spotfire Analyst Advanced Calculations – Quick Reference Guide
RELATIONSHIPS & PREDICTIONS
© TIBCO Software Inc. Page 13 TIBCO Spotfire Analyst Advanced Calculations – Quick Reference Guide
STATISTICAL ENGINES
3. As a Data Function
© TIBCO Software Inc. Page 14 TIBCO Spotfire Analyst Advanced Calculations – Quick Reference Guide
STATISTICAL ENGINES
© TIBCO Software Inc. Page 15 TIBCO Spotfire Analyst Advanced Calculations – Quick Reference Guide
STATISTICAL ENGINES
S-PLUS function
Tools ▼ Register Data Function … S-PLUS script
R function - Open Source R
1. Write script or select function R script - Open Source R
2. Define input variables R script – TIBCO Enterprise Runtime for R
3. Define output variables MATLAB® script
SAS® script
Input and Output handling for the copy of the Function definition
within a given Spotfire analysis can be edited.
Spotfire Statistics
Services Edit ▼ Document Properties ♦ Data Functions
-or- Local Adapter
Decide if the function will
automatically update, or will
require you to click to update.
• TIBCO Enterprise Runtime for R (TERR)
• S+ Engine
• Open source R Engine
• MATLAB® Engine You may limit data
• SAS® Engine input based upon
subsets of data
defined by filtering
or marking.
© TIBCO Software Inc. Page 16 TIBCO Spotfire Analyst Advanced Calculations – Quick Reference Guide
MULTIVARIATE DATA ANALYSIS
Normalization
Before initiating any computational
multivariate data analysis techniques (Line
Similarity, K-means Clustering, Hierarchical
Clustering), consider whether any
normalization needs to be applied.
Empty values
Before initiating any computational multivariate data
analysis techniques, consider how empty values will be
treated during the calculations:
Line Similarity
K-means Clustering
Visualization Properties ♦ Appearance
© TIBCO Software Inc. Page 17 TIBCO Spotfire Analyst Advanced Calculations – Quick Reference Guide
MULTIVARIATE DATA ANALYSIS
Interpreting results:
Correlation similarity Euclidean distance
compares the shape to the master line compares the distance between points to the master line
d d Similarity = ∑d
Similarity = +1
d
d d
Similarity = 0
Similarity = -1 Similarity ~0
© TIBCO Software Inc. Page 18 TIBCO Spotfire Analyst Advanced Calculations – Quick Reference Guide
MULTIVARIATE DATA ANALYSIS
Interpreting results:
Good K-means clustering meets two criteria:
1. Each cluster group has similar line patterns
2. Similar patterns do not appear in different cluster groups
If these criteria are not met, consider repeating the clustering with a different max number of clusters.
Additional information about the clustering settings and calculations can be found in the resulting K-means
Clustering column:
Edit ▼ Column Properties … General ♦ Description
© TIBCO Software Inc. Page 19 TIBCO Spotfire Analyst Advanced Calculations – Quick Reference Guide
MULTIVARIATE DATA ANALYSIS
© TIBCO Software Inc. Page 20 TIBCO Spotfire Analyst Advanced Calculations – Quick Reference Guide
MULTIVARIATE DATA ANALYSIS
Interpreting results:
The advantage of applying Hierarchical clustering, over K-means clustering, is the fact that
you can select the number of cluster groups after the clustering has been applied. The
HIERARCHICAL resulting dendrogram will show you a map of similarities - remember, shorter brackets
CLUSTERING indicate greater similarity. Move the Pruning line to select a number of cluster groupings.
A new Row cluster IDs column is tied to the position of the pruning line.
Hierarchical
clustering
settings
Pruning line
Drill down
You can mouseover and mark
dendrogram to drill down to get
details about specific areas of the
dendrogram or clustered heat map.
© TIBCO Software Inc. Page 21 TIBCO Spotfire Analyst Advanced Calculations – Quick Reference Guide