TIBCO Statistica® Data Function in Spotfire
Starting with TIBCO Statistica® 13.4 release, TIBCO Statistica and TIBCO Spotfire® can be nicely integrated together. One of the most important and impactful feature is calling Statistica Workspace as Spotfire Data Function (if you are not familiar with concept of data functions, please review this video). You can do these calls from Spotfire Analyst as well from web dashboards (starting with 13.6 release).
Users of TIBCO Spotfire now can use strengths of TIBCO Statistica to extend the information which can be visualized – user can incorporate to his/her dashboard predictions, complex data preparation and cleaning procedures, results after application of statistical models to selected data and much more.
We have created a video with showcase of examples of this integration. You can view on the TIBCO Youtube channel (following video was built with TIBCO Statistica 13.4):
TIBCO Statistica 13.5 release brings important enhancement to this functionality. The Spotfire Analyst creating a Statistica data function can now parameterize the connected Statistica workspace. When the user registers a new Statistica Data Function by selecting a workspace, input parameters of value-type are created to expose node-level parameters. This gives the analyst greater control over the analytic options.
Below is a video showing this functionality:
The machine to be used for creating Statistica workspace as a data function should have the following:
- Spotfire Analyst Portable Client or Spotfire Analyst 10.3 with access to Spotfire Analyst Server
- TIBCO Statistica 13.5 or higher (any type of installation)
- TIBCO Data Science for TIBCO Spotfire Analyst Software (13.6.0 version installed on TIBCO Spotfire Server)
- This include two files: StatisticaEngine.spk and StatisticaExtension.spk
After successful installation of extensions user should have available new option in Tools menu of Spotfire called Statistica.
If you need to enable Spotfire Consumer to use dashboards with data functions. There should be Spotfire Server with Statistica Service configured:
- TIBCO Spotfire Server 10.3.0 or above
- TIBCO Data Science Service for TIBCO Spotfire 13.6 configured on Spotfire Server
All these products and extensions can be downloaded from e-delivery site (look for the names above).
Remark: Statistica data function can be embedded directly into dxp. In that case dashboard with embedded Statistica data function can be run on any Spotfire Analyst with Statistica Extension for Spotfire without need of local installation of Statistica.
Possibilities of usage
Statistica data function can be used for:
- Data preparation steps done by Statistica: With no inputs from Spotfire it can do the whole data cleaning and data preparation steps. Spotfire dashboard can be built on data after preparation steps are applied.
- Data cleaning of data already loaded to Spotfire.
- Computation of statistical outputs which are not included natively in TIBCO Spotfire (e.g. results of statistical tests, importance of variables for predictive modelling, information about violation of run rules for quality control charts,...)
- Computation of predictive models based on filtered or marked data.
- Scoring of new cases according to predictive model in production (typically versioned models from Statistica Enterprise metarepository) which means possibility to use actual predictions in final visuals.
- With addition of data function parametrization Spotfire can serve as interactive user interface for using particular Statistica functionalities implemented in Statistica workspace used by data function.
Several examples of implemented Statistica data functions can be found on this wiki page. These examples will help the user begin with building the data functions as well as help understand the whole concept and possibilities.
Most frequent questions and answers
Can I use workspace from the disk or does workspace need to be inserted in Statistica Enterprise repository?
- Both options are possible
How can I create data function?
- In Spotfire Analyst go to Tools/Statistica. Knowledge base article can be found here. If this option is not available, there is something wrong with installation of extensions.
Will data functions work in the web version of the dashboards?
- Yes, it is possible from version 13.6 when TIBCO Data Science Service for TIBCO Spotfire is enabled.
Can I have more inputs and more outputs from one workspace file?
- Yes, simply define more inputs and/or outputs during data function definition.
Can be data function triggered automatically (change after input data change)?
- Yes, in the same way like for R/TERR data functions, simple check option “Refresh function automatically”.
Can filtering/marking affect outputs (change of Statistica computed results after filtering is enabled)?
- Yes. Can be set in Limit by section for Input by enabling Marking:
Which nodes in Statistica Workspace can be used as input?
- Nodes starting “branch” with the data in Statistica spreadsheet format.
Which tables in Statistica Workspace can be used as output?
- Starting with Statistica 13.5: all spreadsheet outputs in all nodes as well as all spreadsheets in Reporting Document node can be used as output table.
Can I have no input for data function?
- Yes, you do not need to define input. If input is not defined computation takes original files from the workspace without replacing inputs. If you have dynamic input (like importing changing Excel) you need to uncheck "cache" option in Data Function definition to have changed results each time you trigger the data function.
Do I need same variable names as in workspace input?
- No. At the moment the principle of input transfer is following: Currently there are no checks or mechanisms providing mappings between variable names in Spotfire and variable names in the Workspace. The data is swapped before running the Workspace for the data function. This means that you need to have such data in Spotfire input which will pass through the Workspace without error (pass through variable selections in nodes of workspace). Useful is to use wild card variable selection in Statistica workspace. Also you can pass variables as parameters, please see this article.
Can be “wild card” variable selection in Statistica utilized?
- Remark: Wild card variable selection means: using type of universal variable selection in Statistica nodes in the form “measure*” means every variable starting its name with string measure.
- Answer is yes. If you have your workspace defined by wildcards variable settings or there are only nodes defined for “All” variables, than you can analyse by data function tables which have different variable names compared to original file in Statistica workflow (e.g. if I have workspace analysing all columns starting with letter A then I can have my input data from Spotfire in any form also differing from variables in original Workspace and still all variables started its name with “A” will be analysed).
How can I trigger Statistica data function?
- Statistica data function is triggered once after the definition of function is complete (assigning inputs/parameters/outputs). You can create action control in Text Area of dashboard triggering on demand. Third option is to check "Refresh function automatically" in "Edit parameters" dialog under "Data Function Properties" - this option will trigger function in case of input Spotfire data change.
How to transfer parameter in the form of variable selection?
- This is about creating the custom expression matching strings created by reading Spotfire document properties with expected Statistica variable selection string. There is article describing this.
What if error occurs in Statistica Workspace execution?
- No Output is brought back and you will have warning in Notifications of TIBCO Spotfire Client, typical reason for error warning could be wrong variables for one of Statistica Workspace nodes.
Remarks and links
- (answers) In case of any questions, please create a question at this page
- (wiki) Examples of Statistica data functions
- (wiki) Introduction of Statistica Workspace UI
- (wiki) Most important nodes in Statistica Workspace
- (knowledge base) How to enable TIBCO Statistica extension for TIBCO Spotfire
- (knowledge base) How to use TIBCO Statistica extension for TIBCO Spotfire
- (knowledge base) How to install components for enabling running dashboards with Statistica data functions from the web
- (knowledge base) How to enable TIBCO Statistica Service capability for TIBCO Spotfire
- (wiki, documentation) More info about new Statistica release
- (wiki, exchange) Python Data Function for TIBCO Spotfire
- (wiki) More info about Spotfire data functions