Skip to main content

Posts

Showing posts from 2014

Blank Spotfire Library Web Page

Spotfire web player does not support compatibilty mode, and you may see blank pages when opening the spotfire library in your browser window. To ensure that the Web Player site is not being displayed in "Compatibility View". This is how you edit the Web Player server: On the Web Player Server: 1.      Start Microsoft IIS Manager. 2.      Click on the Web Player website. 3.      Open up the HTTP response header settings. 4.      Add a setting with name="X-UA-Compatible" and value="IE=edge" . Note: If the c ompatibility mode is disabled from the Web Player Server-side no action from the clients using the Web Player is required,  i.e., end users can continue using Internet Explorer with their standard configuration Please note this is solution to one of the causes and you may need to add the site to trusted zones or allow scripting depending on your infrastructure settings.

Personalized in-db connectors for version 6.5 onwards

Personalized in-db connectors for version 6.5 and further Go to File >> Add Data Tables >> Select Connection to "SQL Server" (This could be any database type that supports custom queries) In the next dialog, provide server authentication method, username password as required. Hit the connect button If connection is successfull you should be able to select a database Select a database and in the "Views in Connection" windows select Custom Query >> New Custom Query In the Query window, add a query name, then at the bottom hit the parameters tab and check the box at the bottom "User parameters for personalized Queries" Then write in the query, you can use parameters like ?current_user, ?current_group or ?current_domain. These values are filled up by spotfire at run time based on User login information and can be used to restrict data based on user access. Add caption

In Built Statistical Functions in Spotfire used for calculations

You can include any additonal Statistical methods using Open Source R, Tibco Enterprise Runtime for R, SAS, Matlab Avg(Arg1, ...) ChiDist(Arg1) ChiInv(Arg1) Count(Arg1) CountBig(Arg1) Covariance(Arg1, Arg2) FDist(Arg1) FInv(Arg1) First(Arg1) GeometricMean() IQR(Arg1) L95(Arg1) Last(Arg1) LAV(Arg1) LIF(Arg1) LOF(Arg1) Max(Arg1, ...) MeanDeviation(Arg1, ...) Median(Arg1) MedianAbsoluteDeviation(Arg1, ...) Min(Arg1, ...) NormDist(Arg1) NormInv(Arg1) NthLargest(Arg1, Arg2) NthSmallest(Arg1, Arg2) Outliers(Arg1) P10(Arg1) P90(Arg1) PctOutliers(Arg1) Percent(Arg1, Arg2) Percentile(Arg1, Arg2) Q1(Arg1) Q3(Arg1) Range(Arg1) StdDev(Arg1) StdErr(Arg1) TDist(Arg1) TInv(Arg1) TrimmedMean(Arg1, Arg2) U95(Arg1) UAV(Arg1) UIF(Arg1) Uniqu...

List of Statistical Functions Available in Spotfire

You can include any additonal Statistical methods using Open Source R, Tibco Enterprise Runtime for R, SAS, Matlab Data relationships Linear regression (numerical vs numerical),  Spearman R (numerical vs numerical), Anova (numerical vs categorical),  Kruskal-Wallis (numerical vs categorical)  Chi-square (categorical vs categorical). Hierarchical Clustering UPGMA WPGMA Single Linkage Complete Linkage Ward's Method Hierarchical Clustering Distance Measures Correlation Cosine Correlation Tanimoto Coefficient Euclidean Distance City Block Distance Square Euclidean Distance Half Square Euclidean Distance Regression Modelling Linear Regression Regression Tree Method Classification Modelling Logistic Regression Method Classification Tree Method ...

Changing Map Label Positions

When using Feature Layers in Spotfire e.g US States, world countries etc, by default spotfire tries to put the label towards the center of the geography. However if you are using multiple layers sometimes the default position may not work out nice. To solve this Spotfire lets you change the position of the label. To do so 1) Right click on the feature layer 2) Drag any Label to a desired position 3) Repeat for other labels 4) Right click and uncheck Edit Label Positions Here is a video demonstrating this quick feature

Multiple Labels on a map chart feature layer

Ever Wanted multiple labels on a map chart feature layer.?? For e.g the map chart below shows the name of the state and the sales total. To do so I added an expression on the label axis as following  Concatenate(UniqueConcatenate([State]),"\n",Sum([Sales Total])) Now you can get more labels to show quick information.

Enable spotfire web services API

To enable the Web Services API using the UI Configuration Console, the Spotfire Server configuration file must be exported to a local xml file. Once the file is exported, locate the following lines: <public-api>   <web-services>     <enabled>false</enabled>  </web-services> </public-api> Change the value of the <enabled> element to “true”, and import the configuration file back into the Spotfire Server from the UI configuration console or you could use the command line console. Depending upon your Spotfire Server’s restart policy, the Spotfire Server may have to be manually restarted for this change to take effect.

Data Source Connections Credentials

Copied from spotfire help manuals  Details on Data Source Settings – Credentials To reach the Data Source Settings dialog: Select Edit > Data Connection Properties and click on Settings... or edit a data connection from within the Manage Data Connections tool. Response: The Data Connection Settings dialog is displayed. On the Data Source tab, click on Settings... . Click on Credentials to go to this tab. Option Description Save to Library [Only available for embedded data sources.] Allows you to publish an embedded data source to the library, so that it may be reused in other analyses or by other people. Embed in Connection [Only available for data sources shared in library.] In order to make any changes to the data source settings when you are within the context of a data connection , the data source must first be embedded in the connection . Click on this button to embed the data sour...

Spotfire SQL Server enable TCP/IP

When creating the bootstrap for the first time, after your provide the details of your SQL server instance, you may run into an erro like below "Error connecting to the specified data source. The TCP/IP connection to the host XXXX, port 1433  has failed. This is most likely because your SQL server has not enabled the TCP/IP protocol. Here are the steps to enable it. Open SQL Server Configuration Manager from start menu Expand the “SQL server network configuration”  and select protocol for “XXX” where XXX is your server instance name Check if TCP/IP protocol is enabled. You can right click and enable it if it is not After enabling right click and select properties, switch to IP Addresses Tab. Scroll down to IPALL . Change TCP portal to 1433 or other port as desired . Empty to Dynamic ports value if any present. Hit Apply Then restart the sql server services from the same panel or windows services panel ...

Custom MDX Queries

MDX with Custom Queries Spotfire Custom Query capability is great for SQL-based data extraction, however it can also be used to extract data using MDX or other non-SQL based query language.  This can be done by injecting the custom syntax inside a SQL FROM clause. You can also save the Query/Connection to Spotfire Library and then reuse across multiple analysis.  Here’s an example of passing MDX using a SQL Server connection.  In this scenario, the OPENQUERY function is used inside the FROM clause in order to pass the MDX to a linked MSAS Cube. Once connected, the data can be used in-memory or kept external.  The data connection behaves just like a standard SQL-based data connection. how to create connected server http://msdn.microsoft.com/en-us/library/ff772782.aspx

Providing Time Dimension Aggregation Controls

Time Dimensions are everywhere. It is highly possible that you are recording time dimension with every data point you are capturing.  Every business pretty much uses the time dimension in some way or the other. Some patterns in time are easy to guess and you don’t need analytics for that.e.g. What day of week do I see more customers walk into my store? Easy to guess. What months of the year I will sell spike in gifts items? Easy to guess, isn’t it? But what if you didn’t know the pattern and want a quick and easy way to shuffle between time dimensions to find that insight from all the data you captured? Wouldn’t it be great for a Spotfire user to have flexibility to see data aggregated at different levels like “Hour of the day”, “Daily”, “Monthly”, “Day of Week”. Good news is Spotfire provides all these calculations in single click for a column whose Datatype is date. Each Date field you can decide how you want to display the time dimension. These are options you...

Bootstrap password Reset

Spotfire database holds most of the information regarding users, libraries and other configuration items. The bootstrap file is used by the spotfire server app to connect to this database. This file contains encrypted information and is protected by the Bootstrap password which is required to login into configuration console. If you have forgotten this password, there is no way to reset it. However you can cancel out of this dialog and will need to define a new bootstrap file. Once you hit cancel you will be taken to the Configuration console, where you can create new Bootstrap File To define a new bootstrap file ...that you will need information about the Spotfire server database, Database Name(SQL) or SID (ORCL), port number to connect and a username password to use. Creating a new bootstrap should let you then use the configuration console.

Barchart show-hide zoom slider

This script is a sample script to toggle zoom slider on X axis of a bar chart You can adopt this script to show hide Y axis or other chart types from Spotfire.Dxp.Application.Visuals import BarChart barchart1.As[BarChart]().XAxis.ManualZoom = not (barchart1.As[BarChart]().XAxis.ManualZoom ) Here barchart1 is mapped to the barchart whose zoom slider needs to be toggled

Changing Bar Chart Sort Order Iron Python

Assign this script to an action control (like button, link or image) from Spotfire.Dxp.Application.Visuals import BarChart barchart1.As[BarChart]().SortedBars = not (barchart1.As[BarChart]().SortedBars ) barchart1 is mapped to the Bar Chart Visualization you would like to toggle sorting for

Good links

Unofficial stuff I have run into so far http://easyspotfire.blogspot.com/ http://spotfired.blogspot.com/ http://www.extendanalytics.com/blog http://www.spotfireextensions.com/blog http://www.explainsstuff.net/ http://www.bearonspotfire.com/ Official stuff  http://spotfire.tibco.com/tips/ http://spotfire.tibco.com/demos?Section=Quick+Reference+Topics http://learn.spotfire.tibco.com/ Found something interesting related to spotfire that can help our community, feel free to email me spotfirenotes  at  gmail  dot  com

Saving credentials disabled in Datasource settings

If you see that you are not able to select "Yes, save credentials..." options in the datasource settings dialog >> Credentials tab i.e is because you are not using "Database Authentication". Please note that spotfire stringly recommends not saving credentials, but rather use the second option "No, but save....." however if you would like to still use it, please change to the Login Tab and then click on the "Edit" Button to switch to "Database Authentication"

Spotfire WMS Layers

This is a list of WMS layer(s) I have used in the past, I am adding it here for reference http://webservices. nationalatlas.gov/ wms ?SERVICE= WMS &REQUEST=GetCapabilities Please ensure you read the usage and license term from respective providers. Please share WMS layers you you found interesting in spotfire use cases by mailing me at spotfirenotes at gmail dot com or entering in the comments

MultiSelect property and AS keyword

If you are mapping a multiselect list box property to an axis and would like to have names without the aggregation on the axis label use something like in this example expression lets assume my heatmapColumns are mapping to [Gross Profit],[Sales Total],[Discount] When you do map to property it would generate this expression Change your original expression  from $map("Sum($esc(${ heatmapColumn s }))", ",") Generated output would look like Sum([Sales Total]),Sum([Gross Profit]),Sum([Discount]) To see the column names on your screen rather than the aggregation method and column name change the equation to something like below To $map("sum($esc(${ heatmapColumn s })) as [${ heatmapColumns }]", ",") Generated output would look like sum([Sales Total]) as [Sales Total],sum([Gross Profit]) as [Gross Profit],sum([Discount]) as [Discount] Cheers!!

Enable GeoCoding Tables for Map Chart

Quoted from Spotfire server installation manual To display data on a map, the data needs to be geocoded. Geocoding in Spotfire is the process of using some type of identifiers in a data table and matching those to similar identifiers in another set of data tables (a geocoding hierarchy) which contains latitude/longitude coordinates or geographic features. These coordinates or features are then used for correctly positioning the data in a map context. Spotfire 6.5 features pre-packaged geocoding hierarchies, so-called geocoding tables. To make the geocoding tables available to users 1) locate the geoanalytics folder in the Spotfire Server installation kit. 2)) Copy the file geoanalytics.part0.zip to the configured By default it will be on your spotfire server machine C:\tibco\tss\6.5.0\tomcat\application-data\library Details available in teh spotfire server installation manual See “Configuring a Specific Directory for Library Import and Export” on page 108. When this fi...

Visualization Properties in Expressions

Quoted from Spotfire manuals Visualization Properties in Expressions In some cases, you may want to use the expression or the display name currently set on an axis as a dynamic part of another expression, so that it changes with your selections. For example, this may be interesting in a visualization title or in a tooltip or label. You may also want one axis to be automatically set to use the same expression as the one set on another axis. There are a number of different "axis expressions working like properties" available in the visualizations. These properties exist only in the context of a visualization and they have values that are defined by the currently used settings in the visualization. For example, a scatter plot can expose the display name of its X and Y-axis expressions as properties and these can in turn be used to set the visualization title. The syntax to use is ${Axis. Axis Name. DisplayName} and ${Axis. Axis Name. Expression}, for the di...

Server Memory Size

This article is about changing memory size used by the Spotfire server java instance. In most cases you will not need to modify it, however if you see issues around java process running out of memory, this may help Quoted from Spotfire server installation manual Modify the Virtual Memory. To set up the start script when not running as a Windows service: ============================== ============================ 1). Open the file <installation dir>/tomcat/bin/setenv.bat/.sh in a text editor, such as Notepad. 2). Locate the line that sets the variable JAVA_OPTS:     set JAVA_OPTS=‐server ‐XX:+DisableExplicitGC ‐XX:MaxPermSize=256M ‐Xms512M ‐Xmx1536M     or     JAVA_OPTS="‐server ‐XX:+DisableExplicitGC ‐XX:MaxPermSize=256M ‐Xms512M ‐Xmx1536M". 3). Alter the -xms and the -Xmx values ‐Xms512M ‐Xmx1536M to the amount of memory you wish to allocate. 4). Save the file. 5). Restart the server. To set up the start script w...

Enable Web Player URL

If you have a greyed out Web Player url in the book mark section as seen above, chances are you have not enabled the web player preference. Here are the steps to enable it. In your Spotfire Analyst Client, login as Administrator Go to Tools >> Adminstration Manager Open the preferences Tab. Select the Everyone Group on the left tree. You can select other groups too, but it setting on Everyone makes it default for everyone. You can also set settings per group Hit the Edit Button at the bottom Right of the Window Expand the Application Node in teh left side tree. You Should see the item DxpLibraryWebURL Lets you specify an URL to the analysis in the Web Player. The URL will appear in the last step of the Save as Library Item wizard. If desired, the user can click the URL to open the analysis in TIBCO Spotfire Web Player, or copy the link for later use. Leave blank if you do not want a link to the analysis in the Web Player to show up in ...

Custom Authentication Setup on Webplayer

This article lists out steps to enable a custom single sign-on solution on Spotfire Web Player till  You will need to build the customauthentication module for your webplayer first. A sample if provided in Spotfire sdk. Once you have it ready, the output of that project is a dll which we will use on the webplayer. In most cases this will be a very small change to the example itself. Once you have build the custom authenticator project. Here are the remaining steps to enable the custom Authenticator on the web. Step 1 Enable impersonation on Spotfire server Login to Spotfire configuration console.  Easiest way to access is  on your Tibco Spotfire server machine go to Start >> All Programs >> Tibco Spotfire Server x.x  >> Configure Spotfire Server Provide password on the window that pops up. Once logged in go to configuration tab and then select the impersonation page On impersonation section screen, select yes for enable impersonat...

DataFunction Execution in script

If you need to Execute multiple DataFunctions on a button click , it is not possible to map the Action Control(Button) to multiple functions. However you can write a script to run the functions. See sample in blue below. Please note we are using Index for item and not name, so you need to ensure you are running the correct function. To get the correct name you could do Print Document.Data.DataFunctions.Item[0] Replacing the index to verify the name, once you know the index you can then use the following script to trigger the DataFunctions Document.Data.DataFunctions.Item[0].Execute() Document.Data.DataFunctions.Item[1].Execute() Please note that this functions are run triggered immediately one after the other, there is no waiting for 1st to finish to trigger the second. If you need to wait for function 1 to finish and then trigger function 2, then make sure that function 1 returns a unique value that is assigned to a property, and then attach a script to property change, ...

Calendar Chart in Spotfire

I recently had a colleague asking me to show him the data in a calendar format.. Something like this I basically used a scatterplot for this.  You can check out the original DXP here  http://bit.ly/spotcalendar Some key settings to make it a calendar. Please note Order date is the date of interest here These expressions are out of the box expressions, no need to handcode them, but select them in the axis value  X Axis    <BinByDateTime([Order Date],"DayOfWeek",0)> Y Axis    Week([Order Date]) Trellis into panels   <BinByDateTime([Order Date],"Year.Quarter.Month",2)> Manual layout 4 X 3 Labels  UniqueConcatenate(DayOfMonth([Order Date])) Shape Tiled Markers Marker by   <UniqueConcatenate([Order Date])> Happy plotting your calendar!!!

Custom Error Page

If your Spotfire Web Player environment is open to external users you can replace the  default error messages that are displayed for the Spotfire Web Player to prevent users  from injecting user controlled error messages through a URL. To modify this behavior you must create a new error message file and then modify the  configuration file.  After you make these changes, any error that occurs in the Spotfire  Web Player will be redirected to this static error page. Note: If you make this change, users will not receive any details or information about  the error. Adding a Custom Error web Page 1 In web.config update the section system.web/customErrors to: <customErrors mode="On" defaultRedirect="~/ExampleError.html" /> 2 Create a custom error web page. For example, <!DOCTYPE html> <html lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> <title>Error - TIBC...

Filebased datasource security

Are you seeing this error when using a file based datasource like excel in webplayer.? The data source may be missing or has been changed. This generally happens for one of the following reasons First from a security perspective spotfire ensures that you cannot just open any file, you need to provide a white list of locations that should be accessible to the webplayer. Change the property for your case in the web.config file. This is controlled by two settings in the web.config  AllowedFilePaths  Provide the full path to directories or files on a  local disk, other than the Spotfire Web Player  installation directory, that you want to access  in the Spotfire Web Player. Specify each file or directory in a separate  <string> tag.  For example: <value>   <ArrayOfString>   <string>   C:\MyData\   </string>   <string>   C:\Logs\spotfire.tx...