Custom Data Function for TIBCO Spotfire® to Execute Python Code

Spotfire Extension for a Python Data Function. Enables Spotfire data science users to author data functions in Python.

Compatible Products

TIBCO Spotfire®

Provider

TIBCO Software

Supported Versions

  • Spotfire 7.13 or 7.14
  • Python distribution 2.7.xx or 3.0.xx

License

MIT

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.

Example of usage of Python Data Function Extension can be found in this video.

Release(s)

Release 1.0

Published: August 2018

Initial release. 

 

Release 1.2

Release 1.2.1

Reviews (2)
5
Michael OConnell 10:55pm 09/13/2018

awesome !

5
Neil Kanungo 11:31am 09/10/2018

This is a much needed feature to execute Python in Spotfire... Thank you!

Python Data Function

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.

Examples

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.

View the Wiki Page