The trip has just been absolutely amazing and here’s a summary clip to remember it all! Enjoy =)
minusDocument property date to string
This will change a date type to a string. For example 01/04/2017 -> Apr 2017.
Changing the date object
For example, to minus a month from the date object:
d = datetime.datetime(Document.Properties[“CurrentMonth”]);
d_prev = d.replace(
year=d.year if d.month > 1 else d.year – 1,
month=d.month – 1 if d.month > 1 else 12,
Document.Properties[“PrevMonthSTR”] = d_prev;
This replaces the value in “PrevMonthSTR” with MMM yyyy format where “PrevMonthSTR” is one month before “CurrentMonth”.
Property control in Spotfire allows users to make their dashboard more interactive and intuitive.
For example, we may wish to generate a table on the fly depending on a selection from a drop-down list. This drop down list could comprise of custom values, column names or unique values from a column.
Typically I like to generate a property control and tie it to a document property (think global variables). As such, the document property will take on the selected value(s) from the property control. In turn, we can attach a script to the document property and this script executes every time the document property changes in value.
Create a property control with and generate some fixed values:
Add a script to print out the value of the selected item:
from System.Windows.Forms import MessageBox
Change the value selection in the drop down box and see the pop out message box displaying the message!
Of course the value in printing this message itself isn’t that great, but using this property, you could try doing filtering, generating tables based on certain values, changing axis, data dimensions or even generate an entire page of charts relative to the selected value.
Your creativity’s the limit!
This may still be a little secret from some folks, but there is a whole customization world out there in Tibco Spotfire if you are willing to invest in coding Iron Python.
With Iron Python, you can do certain things like generating your custom data tables, automating certain actions such as filters, navigation etc.
Here are some sites for you to start with!
- Some examples to start with from TIBCO – Tibco Community – Iron Python
Tibco has just released Spotfire version 7.5 and here are the major changes I see thus far:
- Have a conversation with colleagues by adding comments to visualizations
- Add text annotations to visualizations
- Create a spotfire visualization in a popup generated from a third-party webpage
- Revamp of the architecture / administrator interface for Spotfire server including handling of webplayer and automation services within a single node manager
For more details on what’s new in 7.5, click here!
- Install Oracle / Microsoft SQL database server
- Set up the Spotfire database
- Install Spotfire server
- If using Oracle, install Oracle database driver
- Apply latest hotfix to Spotfire server if any
- Configure Spotfire server
- Deploy client packages to Spotfire server
- Install Node Manager (this node now supports Spotfire Web Player & Spotfire Automation Services)
- Install Web Player service
- Create a new analysis on webplayer
- Log into http://<server>/spotfire/wp/ and ensure that you can view the analysis you created
*Note that the config file above can be set by using commands on config.bat in C:\tibco\tss\7.5.0\tomcat\bin (with default installation location) In this example, I have the Spotfire server and the webpage hosted on the same domain and hence the domain property is left empty.
Click on your analysis file, if it displays successfully, then you are good to go!
Embedding Web Player into your webpage
<*remove* div id = “header”>
<h1>Embedded iFrame Spotfire Webplayer 7.5</h1>
<*remove* div id = “webPlayerFrame”></div>
var c_serverUrl = “http://localhost/spotfire/wp/ “; //your webplayer url. remove the spacing between last / and “
var c_analysisPath = “/TestFolder/SampleData”; //path to your analysis after /Library/
var c_parameters = “”;
var customization = new spotfire.webPlayer.Customization();
var c_reloadAnalysisInstance = false;
app = new spotfire.webPlayer.Application(c_serverUrl, customization, c_analysisPath, c_parameters, c_reloadAnalysisInstance);
//create the customisation variable for the web player
customization.showDodPanel = false;
customization.showStatusBar = false;
customization.showToolBar = true;
customization.showPageNavigation = false;
customization.showClose = false;
customization.showAnalysisInfo = true;
customization.showExportFile = true;
customization.showExportVisualization = true;
customization.showUndoRedo = true;
customization.showFilterPanel = true;
var onOpened = function(analysisDocument)
console.log(“Analysis has opened”);
var onError = function(errorCode, description)
alert(errorCode + “: ” + description);
wp_doc = app.openDocument(“webPlayerFrame”, “FirstPage”, c_parameters, customization);
//app.openDocument(arg1, arg2, arg3, arg4) arguments
//arg1: This refers to the div component to embed the web player
//arg2: This is optional. Analysis page name as default page to display
Testing your application
For testing, you could host your page on IIS (Internet Information Services).
- Install IIS. Here are some simple instructions on how to do so on Vista / Windows 7.
- Host your page on IIS. Please ensure that you change your default port number here to be one that is unused (e.g 90). The default port number is 80 in IIS which is also the default port number for Spotfire server.
- Type http://<server>:[port_number]/<application_name> and see that Web Player is embedded into your html page.
Tip: I had some issues running the application due to some permissions issue. In the end, it was resolved by giving access to the folder (where your html page resides) to IIS_IUSRS group.
You will note that you are able to interact with the filters, markings, editing of analysis etc in your webpage as well.
That’s it for today, have fun! ^^
Trying to learn this song at the moment ^^
Its been a while since I played video games. I just completed episode 1 of Life is Strange and it has been quite fun so far!
It reminds me of the likes of walking dead / heavy rain if you know them. This one is more chillax as compared to those though. In walking dead /heavy rain, your choices have much bigger consequences such as having main characters die or leave the story line entirely. However, there are still 4 episodes to go, so I may be wrong about this for Life is Strange.
The main difference in Life is Strange is the ability to reverse time. So you kind of can get a glimpse of the near future and reverse your decision on certain actions. However, some have consequences much later in game which by then you cannot revert to change your decisions. I think a nice concept they try to illustrate is about how people in reality moan about the lack of knowledge of the future in order to make better decision, but the fact is, by knowing, it may over burden you instead. As they say, ignorance is bliss.
Putting aside the crazy ability to reverse time, it revolves around the life of a high school student and how she encounters the normality of high school life. You make decisions in her everyday encounters while pondering about how certain actions can affect everybody else in your life. I also really like the atmosphere and the soundtracks in this game. It makes you feel part of an artistic film almost.
Can’t wait to play the rest of the game, and perhaps after this, I’ll find a way to get my hands on Beyond: 2 Souls by Quantic Dream. Why can’t they re-produce their games for the PC! I don’t mind Xbox360 either, since I have one :p But before that, I should dedicate some time to complete Walking Dead season 2. Season 1 had me in tears at the end. And don’t judge, because even the most manly male gamers celebrities cried at the end in their video reviews! I swear!