Jump to content
  • Statistica Data Function in Spotfire

    Users of Spotfire® now can use the strengths of Spotfire Statistica® to extend the information which can be visualized - users can incorporate into their dashboard predictions, complex data preparation and cleaning procedures, results after application of statistical models to selected data, and much more.


    Starting with the Spotfire Statistica® 13.4 release, Spotfire Statistica® and Spotfire® can be nicely integrated. One of the most important and impactful features is calling a Statistica Workspace from a Spotfire Data Function (if you are not familiar with the concept of data functions, please review this video). You can perform these calls from Spotfire Analyst as well as from web dashboards (starting with the 13.6 release).

    Users of Spotfire now can use the strengths of Statistica to extend the information that can be visualized - users can incorporate into their 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 a showcase of examples of this integration. You can view it on the Youtube channel (the following video was built with Spotfire Statistica® 13.4): 

    The Spotfire Analyst creating a Statistica data function can also 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 or higher with access to Spotfire Analyst Server (excluding versions 11.2 and 11.3)
    • Spotfire Statistica® 13.5 or higher (any type of installation)
    • Spotfire Statistica® for Spotfire® Analyst Software installed on Spotfire Server
      • This includes two files: StatisticaEngine.spk and StatisticaExtension.spk

    After the successful installation of extensions, the user should have an available new option in the Tools menu of Spotfire called Statistica.

    If you need to enable dashboard web usage with data functions, there needs to be Spotfire Server with Statistica Service configured

    • Spotfire Server 10.3.0 or above (excluding versions 11.2 and 11.3)
    • Spotfire® Service for Statistica® configured on Spotfire Server 

    All these products and extensions can be downloaded from the e-delivery site (look for the names above). 

    Note: A Statistica data function can be embedded directly into a dxp. In that case dashboard with embedded Statistica, data function can be run on any Spotfire Analyst with Statistica Extension for Spotfire without the need of local installation of Statistica.


    Possibilities of usage

    Statistica data function can be used for:

    1. Data preparation steps are 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.
    2. Data cleaning of data already loaded to Spotfire.
    3. Computation of statistical outputs which are not included natively in Spotfire (e.g. results of statistical tests, the importance of variables for predictive modeling, information about the violation of run rules for quality control charts,...) 
    4. Computation of predictive models based on filtered or marked data.
    5. Scoring of new cases according to predictive model in production (typically versioned models from Statistica Enterprise meta-repository) which means the possibility to use actual predictions in final visuals.
    6. With the addition of data function parametrization, Spotfire can serve as an interactive user interface for using particular Statistica functionalities implemented in the Statistica workspace used by the data function. 
    7. Spotfire users can use Statistica Enterprise meta-repository objects in Statistica (article about these options).
    8. ...and much more.



    Several examples of implemented Statistica data functions can be found in this article. These examples will help the user begin with building the data functions as well as help understand the whole concept and possibilities. If you have largely developed Statistica infrastructure already, we recommend you see this recording showcasing wide integration options between Statistica and Spotfire with a focus on existing Statistica objects integration.


    Most frequent questions and answers

    Can I use workspace from the disk or does workspace need to be inserted in the Statistica Enterprise repository?

    • Both options are possible


    How can I create a data function?

    • In Spotfire Analyst go to Tools/Statistica. The knowledge base article can be found here. If this option is not available, there is something wrong with the installation of extensions.


    Will data functions work in the web version of the dashboards?

    • Yes, it is possible from version 13.6 when Spotfire® Service for Statistica® is enabled.


    Can I have more inputs and more outputs from one workspace file?

    • Yes, simply define more inputs and/or outputs during the data function definition.


    Can be data function triggered automatically (change after input data change)?

    • Yes, in the same way as for R/TERR data functions, simply check the 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 an output table. 


    Can I get other outputs from Statistica in Spotfire, not only spreadsheets?

    • Yes, the current extension has the possibility to export the whole Reporting document Workbook into a separate page of Spotfire. In Edit Data Function Definition there is a checkbox called Visualize Statistica results enabling this feature. Spreadsheet outputs are added to the Spotfire data list and can be used as any other Spotfire table, exported graphs are static and are not in Spotfire interactive format. 


    Can I leverage also other objects from the Statistica Enterprise meta-repository, not only workspaces?

    • Yes, you can leverage for example simple data function retrieving any Data Configuration from the Enterprise or other data function uploading a snapshot of all monitoring and alerting dashboards running on MAS server of Statistica. More information and possibilities can be found here.  


    Can I have no input for the data function?

    • Yes, you do not need to define input. If the input is not defined computation takes original files from the workspace without replacing inputs. If you have dynamic input (like imports of changing Excel) you need to uncheck the "cache" option in the Data Function definition to have changed results each time you trigger the data function.


    Can I save it into the Library and use the Statistica data function in the f(x) menu of Spotfire?


    • Yes, this is possible in the same way as for other data functions. You need to use the menu Data-Data Function Properties in order to save the defined Statistica data function into the library.


    Do I need the same variable names as in the workspace input?

    • No. At the moment the principle of input transfer is the 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 the 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 a type of universal variable selection in Statistica nodes in the form 'measure*' means every variable starting its name with string measure.
    • The answer is yes. If you have your workspace defined by wildcards variable settings or there are only nodes defined for 'All' variables, then you can analyze by data function tables that have different variable names compared to the original file in Statistica workflow (e.g. if I have workspace analyzing 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 analyzed).


    How can I trigger the 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 the Text Area of the dashboard triggering on demand. The third option is to check the "Refresh function automatically" in the "Edit parameters" dialog under "Data Function Properties" - this option will trigger the function in case of input Spotfire data change.


    How to transfer parameters in the form of variable selection?

    • This is about creating the custom expression matching strings created by reading Spotfire document properties with the expected Statistica variable selection string. There is an article describing this.


    What if an error occurs in Statistica Workspace execution?

    • No Output is brought back and you will have a warning in Notifications of
    •  Spotfire Client, typical reason for an error warning could be wrong variables for one of Statistica Workspace nodes.


    Remarks and links

    User Feedback

    Recommended Comments

    There are no comments to display.

  • Create New...