Python Data Function Extension (for TIBCO Spotfire 7.13 to 10.6)

By:
Last updated:
11:15am May 06, 2020

Overview

NOTE: As of Spotfire 10.7 there is native support for Python Data functions in Spotfire, which is the prefered method. Read more about it here.

A Python Data Function executor is available natively in Spotfore 10.7 and above. For users on versions 7.13 to 10.6, they may use a free extension instead. With the extension, users can employ Python language in the creation and execution of data functions in Spotfire Data Analyst. Python users who are familiar with the process of writing data functions in TERR will be able to create custom functions however simple or complex. The utilization of packages such as Pandas and Numpy allow for a seamless transition between TERR and Python Data Functions.

Prerequisites

The following requirements must be met to enable running Python code from the data function extension:

  • Spotfire 7.13 and above client and server (recommend native version for users on 10.7+)
  • Latest copy of
    • SpotfirePS.DataFunctions.Python*.spk
    • SpotfirePS.DataFunctions.PythonForms.*.spk
  • A runtime python distribution (Preferred versions are 2.7.xx and 3.7.xx) installed in your local environment and the python executable file path listed in your PATH environment variable. By doing this, the Spotfire can automatically detect your python version and make use of the provided boilerplate python code.
  • The packages used in the python code must be manually installed in your Python environment before calling it in the user code.
  • The following packages Pandas, Numpy must be installed for the Python data function to work.
  • Other preferred Data Science packages are Scipy, Matplotlib, Scikit-learn, NLTK.

Download

Custom Data Function for TIBCO Spotfire® to Execute Python Code can be downloaded from the TIBCO Exchange.

Installation

In order to add the Custom Data Function to the client software, the above packages must be deployed to a Spotfire server and the client software is needed to log into the deployment area containing the .spk’s in order to be updated.

See here for details.

Demos and Examples

Demos presented at our TIBCO Analytics Meetup series - please join the Meetup if you are interested in these type of demos. Previous recordings are posted here.

Python Data Function in Spotfire - by Vinoth Manamala: A ‘how to’ demo of the new Python Data function available from the TIBCO Community Exchange for Spotfire version 7.13 and beyond. Users can now use Python language in the creation and execution of data functions in Spotfire Data Analyst. Download Custom Data function directly from TIBCO Community Exchange

Python Data Function in Spotfire used with TensorFlow - by Vinoth Manamala:  A ‘how to’ demo of the new Python Data function available from the TIBCO Community Exchange for Spotfire version 7.13 and beyond. Specifically showing how you can build analyses using Spotfire and Tensorflow using the Python Data Function. Download Custom Data function directly from TIBCO Community Exchange

 

And samples are included with the framework including:

  • Getting Started
  • Isolation Forest

Help and Support

Please note that Python Data Function is not supported through support.tibco.com. In the event of issues or to get help, please post questions in the TIBCO Community Forum here:

https://community.tibco.com/answers

Make sure that you add the tag "PyDf" so that it will be visible.

Licensing

Python Data Function is shared with the TIBCO Community for free use by customers and partners under the TIBCO Component Exchange License.

Known Issues

  • Timespan variable types in Spotfire are not supported
  • Datetime type columns with timestamps outside of supported pandas date ranges will fail due to a limitation in pandas. Timestamps should be in range 1678 and 2261 years.
  • Boolean and Datetime type columns with missing values will be returned as string type due to a limitation in pandas
  • Integer and long type columns with missing values will be returned as float type due to a limitation in pandas
  • Current version (1.3) works for Spotfire 7.13. and above including hot-fixes. Users of version (1.2) is recommended to upgrade to (1.3)
  • Not having a python path variable set in the windows environment when editing scripts may cause Analyst to crash.
  • The current release of the PyDF (1.3) is currently aimed for the installed client only. 

Feedback (7)

@[Freelinking: Unauthorized to view user profile]

For general automation of your analysis files using the Spotfire API you need to use IronPython. In Data functions (for predictive and other advanced analytics) you can use regular Python. Notice that we today released Spotfire 10.7 which has native support for Python Data functions. https://community.tibco.com/wiki/whats-new-tibco-spotfirer-107

nambernt 4:20am Jan. 10, 2020

Is it possible to use Python instead of IronPython for dashboard development/customization as well? For e.g. creating message boxes, etc.

sujit.kumar 5:41am Jan. 09, 2020

@roisin.murray

Hi Roisin,

We are looking into this as the need has clearly been identified, but I'm unable to comment on future product roadmap and related timelines in this forum. Thank you for your patience.

Andreas Laestadius 11:06am Aug. 06, 2019

Hi,

I know it says that the current release is for the installed client only but I was wondering if there was a timescale for when webplayer functionality might be available?

Thanks

roisin.murray 12:08am Jul. 26, 2019

@hitesh.ganger

Yes version 1.2 should  work just fine with Spotfire 10. If you continue to experience issues while using version 1.2, please start a topic in the https://community.tibco.com/answers section and we will take it from there.

Andreas Laestadius 6:18am Feb. 19, 2019

@[Freelinking: Unauthorized to view user profile]

Hi Scott,

Wth this release of the PyDF we didn't aim to support the web (player)  worker nodes, so we cannot give any guidance. There is work being done looking into the best way of doing this for web nodes, so hopefully we'll be able to give more advice no this further on.

 

 

Andreas Laestadius 10:42pm Nov. 20, 2018

what needs to be installed on the server/ nodes to make this work with automation service/ webplayer?

tscottkunkel 11:11am Nov. 19, 2018