cancel
Showing results for 
Search instead for 
Did you mean: 

Lumira Visualization: How to manage data binding when using flat tables data?

alfons_gonzalez
Active Participant
0 Kudos

Dear collegues,

In the latest month I have developed on my own several Lumira Visualization extensions using D3 js library (first using Lumira VizPacker and later Web Ide + Vizpacker tools). From my experience the most tricky point to move existing D3.js code developed using CSV data-files into Lumira extensions corresponds to data binding part where hard-code names referring to dimensions and measures requires to be replaced by calls to data.meta function.

Luckily several samples are available on the network to perform this step, so until now I have been always able to successfully manage the data binding part on the D3 to Lumira Extension conversion. All the situations that I have faced were the typical ones where the data set contains 1 dimension (e.g: product) and 1 measure (e.g: revenue)

By now our challenge is to develop a Lumira visualization that produces a kind of graph such this one. Basically it shows displays datasets on a 2-axis system where each data set consist on 2 time-based coordinates.

We have already completed a d3 code that generates requested graph by using a CSV flat file with this data-layout structure (first row column headersand sample values not correspding to graph)

X-Time,Dataset1,Dataset2,Dataset3

21/11/2015,01/01/2014,01/03/2105,03/03/2014

21/12/2015,01/01/2014,01/04/2105,03/03/2014

.......

dateA, date1A, date 2A, date 3A

At this stage issue has appeared when trying to bind a data file with this layout into a Lumira Visualization. Following standard steps I loaded the csv file into WebIde. As you can see the dates corresponding to each dataset/column does not appear

I tried to do the same using Lumira Vizpacker (yes, I know that everybody recommends to use WebIde by now but I missed it ). I upload the file and voila (see below) things seems to run much better now ( I can see dates on each column)

But after this partial success the issue arrives. When we apply the change following alert message appears

If we continue problems will appear as expected. Extensions seems to be unable to parse data properly if there is no dimension and measures

OK, but if we try will try to manage columns corresponding to data sets as measures. But another issue will appear now:  VizPacker is not also able to parse properly measures as they are dates (not numbers)

If we check tha data retrieved we will see that all measures appears as null (probably some sort of parseFloat is done on values that are not actually numbers if not dates)

At this point I am a bit lost.

Am I doing something wrong or Lumira SDK does not support situatons such as the one desrcibed below below where measures are dates (so strickly speaking there is no measures, only dimensions)?

Thanks for your support,

Any idea would be welcome.

Alfons

Accepted Solutions (1)

Accepted Solutions (1)

alfons_gonzalez
Active Participant
0 Kudos

Hi guys,

I answer my self.  Final solution has required reconsider the format of data to be loaded. Instead of initial approach we have decided that data input must be follow this format

dataset-name,X-time,Date(In days)

dataset1,200102,43000

dataset2,200103,24455

this layout implies 2 major changes:

- We implement the dataset name as a dimension

- In order to use data as a measure we convert it into a integer (days)

With these 2 changes our lumira customization works fine!

Alfons

Answers (0)