Line Plot Readability Fix

Dear Brian (@takbb ),
I am facing a somewhat similar issue. After preprocessing a large amount of data (gathered from three consecutive periods) into Knime, I have concatenated all the grouped data and needed to plot these data in a graph.
Here is this part of my workflow:
image
My problem: using the < Line Plot (JavaScript) > node, all the “x” coordinates overlap one another, making these x coordinates unreadable, as in the picture below:


My (unsuccessful) attempts:
a) I tried to export these data to a CSV file (using the CSV writer node, and configuring it to encode in UTF-8 type (File 1)), and then open the file into MS-Excel, which is much easier to use in building graphs. But some rows simply (randomly) appeared to be about 10-fold smaller, though (if reopened in Knime, using the CSV reader node) data did not semmed to be corrupted. The same occurred to me using the < Table Writer > and the < Table Reader > nodes, although this Table file cannot be uploaded here.
File 1:
Concatenation_before+during+after_PHEIC.csv (4.1 KB)
My questions:
1)How could I build a similar graph (into Knime, without using Python or R languages), but rotating the coordinates (dates, on X axis) by 90 degrees?
2) I still would need to determine the two angular coefficients for both the two visually distinct segments, adopting the Interrupted Time Series (ITS) tecnique. To implement the latter, I can split my data using the < Rule-based Row filter > node. I formerly have already done so, and both coefficients were more than 4.5 fold different one another.
3) I still wish to change the y coordinates from a high Double number to a Scientific Notation, but the < Math Formula > node does not recognize the Double column (just the Integer one). How could I do this? And the < Column Expressions > (with the < exp(x) function > renders a “infinity” result.
Thank you so-SO very much for all your help.
Rogério.

@rogerius1st well we have been there before :slight_smile:

There is no big Python installation involved just the Python extension of KNIME that will contain all the necessary packages.

The small Data App contains all the necessary settings to take care of the angles of the descriptions and the scale. So why not give it a try? You also get a .PNG file that you can then re-use. All descriptions are there to be configured in the data app …

You can adapt the color of the lines (the column used) and the format of the x-axis just by changing the settings in the Data App. Also you can control the grid (if you want it or not).

Just to see how this might go I have adapted the approach to include a split day where before and after the system would try and calculate the trends:

In your case the split date would be 2020-04-01 and there would be two distinct trend lines with different coefficients. I hope I got them right:

The component would also provide the split data aggregated to month (or days if you have such data) as KNIME tables so you better could check if the calculation is correct.

The coefficients would also be present in the data as well as a Flow Variables so they can be used further.

Maybe you can tell me what you think. Even if you do not want to use Python (which I can understand).

This would just demonstrate how with a limited effort and in this case the help of ChatGPT and Claude AI such a system can be set up. One will have to be careful and see if the calculations made are the right ones. There is an argument to do this step by step with KNME nodes so to have a better understanding and documentation about what is going on. Our finance guys like to do this so as to be able to explain every step to someone not immediately familiar with the topic and always be able to see the intermediate results.

To do this would mean to have a clear definition of what the formulas should be.

If you want to use the data in Excel why not just export it into Excel with the help of KNIME (there is an excel file in the /data/ folder of the workflow).

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.