Introduction
In Spotfire® Analyst, there is a little-known trick that allows one to load data from a simple URL or Web Service that presents data as a known data file type, e.g. csv, txt, Excel, etc. Loading data in this manner is not possible with more complex Web Services, e.g. scenarios in which authentication is required. For more complex scenarios, one can load data using TIBCO® Data Virtualization or IronPython scripting.
Solution
In order to load the data in this manner, one can open Spotfire Analyst and select File-> Add Data Tables. In the Add Data Tables dialog, select Add->File:
In the Add Data Tables -> Open File dialog, type or paste the URL into the "File name" text box at the bottom of the dialog. In this example, I created a simple TXT file and put it on my local Web Server so the URL to the file is http://localhost/testdata.txt:
After setting the correct URL, then one can click the "Open" button and then the Import Settings dialog appears in which one can select the appropriate delimiter and preview the data to make sure everything is correctly imported:
This is just a simple example. One can search the web for CSV data sets and download some of those as well from websites. Sometimes the filename extension will not properly come across as ".csv", ".txt", etc. in the file name, and, in those cases, Spotfire may not be able to determine the type of data and could throw an error. In cases that are still simple, one should be able to add some IronPython code to bring the data in as a TextDataSource after some pre-processing to give the filename a correct extension.
There are various websites from which one can pull CSV data. I found various data sets on the US DATA.GOV site - https://catalog.data.gov/dataset - that worked for testing.
Recommended Comments
There are no comments to display.