Solutions to “Just KNIME It!” Challenge 11 - Season 4

:sun_with_face: Another Wednesday, another Just KNIME It! challenge! Are you ready? :boom:

:control_knobs: This week you’re a data-driven DJ trying to curate the perfect playlist for a two-hour dance event. Your task is to select tracks with high danceability scores, calculate cumulative durations, and filter the playlist to stay within the two-hour limit. Can you come up with different playlist options using this data-driven approach? :man_dancing:

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 JKISeason4-11 .

:sos: Need help with tags? To add tag JKISeason4-11 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. :blush: Let us know if you have any problems!

2 Likes

Find my submission : JKISeason4-11 – KNIME Community Hub … though couldnt relate any songs to dance… or any familiarity in them …


2 Likes

Here’s my solution. Table with < 2 hours of play time. Songs sorted by playability and energy. Table with same songs shuffled to create a new playlist. Chart with songs by language.


1 Like

Hi All,

My solution is here: JKISeason 4-11 - Let's Dance – KNIME Community Hub

Had to work on duration formatting to be able to use the node String to Duration.
From there, I extracted the duration in number to do cumulative sum of the Duration. Then filtered the table to keep the songs and stay under 2 hours in total. It is also filtered to keep only the top danceability songs - we can imagine to tailor that and maybe give to the user the option to select the song they want to keep.

The output is simple this time - not much time today sadly :wink:
A table is displayed listing the songs, details and duration, including the cumulative duration.
The max duration can be selected by the user. Many other settings could be added to improve the workflow and output.

Enjoy all.
Cheers
Jerome

1 Like

…really wanted to search and add links to youtube music videos of the tracks but google wouldn’t let me!

1 Like

Being a rock aficionada :metal:, there is no chance to see me on this dance floor!

But I have gather 3 different moods in this workflow.




2 Likes

Hi everyone,

this is my solution for this week’s challenge: JKISeason4-11 – KNIME Community Hub

Data Preparation:

  • Eliminate rows with missing values, extremely long songs (over 24 hours), or songs with key attributes (e.g., danceability, energy) below 0.5 to reduce dataset size and enhance processing efficiency.
  • Calculate an average score using selected attributes such as danceability, energy, liveness, tempo, and popularity.
  • Categorize songs into bins based on release year and duration to enable flexible filtering and analysis.

Data Visualization

  • A big thank you to @AnilKS for the inspiring idea of using Generic ECharts View to create engaging animations.
  • DJs can filter songs by language, release year, and duration to build an optimal playlist with a total duration of 2 hours or less, and shuffle the tracks.
  • Display overall KPIs such as total number of songs, number of languages, and the playlist’s total duration.
  • Explore the use of Generic ECharts View for gauge visualizations.
  • Visualize the distribution of songs across language, release year, and duration.
  • Include a table displaying detailed information about each song.



Have a nice day everyone :blush:!

3 Likes

Thank you so much, @hanantoprabowo , for your generous words! Always love seeing how the JKI challenges bring out our collective creativity and curiosity—each challenge is an invitation to chart new digital landscapes together. Your visualizations always light the way, inspiring me and the whole community to push our boundaries. Really appreciate your support and insights—here’s to many more explorations ahead!

1 Like

:dancer::man_dancing: Indian Dance Party Playlist Generator – My approach to Challenge #11!

My solution to the challenge JKI11-4

This week, I explored how to best squeeze the most energetic tracks into a 2-hour dance marathon :clock2:, working through some messy duplicates, missing values and language variety.

I noticed some duplicated songs (same title, artist, duration… :eyes:), but I kept only the versions with the highest danceability – it’s a party, after all!

I structured my solution in three flavors (because one playlist is never enough):


:one: Raw Mode
Straightforward and brutal: sorted by danceability, kept songs until cumulative duration hit 7200 seconds using Moving Aggregator.
:bar_chart: Visuals: language distribution + radar chart to explore track features.


:two: Custom Score Mode
Weighted score (emphasizing danceability, but not ignoring energy, valence, etc). After normalization and scoring, same cumulative duration logic.
:bar_chart: Same visuals to explore feature balance.



:three: Inclusive Mode
Same as above, but ensuring at least one song per language (because rhythm knows no borders :earth_africa:).
Filtered accordingly before applying the cumulative limit.
image



:headphones: Sadly, I couldn’t get the looping logic to dynamically test better track combinations (I tried a lot but probably I need more training)… The dream of a true optimal playlist remains just out of reach. If any KNIME wizard out there has the perfect loop trick – tag in! :men_wrestling: (In memory of the great Hulk Hogan, this challenge definitely needed some tag team energy :muscle:)

Looking forward to feedback, suggestions, or remix ideas from the community or more skilled Knimers! :notes:

3 Likes

always stunning as usual! :star_struck:

1 Like

Thanks, but all of you made very astonishing insights. But if any of you have a suggestion to solve the problem by loop, maybe we could reach the definitive solution to this challenge together.

1 Like

Experimented a bit inspired by @hanantoprabowo with synced palette , pointers, and labels .while doign so struggled with auto shuffle , can someone suggest if we can have a countdown timer basis the time variable which can trigger the shuffle node. could do this with wait / refresh.

2 Likes

Hello Team,
Here my solution to this week Just KNIME It challenge:
JKISeason4-11

The data wrangling to arrive at a cumulative duration was probably the challenging piece in this challenge, but it was also fun to solve it too.

For this challenge, I primarily leveraged ChatGPT to help me with this exercise and it definitely helps given my limited time.

It’s amazing to see the other workflows and all the creativity to solving these challenges.

2 Likes

My solution to the challenge:

My solution is rather simple (but I have learned a lot from it!):

  1. Download the CSV from the HUB (that’s one new thing I learned in this challenge)
  2. Filter for Danceability = 1
  3. Sort the data by popularity DESC
  4. Calculate so just the first ~120 minutes included
  5. Visualize the suggestions
    5.1 In this the learning point was for me that how can we import images from the internet keeping the original (big) resolution (It can be done, I think the image handling in KNIME dashboarding is one of the strongest point)

My workflow:


My outputs:


I really love the challenges with so many learning possibilities! :slight_smile:

2 Likes

@berti093 As expected beautiful and sharp viz …

1 Like

:clap: Hats off to you,. another elegant and well-executed solution! Your dashboard composition is as polished as ever, and I totally agree: KNIME’s image handling (especially for visuals at scale) is truly underrated :rocket:

One question came to mind while studying your approach:
Have you ever considered a variation that skips the first song that causes the cumulative duration to exceed 120 minutes, and instead tries the next available option(s) in the sorted list? I’ve been exploring ways to optimize the final playlist length—ideally getting as close as possible to the 7200s cap without overshooting.

I tried a few attempts using loop combinations, but I’ll admit it… I still have some serious training to do in advanced loop mechanics :man_juggling:

Would love to hear your thoughts if you’ve tackled a similar scenario before!

1 Like

Thank you @PVergati ! :slight_smile:

The question is real interesting, sadly I cannot sit before a computer now, so I will just write my thinking (and as It’s a real interesting problem It’ssure that I will do that as Ican sot there :smiley: ). I would:

  1. split the data where the cumulative duration is less than 120 minutes
  2. Calculate the difference in the first durations and 120 min
  3. Add the nearest number to the first dataset
  4. If It’s not optimal, add the smallest duration and repeat the process (3. step)

As I couldn’t try this I do not know how optimal it is but I would start like this. Whats you thinking?

1 Like

Great point — your reasoning is as sharp as ever, and I really appreciate how you framed this alternative.

Initially, I leaned toward using a Chunk Loop for its simplicity—just iterating track by track and skipping the first one that breaks the cumulative threshold. But the more I think about it, the Recursive Loop might actually be the better tool here.

Why?

Because recursive loops allow you to:

  • track cumulative duration step by step,
  • test combinations incrementally (e.g., skip track X, try adding track X+1 instead),
  • and maintain a growing playlist at each iteration.

That way, we could:

  1. Stay within the 7200-second limit,
  2. Keep danceability above a quality threshold (e.g. ≥ 0.75),
  3. Avoid stopping at the first “too long” track, and keep testing deeper combinations.

It’s kind of like playing TETRIS with music tracks—and Recursive Loops might just be the best fit block :smile:

Sure, it’s not a perfect optimization (greedy strategies rarely are), and I haven’t nailed the full loop mechanics yet… but it feels like a fair compromise between performance and complexity.

Curious to hear if this logic could mesh well with your current approach—or maybe even form the base of a hybrid one?

And of course, every KNIMEr here is welcome to join the brainstorming! :brain::bulb:

I think the real question if we would like to solve a full optimization problem for the 155 tracks (with danceability = 1) or just after the initial sorting try to find the last “not too long” song.

If we want to do the full optimization (the harder, or maybe impossible?) we should create every combinations from the 155 rows table (or just the realistic ones). But as it’s a rather big table it’s 2^155 combinations which is 425 quattuordecillion (astronomically large :smiley: ) (if we would evaluate one billion subsets per second, to evaluate all still would take much much more time than the age of the universe :smiley: )

The second one is the easier one:

  • after the initial less than 120m you should incrementally add the smaller elements to the list until you reach 120m (or 7200s)
  • If I understand correctly that is what you want to achieve, for that I wouldn’t use loop, just sorting
    • For the first “optimal” table I would add the second table smallest element. If that’s still smaller than 120m (7200s) than I would add the second smallest element
    • For this the recursive loop is the solution to go, as it handles the changing table size

Hep me out if I understood the problem and your approach correctly! The real elegant one would be the full optimization but maybe it’s nor managable (or at leat not on our machine :smiley: )

1 Like

I would build something like this:

It will recurse the table with the suggested songs and the rest, and collect the data from the current iteration.

I hope it helps and you are working on something like this, I’m really open to discussion how to optimize it (I just had the time to sit down for a little, when the kids are sleeping :slight_smile: )

1 Like