The Spotfire Community is moving to TIBCOmmunity and this forum location has closed. During the transition, you can still search the old forums but posting has been disabled. We encourage you to pick up the discussion at the new Spotfire community on TIBCOmmunity.
February 2011 - Posts - Tip of the Week

Tip of the Week

February 2011 - Posts

  • Creating a Calendar Visualization in TIBCO Spotfire

    Spotfire visualizations are both highly configurable and versatile.  They have the ability to visualize many different dimensions, and common visualizations like the Scatter Plot, Map Chart, and Heat Map can be configured to create many other visualization types.  In this tip, we will discuss how to use the Heat Map to create a calendar visualization in Spotfire.


    Let’s assume you have data which contains information that could be displayed in a calendar-like visualization. Typically this data needs  a start and end date, and then something categorical, like an activity or a user name or department. 

    For this example, we have the following data:
     

    To create the  calendar visualization, we need to first create a new Heat Map visualization. We specify ‘None’ for both the X-Axis and Y-Axis, and then using an expression we set the ‘Cell Values’ to ‘Concatenate([Activity])’:


     

    When then need to configure the Trellis axis.  For this we should use ‘Rows and columns’ and setup the Rows value to be ‘Week([Start Date])’ and the Columns value to be ‘Day of Week([Start Date])’


     
    Our calendar is now starting to take shape:

     


     
    We then need need to color it.  For this we are going to add a Color scheme grouping for our Cell Values in the Heat Map:


     
    We specify ‘Unique values’ and  One scale per ‘Axis value’ for this grouping and then manually select the colors to use for each Activity.
     

    When can then update the Tooltip to display the Start Date column, the Details column, and the Number of Days column:
     


    Finally we are ready to clean up the User Interface.  You can remove the  Axis Selectors, and have the legend just display the Color.
     

     

  • Multivariate Data Analysis in TIBCO Spotfire

    One comment that I hear often from perspective is that they are not statisticians so they would never need to, or be able to, use our statistical features.  However, my reply is commonly that they are, in fact, the exact type of person, who should learn about these features. This is because the statistics built-in to TIBCO Spotfire allow you to use them without having a statistics background, while still being able to leverage powerful statistics in your analysis.

    For example, let’s say you are interested in analyzing either your stock portfolio, or stocks that you may want to purchase and add into your portfolio. You can use a Line Chart to show the trend for the adjusted closing price for your stocks over the past six months, as shown below:

     


    You can then either use the filter panel to show one stock at a time in the Line Chart, or you can trellis the Line Chart by stock symbol, as shown below:

     

     
    This is a useful visualization, but what if we had hundreds or  thousands of these stocks we wanted to look at? What if we specifically we wanted to find stocks which consistently ascending over the past 6 months.
    We could try to visualize the trends, but the more stocks we have the harder that would get.  We could write some S+ or R statistics model to figure this out, but most users are not  statisticians. Luckily, Spotfire has a variety of built-in statistical tools which will provide you with the power of statistics without the need to be a statistician to use them.


    In this scenario, we will use the Line Similarity tool with a Correlation similarity calculation to find the stocks which are most similar to an Ascending pattern.  
     

    This will output a column, which ranks the stocks on how close they are to the ascending line. We can then use the resulting column filters to isolate the stocks which are most similar to this Ascending ideal.
     

    Interested in learning more about the multivariate analytic capabilities of TIBCO Spotfire? Consider taking our brand new course : SP142 Multivariate Data Analysis with TIBCO Spotfire  




  • Curve Drawing vs. Curve from Data Table

    In last week’s post, we learned about the different ways to draw Lines in a Visualization using data from different data tables.  In this week’s post, we will learn how to properly use the different mechanisms for drawing curves in TIBCO Spotfire.

    Let's assume that we have the same original data table that we discussed last week:

     

     

    What if we want to show a curve in our visualization based off some expression? Suppose we want to show the recommended cholesterol limits for our population by age, or we want to show a formula predicting cholesterol.  For example, if we had a general formula where Cholesterol (C) can be predicted based upon Age (A):


       C = 150 + 1.5*A

    We can use the Curve Draw feature of Spotfire to input this expression and calculate the Y values to draw the curve on our visualization.

     
     
     
      Step 1: Launch the Line From Data Table dialog from the Lines & Curves Properties dialog

     

    Step 2:  Specify the expression to use 

     

      Step 3: The line is drawn.


      

    If we want to use values from our data table, or another data table, in our expression, we can't use the Curve Draw feature. Howvever, we can  use the Curve from Data Table feature.  For example, we can use values from the Limits data table (which we learned about in last week’s tip), as part of an expression. In this example, cholesterol limits (Cl) are adjusted with Age (A) according to the following expression:

        newCl = (Cl - 30) + 0.67*A   where Cholesterol limit is a column from our limit's Data table

      Step 1: Launch the Curve From Data Table dialog from the Lines & Curves Properties dialog

     
     

    Step 2: Specify the expression to use, including any columns from the Data table.

     

    Step 3:The lines are  drawn  (one for the lower limit and one for the upper limit since there are two unique values in the Cholesterol Limit column)

    To summarize, Curve from Data Table is similar to Line from Data Table, except you can use data columns from another Data table as part of an expression to determine the Y values for each line.  Curve Draw also gives you the ability to create an expression;  however, you cannot include data columns as a part of that expression. 

    For more information on Lines and Curves and other statistics, please consider taking our Spotfire Essentials courses. If you are interested in doing more detailed, multivariate data analysis, please consider taking our new course: Multivariate Data Analysis in TIBCO Spotfire.
  • Line from Data Table vs. Line from Column

    One of the most common questions we get in our training classes is to explain the difference between Line from Data Table and Line from Column.  So much so, that we thought it would make a nice topic for a tip, actually two tips.  This tip will be the first in a two-part series where we explore the different options for drawing lines in Spotfire. Next week’s tip will focus on the different options for drawing curves in Spotfire. Specifically, we will look at the options which allow you to draw from values in other data tables.

    To start with, let’s assume we are looking at data for subjects in a clinical trial or similar, and want to analyze their cholesterol. The data table would have one row for each subject, and would contain the identifier of each subject (in this case we will use their first name), the age of each subject, and their total cholesterol level.

     

     
    To see if there is a correlation, we may want to display their cholesterol by age.  To do this, we can create a Scatter Plot, putting the Age column on the X-Axis, and the Total Cholesterol Level on the Y-Axis,


     

     

    Now, we can add in a variety of built-in lines to our Scatter Plot to further our analysis. We can vertical lines, horizontal lines, and straight line fits. These features are all required to draw lines using values from the Data table currently used in the Scatter Plot.

     


    Suppose we have a second Data table, called ‘Limits’ which shows a high and low limit for the  cholesterol.



     

    We can use the ‘Horizontal Line from Data Table’ to draw these limits as horizontal lines on our Scatter Plot.

     Step 1: Launch the Line From Data Table dialog from the Lines & Curves Properties dialog


     

      Step 2:  Specify the Data table to use and then which column to use to draw the line(s)

     


      Step 3: The lines are drawn in red. Since there are two unique values in the specified column, there are two lines

     

     
    Next, let’s say we want to compare the subject's cholesterol by age against the county's average by age, and we happen to have the county averages in a third Data table.



     

    We can now use the Line from Column Values feature to draw a line using the x (Age) and y (Country Cholesterol Average) values from the Country Averages data table.


     Step 1: Launch the Line From Column Values dialog from the Lines & Curves Properties dialog



     

      Step 2:  Specify the Data table to use and then which columns to use for the X and Y values

     

      Step 3: The line is drawn in blue. 


    To summarize, both Line from Data Table and Line from Column Values draw lines on a given visualization. The difference is that ‘Line from Column Values’ uses two columns of data (one defines X and one defines Y).  ‘Line from Data Table’ uses each value in a column to define a Y value for a horizontal line  or a vertical line (often resulting in multiple lines).  

    Next week we will look at the differences between Curve From Data Table and Curve Draw.

Syndication

Other Spotfire Blogs

©Copyright 2000-2011 TIBCO Software Inc | Privacy Policy | Terms of Use I Blog I Contact Us I Content Center