Python Data Function for TIBCO Spotfire
By:
Last updated:
6:42am Jan 30, 2019

Overview

With the addition of the Python Data Function Extension, users can now 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 client and server
  • Latest copy of
    • SpotfirePS.DataFunctions.Python*.spk
    • SpotfirePS.DataFunctions.PythonForms.*.spk
  • A runtime python distribution (Preferred versions are 2.7.xx and 3.0.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.2) works for Spotfire 7.13. and Spotfire 7.14 including hot-fixes. Users of version (1.0) is recommended to upgrade to (1.2.)
  • Known issues with previous version (1.0):
    • Not having a python path variable set in the windows environment when editing scripts may cause Analyst to crash
    • The python engine preference tool in version (1.0) is not functional, and has been removed for the time being in version (1.2).
  • The current release of the PyDF (1.x) is currently aimed for the installed client only. Webplayer/worker node enablement is under investigation.

Feedback (5)

@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

Is this supported in Spotfire X , I tried adding the spk and installing Python on my local machine , but when I change the execution engive to Python Analyst crashed. 

hitesh.ganger 6:07am Feb. 19, 2019

@tscottkunkel

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 looing 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

I have added this to the ideas board for 7.11 LTS. If you need this for the LTS version, please up vote so it gets moved to the front. 

https://ideas.tibco.com/ideas/TS-I-6825

Kenneth Feagins 11:39am Nov. 09, 2018