Month: January 2017

5 Simple Prep Steps for Multivariate Analyses

Trust me, I get excited about a new data set just like anybody. I just want to tear straight to the good stuff and find those hidden correlations and to use all my fancy tests and methods. But before you get to that point, it’s important to run important preparation on your data – each a critical “Prep Step” that can save you time, rework, and wrong conclusions down the line.

Read More

You’ll conquer the present suspiciously fast if you smell of the future….and stink of the past.

Connecting to APIs from Spotfire

Just wanted to share this development journey with you trying to build a template. I wanted to create a WordPress connector for DataShopTalk so that I could download all the articles and get a good idea of the content of the blog. Connecting directly to the MySQL database was not really ideal, I wanted to setup an API from WordPress so that a data function could connect to it.

Read More

Technical Director at

Guest Blog: Creating Average Lines for a Data Set

Anna Smith is an Engineering Technician at Continental Resources up in Oklahoma. Today she will be sharing her journey creating average lines using TERR.

I had often been asked for average lines on line graphs – seeing the average of a dataset compared to each individual line in that data set. I kept trying to figure it out with just calculated columns and formatting issues, but eventually came to the conclusion that Spotfire just doesn’t give us an easy or clean way to do this. So the idea of using TERR came into play. In my example, we wanted to compare production over time to the average over time for a certain well set – and we want this to be dynamic, i.e., if we change our well set selected, then our calculated average line needs to change. Our TERR code, then, needed to subset each day, calculate an average for that day, and spit out a new value. An important note: the function given at the end of the article that we used requires the input days or months, which means if you have a data set with just dates and production numbers, you need to normalize all those dates back to time zero.

Read More

Technical Director at

Printing Custom Visualizations in Spotfire

There’s not a great way to print custom visualizations in Spotfire. Normally the Spotfire print renderer will just leave the visualization blank, which is a shame when you have a lovely well log that you’ve toiled over. That said, I’m going to show you a workaround:

  1. In Spotfire, navigate to Tools Options Application Development, enable “Show development menu”.

  2. Press OK.
  3. Now open Tools Development Copy URL to Clipboard.
  4. Open a browser (probably Chrome) and paste in the copied link. From here you will be able to print the analysis successfully, albeit you may have the same troubles like when you try to print from the internet.

Like I said, not the best, but it’s better than a blank!


Technical Director at

Setting up a Button Function

What I’m calling the ‘Button Function’ is a simple JavaScript that can be used to make a div class area “clickable” like a button. For the non-CSS savvy (like myself), it’s nice to have an example with the code snippet so if you need more explanation, be sure you understand this previous post and the post before that.

Here, I’ve added a JS to my HTML Editor and named it buttonFunction.


Next, I added a script parameter for buttonID using a String type and the Spotfire Control id for the action as the value. Then, I repeat these steps to make a JavaScript for each “button”.



In the my HTML Editor, I also see the same value as an ID attribute value preceded by “btn” for the DIV class. The Spotfire Control Id is in a separate Div Class towards the bottom of the script and is hidden from the display.



The result (from simple JS, CSS, and HTML) is a text area designed to look like a custom menu with clickable “buttons” that perform the action stored in the out-of-the-box Spotfire Control:


If you liked this and the previous posts, please let us know in the comments! We’d be happy to hear about your use-cases and any special design improvements that you’ve made!


Suppose this month you had an analysis that takes some input parameters (ABC) and runs some logic to generate a results table (XYZ).  Next month comes along and you want to look-back at these results and perhaps compare the values to last month. You realize that the data in the .dxp you’re using is linked to source and when you opened this .dxp all of the values are updated with no way for you to view what the values were previously.


But wait. There’s hope! This secret I’m about to share with you will demonstrate how to generate a third table that will store values from columns you specify with a “scenario” value you input. Can you think of other reasons why knowing this TOP SECRET trick might be useful in your day-to-day?

Read More