This week we’ll focus on our Python integration for the first time to create a custom visualization chart: a stacked funnel plot.
You’ll be surprised at how simple it is to leverage this integration to further personalize your solutions – if you want to!
Here is the challenge. Let’s use this thread to post our solutions to it, which should be uploaded to your public KNIME Hub spaces with tag JKISeason2-28.
Need help with tags? To add tag JKISeason2-28 to your workflow, go to the description panel in KNIME Analytics Platform, click the pencil to edit it, and you will see the option for adding tags right there. Let us know if you have any problems!
Here’s my “solution.” Since I know next to nothing about writing Python, I took the coward’s way out and embedded one of the Plotly scripts in the Python View node. Took me a little while to figure out that when you do that you have to remove the input port.
Here is my solution: I implemented component where user may select columns for data, category and the color. It is also possible to provide opacity and select the type of plot — funnerl or funnel area. I tested my component on the data from JK2-1 and JK2-26 — the ones that refer mostly to some kind of sales of financial data.
The first row of the figure (40, Potential customers) is the absolute number of cells corresponding to the Toronto column in the table, the Potential customers row
The second row of the figure, 40% of the initial, is obtained by dividing the absolute number by the first line of Toronto (referred to as the initial) Website vitit.(haha , the typo vitit is obtained by copying the original data of @sryu ). This is calculated as 40/100 = 40%.
The third line in the figure is how much data was leaked from the previous funnel row, which is calculated as 40/60 = 66.7%.
The fourth row of the figure, 16% of the total, refers to 40/(100+60+40+30+20) = 16%. However, I am not entirely sure about the meaning of this particular figure in the context of funnel charts. (100+60+40+30+20) This addition doesn’t feel practical enough…
From your Console, it seems that pandas did not install successfully. I used Conda Environment Propagation to create a conda environment called plotly, with pandas, plotly, py4j, pyarrow installed, and then passed this environment to the Python View node.
As you can see from your diagram, Conda Environment Propagation shows a green sign, indicating that it ran successfully, but from the Python View node, the environment was not set up successfully. (Not sure why.)
Maybe you can delete the Conda Environment Propagation node, set this configuration of Python View as shown in the image below, and try it again? (plotly is installed by default in the new version of KNIME)