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.
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.
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.
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:
In Spotfire, navigate to Tools > Options > Application > Development, enable “Show development menu”.
Now open Tools > Development > Copy URL to Clipboard.
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!
Here, I’ve added a JS to my HTML Editor and named it buttonFunction.
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?