Solutions to "Just KNIME It!" Challenge 15 - Season 2

:boom: New Wednesday, new Just KNIME It! challenge! :boom:

:chart_with_upwards_trend:This week, we are all becoming freelancing Data Scientists and will help an actuarial agency to determine probabilities and life expectancy of their clients. Ready for another week full of creative dashboards? :chart_with_downwards_trend:

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-15.

:sos: Need help with tags? To add tag JKISeason2-15 to your workflow, go to the description panel on the right in KNIME Analytics Platform, click the pencil to edit it, and you will see the option for adding tags right there. :slight_smile: Let us know if you have any problems!

Hi everyone,
Here is my solution:
I used two table view nodes and a integer widget.

3 Likes

Hi all,
This is my solution.
Both a table and graphical representations were created.

6 Likes

Hi all.
This is my solution…
I preferred to manage the first 3 row using the excel reader node properties.

5 Likes

Here’s my solution. User can choose either sex or both. Workflow produces simple chart. Having worked in the insurance industry I’m comfortable that it would be a lot more useful than plots for actual work. Plots are fine for death by Powerpoint.

2 Likes

Hello everyone,
Here’s my solution. I used a table view.
Thanks.

2 Likes

Hi, crazy KNIMErs. :crazy_face:
Another Just KNIME done! :mechanical_arm:
Here is my solution: JKISeason2-15 Ángel Molina – KNIME Community Hub
More or less in the same way as my colleagues.
Just Knime It S2-15 Ángel Molina-min

I have wanted the slicer range to have an overview of the dataset, and the same time, have the possibility the view only 1 year.
Have a good weekend colleagues! :beach_umbrella:

5 Likes

My Take on the challenge 15 -

5 Likes

Hey Gang,
i kept this one super simple:

  1. i used the slider widget to select the age with a refresh button, as per hint 2… this is a favorite of mine.
  2. i used text output widgets to show the filtered data as an HTML table… the idea was that you could style as you like in the dashboard, but i didnt tackle the styling.
  3. i used a plotly scatter plot for the dataviz, but as always i dropped the code into a generic javascript node because the customizability is so good… always my preferred approach.
    hope you guys like it.
    L
    JKISeason2-15 – KNIME Community Hub
4 Likes

@MoLa_Data nice solution. i like the video - how did you do this?

2 Likes

Hi @l6fader
If you don´t have no software for capturing video of screens, you can use the “Windows + G” button in your Windows.
Regards!

2 Likes

Hi Everyone!

Here’s my entry for this week and very similar to my fellow KNIMErs :slight_smile:

I decided to use the -Slider Widget- node to select the age and the -Tile View- node to display the information ( just because I like the way it looks :slight_smile: ):

I also plotted the Life Expectancy and Death Probability on separate -Line Plots- to compare the difference between genders:

You can find my workflow on the hub here:

Best wishes
Heather

8 Likes

elegant solution! . . :ok_hand:

1 Like

Hello everyone,

Here is my solution, nothing fancy here. However thank you @HeatherPikairos for this idea with slider filter, I think it looks more convenient and practical then Integer Widget + Refresh button nodes. Anyway I implemented both approaches and enriched the dashboard with dynamic violin plots.

5 Likes

Hi Heather

Kudos in coming out with such an extensive workflow. I am trying to understand your thought process in arriving at this. Any inputs /suggestions for a novice as to how to proceed

Regards

Krish

1 Like

Hi @PKRISH

Thank you :slight_smile:

Actually, I’d say most of my workflow was for aesthetic reasons. For example, I wanted to add some labels to the slider widget, but found that if I used the positions of 0%, 25%, 50% etc. then the labels displayed were decimals eg. 59.5 as the halfway point. However, all of the age values in the data are integers, so I didn’t want a decimal number on the slider. I used the -Java Snippet- node to create the different values for the slider and then the -Create Collection Column- node to create a list. Thinking about it now, I could have added in a switch or a rule to only apply this logic if the max value is an odd number. Maybe this whole step was unnecessary but I learnt a few things along the way :slight_smile: haha

I also included a component to prepare data for the -Tile View- node where I converted the data to have 2 columns (male and female) with the statistic name and value concatenated into each cell in the columns.

Best regards
Heather

2 Likes

:fire: As always on Tuesdays, here’s our solution to last week’s challenge! :fire:

:sparkles: Our solution is similar to most here! I personally really enjoyed the use some of you made of slider widgets and different plots. Also, as always, we love to see how you folks help each other! :heart_eyes:

:arrows_counterclockwise: See you tomorrow for a new challenge!

3 Likes

Hello again,

I’m so happy to continue on the challenge, and now I have published my solution, influenced by some flow developed by several on this challenge, thanks to each one.

Here is my flow solution: JKISeason2-15 – KNIME Community Hub

The flow:
image

The main data process was worked through Phyton Script:

import knime_io as knio
import pandas as pd

# This example script simply outputs the node's input table.

df = knio.input_tables[0].to_pandas()
df.iloc[0] = df.iloc[0].ffill()
df = df.fillna("")

df1 = pd.DataFrame(columns=list(df.columns))
for i in range(len(df.columns)):
    df1[df.columns[i]] = [" ".join(df.iloc[:, i])]
df1 = df1.transpose()

knio.output_tables[0] = knio.write_table(df1)


The first point is to extract the first row and fill to the right all null values with the previous non-null value

df.iloc[0] = df.iloc[0].ffill()

after replace all miss values with empty value

df = df.fillna("")

Finally merge the first 3 rows, and create a new table with the new headers

1 Like

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