Jump to content

Integrating Real-time Data with Spotfire: Data Functions vs. External Scripts/Components


Recommended Posts

I'm working on integrating real-time data from a WebSocket feed into my Spotfire analyses. While I understand Spotfire offers data functions for data manipulation, I'm unsure how to directly connect to WebSockets using them.

Here's what I've found so far:

  • Spotfire data functions (R/Python) primarily focus on processing existing data within the analysis file.
  • Spotfire itself doesn't have built-in WebSocket functionality.

My Questions:

  1. Are there any workarounds or techniques to leverage Spotfire data functions for real-time data access via WebSockets?
  2. What are some best practices or alternative methods for integrating real-time data sources with Spotfire analyses?

I'd appreciate any insights or experiences from the community on this topic. Thanks!

Link to comment
Share on other sites

Hi there, the easiest way to work with real-time data is to integrate Spotfire with the Spotfire Streaming product (https://www.spotfire.com/products/streaming-analytics). This is a separately licensed and installed product, but it integrates with Spotfire Analyst through some live tables. The result is the visualizations in Spotfire will update as the data in the live tables update, without need to call a manual refresh. You would be able to build a WebSocket connection within the Streaming product to feed these live tables.

Here's some examples from the Demo Gallery that show live streaming data:

Live Wikipedia Edits
Real-time Flight Tracker
Streaming Car Data
 

Link to comment
Share on other sites

Thanks for the suggestion! While Spotfire Streaming sounds like a great solution, it's currently outside my budget. I'm looking for ways to leverage the Python data functions I already have access to for real-time data integration.

Do you have any insights on potential workarounds using Python data functions or alternative methods that wouldn't require additional licensing?

Link to comment
Share on other sites

Hi TousifAhamed Nadaf

How often is the data updating and how frequently does the view of information in Spotfire need to be refreshed?

Depending on the frequency of data refresh needed, you could create a Python data function that converts the WebSocket response and converts it to a Spotfire datatable

https://plainenglish.io/blog/from-api-to-pandas-getting-json-data-with-python-df127f699b6b

and then use Automation Services to routinely call the data function / refresh the analysis

https://docs.tibco.com/pub/spotfire_server/latest/doc/html/TIB_sfire_autsvcs_UserGuide/autoservices/topics/execute_data_function.html

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...