Sharing, Collaborating, and Annotating your Spotfire Analysis – Part I


This week we will start a three part series that leads us through the process for using Spotfire as a Social Annotation and collaboration tool to aide in your analysis process.  We are all aware of the analytic powers and capabilities of Spotfire, and many people are also aware that it can be deployed to a web page , either as an entire file, or as components in another site, like a portal or a mashup.  However, very few people are aware of the capabilities that exist to use it in a collaborative fashion with colleagues.

This post will focus on how to pass information into a Spotfire Analysis file which will set its state (active page, filtering and marking). The next post will focus on how we can capture state from a Spotfire Analysis file, and the final post will put everything together to build a social annotation and collaboration tool powered by Spotfire.

Spotfire has an API (called the Web Player APIs) that allows you to launch Spotfire Analysis files inside the Spotfire Web Player. These APIs also have an option that allows you to configure the initial state of the analysis, using a configuration block.

The configuration block can include property values, as well as a way to set the active page, apply a bookmark, set filtering on the analysis, and set marking on the analysis file.   This configuration happens before the file is displayed in the browser, so it can be used to show different states of the same analysis file as they are loaded.

To further this use case, we can create a web page which will allow users to pass in query parameters related to the state of the Web Player.  The web page can then parse these parameters, turn it into a configuration block, and load the appropriate state for the appropriate analysis file.

Take a look at one such example listed below: 

http://spotfire.tibco.com/community/Downloads/spotfireLive.html?fcs=Category&fcv=Large%20Growth,Large%20Value&ap=Short-Term%20vs.%20Long-Term&wmc=Symbol&wmv=SINVX&comments=Check%20this%20stock%20out

 

This will launch an analysis file analyzing mutual funds from the library (the analysis file is
hardcoded , but could also be exposed as a parameter). The active page is set to the Short-term vs. Long-Term page. The analysis is then
filtered to show only funds where the value in the 'category' column is either 'Large Growth' or 'Large Value' funds. Finally, rows where the value for the 'Symbol' column is SINVX are marked. We can also, quite easily, pass in comments via the URL string and then display them either in a Property Control inside the Spotfire file or inside the original web page in our mashup.

This example is limited and tightly coupled with the mutual fund analysis file that was loaded, but with more time, this can be turned into a production application which takes into account many different scenarios and combinations.

Passing in the values via the query parameter may work as is for some situations, but it requires the users to be savy enough to build the URL string. Having a way that we can capture the desired state from a web player user programmatically and then use that to generate a custom URL for us would be ideal. This is what we will explain and show in our next post. Then, finally, we will put it all together and store the state information in a database  so that we do not have to pass it back and forth inside the URL query parameters.

If you are interested in doing this, you can either purchase our Web Player API training course, or you can contact our Professional Services team to scope out and build this specific for you.