TIBCO Spotfire Community

Welcome to TIBCO Spotfire Community Sign in | Join | Help

Integrating Spotfire and S-PLUS Analysis

Since TIBCO's acquisition of the S+ family of products, many users are excited about the opportunities for integrating the statistical power of S-PLUS with Spotfire's visual and interactive analysis environment.  Customers can begin using Spotfire Professional and Spotfire S+ products together today; this article will outline some suggestions for how to do this.

Spotfire S+ client or Spotfire Miner is used for:

  • Importing data, do initial visualizations
  • Data cleaning, outlier, missing value, duplicate data treatment
  • Data restructuring, stacking etc
  • Exploratory data analysis: simple regressions, correlations etc
  • Build Predictive Models for specific features
  • Export data to file for Spotfire analysis to read. Optionally, launch Spotfire to analyze data further. This is a sample function to call Spotfire from S-PLUS:

startSpotfire <- function( dataset, closeS=F, pathToSpotfire="c:/program files/TIBCO/Spotfire/2.2")
{
       filename <- paste(tempfile("data"), ".csv", sep="")
       exportData(dataset, file=filename, type="ASCII")
       cmdOut <- paste(pathToSpotfire, "/Spotfire.Dxp.exe ", filename, sep="")
       system(cmdOut, multi=T, trans=T)
       if (closeS) {
              q()
       }
       invisible()
}

To use this function from S+, call the function using your data set as the argument, e.g., startSpotfire(fuel.frame) 

The function can also be used within an S-PLUS Script node in Spotfire Miner.  The contents of the script would look like this:

startSpotfire <- function( ... (exactly same function definition as above)
assign("startSpotfire",startSpotfire,where=0)
startSpotfire(IM$in1) 

Spotfire Professional is used for:

  • Data loading out of S+ is loaded and filters are auto-generated for each column of data
  • Create a new visualization, such as scatter plot to explore model results.
  • Filter data on any parameter to see effects in visualizations
  • Create a drill-down visualization
  • Build out a workbook with multiple visualizations
  • Capture insights using a Bookmark
  • Share analysis by saving to Spotfire Library and sending link to others to view using Spotfire desktop clients (Spotfire Professional or Enterprise Player) or web client (Spotfire Web Player).

Other ideas:

  • Use the Tag Panel in Spotfire to tag data points of interest and then export the results for more analysis in the S+ client. Tagging data points generates a new column in the data set, which is captured when exporting data (File > Export > Data...)
  • The Spotfire client can point to a linked data set and reload the current data on open. Use this to take one or more data files from the Spotfire S+ or Spotfire Miner client and share with a pre-configured Spotfire Professional session. This is the process:
    1. From S+ or Miner, export data to one or more files.
    2. Start the Spotfire Professional client and open the first data set. Then use "Add Data Table..." to point to other data sets if necessary.
    3. Configure visualizations based on these data sets, then save the Spotfire session choosing the "Linked" option.
    4. Re-run your Spotfire S+ or Spotfire Miner analysis and regenerate the data sets.
    5. Refresh or re-open your Spotfire session to see the new data set.
Comments

About Greg Goldsmith

Greg Goldsmith is the Senior Product Manager of the TIBCO Spotfire Enterprise Analytics Platform. His main areas of responsibility and expertise are the core underlying data engine and the integration, extension, scalability & centralized administration of the visual, interactive data analysis and exploration platform.