Conversion of multiple rows into duration bar diagram

Hello everyone,

I got just recommended Knime by a colleague to visualize my data. My background is far from that of a data scientist, so please bear with me.

I have used an observation logging tool called BORIS to analyze workers ergonomic behavior and would like to show insights and conclusions by displaying different natures of behavior over time.

BORIS outputs a csv file in which all categories I created are in a single column, please see a sample below:

So far I have loaded the file and used a row filter with the according cell description, for example “Standing and walking”, to then output a bar histogram, divided into 5 minute segments.

Here comes my question(s):

  • I would like to declare several row filters as a combined new value, such as: “standing and walking + standing = Good posture” and “bend + arms up high = negative posture”. Is there a simple node to do that, add two inputs and output a combined new one?

  • I would like to feed multiple nodes then into a histogram and show for each bin the 3 values, good posture/bad posture/neutral posture, but based on time per bin. My bins represent 5 minute segments, and I’d like to visually represent how much of these 5 minutes are spent in which posture category. The histogram node doesn’t seem to offer this option?

  • Lastly, my data input is in seconds, in this example 0 - 17.000, and the histogram acts accordingly in its labeling. Is there a time conversion node to automatically convert seconds to h+m ?

I hope these questions are okay to post here, seeing my data output basically all in one column seems to make things a bit unorthodox…


@BenCallisto Could you provide the category rollups you mentioned, i.e. good posture, etc. ? Also are you grouping all workers by the various categories? Finally, could you upload some sample data?


BORIS outputs basically all events logged into one column, the Behavior column, and the nature of the data under Behavior category. It contains position data, posture classification, and interactions, either as point events, or state events with a duration value. For the beginning (and to learn hopefully the rest myself later), I’d like to group EAWS codes “Bent forward”, “Strongly bent forward”, “Upright shoulder”, and “Upright head” into one new value, lets call it “Negative Posture”. the value “Standing” would be “Positive Posture” and “Standing and walking” become “Neutral Posture” (This is based on the sample data provided below, which covers the first 10 minutes out of 5 hours). My goal here would be to showcase for every five minutes the distribution of good and bad postures (e.g. 30% neutral, 50% good, and 20% negative) in a bar chart. Similar to what Megan was looking for here: Display two data sets in histogram

Just with the difference, that all my data comes from the same column, hence I work with row filters. The workers would be for now handled individually, I ight put their graphs side by side for comparison. The Histogram node gave me already a nice overview for a single value, but that was also based on occurences, not total time.

Thank you very much for answering!

Chat01_Cleaned.xlsx (22.0 KB)

I’m confused about your start and stop times. You said the total timeframe is 10 minutes, but the differences between the stop and start times are well beyond 10 minutes in many cases.

@BenCallisto welcome to the KNIME forum. I might have to take a closer look later.

I would approach the task in this way.

I would familiarise myself with the basic use of Python graphics in KNIME. The bundled extension already has the most powerful tools in board.

The you could employ ChatGPT to discuss and write the code.

If you want some interactive elements or flexible elements you can use Flow Variables. Also you can integrate that in a dashboard where you could explore and export the data.

The new report framework might even empower you to create PowerPoint or PDF data - but I have not tested it myself.

Indeed, there was a translation issue when i created the snippet and it removed all the decimals, making 17,xxx seconds to 17k

Chat01_Cleaned_decimal_fix.csv (17.5 KB)

This should work now, thank you for the heads up!

@BenCallisto I toyed around with my suggestion and came up with this:

An interactive dashboard that would take three inputs: Worker, DateTime and Posture. You can configure the size of the time interval between 1 and 10 minutes (or more if you want) and then a graphic would be produced that you can inspect in the DataApp and can download with a name and a time stamp (you can set a prefix if you want).

You can change the values in the app and press the “Execute” button again and the values will change.

Upon closing you can store the selected values and continue with the workflow. The image also has a graphic that would show the data in a constant stream with every minute being represented:

Admittedly this has some Python code in it but most of that has been adapted from existing examples and the basic code has been discussed with ChatGPT. So it should be possible to feed the whole code into its prompt and ask for improvements and change. At the top there are some Flow Variables from KNIME being used to make the code interactive.

The widget nodes ‘building’ this dashboard look more complicated than they are. Look at this article and video.

Yes this might be more than you have asked for - but if you master the art of adapting KNIME and some Python code (with AI help :smile: ) nothing can stop you in your endeavours. This could also work without the dashboard thing.

kn_example_python_graphic_time_series_grouped.knwf (1.6 MB)


Try this workflow. Its not very sophisticated, but I think it does most of what you want. It has two inputs you can try - one with a single worker; the other with two workers. They data is duplicated for both workers to keep it simple.


If you downloaded my workflow before 10:30 PM EST Sunday USA, please download again. There was a typo in the Rule Engine node. The correct version is now in the Hub.

1 Like

Hey Markus, this looks indeed amazing, I will definitely look into it. However, there is a reason I tried to go for a pure Knime solution, my past experience and skills with Python might be not fit at this point :wink:
Bookmarked your article and video.

1 Like

I haven’t worked on it over the weekend but will look into it today, thank you very much!

Here’s a workflow with a table view with fractional minutes converted to seconds.

What I’m currently looking for is, how I can segment the data in 5 minute steps. In the histogram node for a single posture value, I simply defined the amount of segments I wanted. Fiddling around with placing a Numeric Binner before the actual chart, but I got the feeling that this would simply add up everything instead of giving me a distributed readout?

Five minute bins are somewhat artificial since the time is continuous. An event may begin just inside a 5 minute bin and end well after. Regardless I’ll send you a binned version as soon as I clean it up.

1 Like

Here’s a version with 2 five minute bins. The total time duration in each bin will not be exactly 5 minutes for the reason I gave in my last post.

1 Like

My fault also thinking in two languages here, the goal is to be able to show posture trends over the period of a workday, as the workers perform the same tasks this would allow to show trends over time. The 5 minutes are feasible small chunks to cover an array of postures.

Again, thank you very much for your work, reading your nodes make sense to me, setting it up withhout sufficient program knowledge would be however difficult for me. It’s an interesting learning process!

1 Like

This way I could visually point out over 6 hours in which segments of the bar chart a high intensity of unfavorable ergonomics happens, and how the same segments compare to the other workers.

Take a look at this workflow. It employs line charts for each of the ergonomic groups. I think line charts are the most appropriate for what you’re trying to do. Obvously I have only ~ 10 minutes of data, but the binning approach will work with any amount of time data. I’ve also changed the order of the data in the data tables.

Line charts are used to display trends and patterns over time or a continuous variable.
They are created by connecting data points with straight lines. Line charts are effective
in visualizing changes, fluctuations, and correlations in data over a specific period.
They are commonly used in time series analysis and forecasting.


I played around with the line chart and added bins for one hour of data. Is it possible to unify the y-axis to always show the potential full five minutes? This way i could overlay the charts later with the right proportion to each other.

hi @BenCallisto
i’m not sure if my approach here meets your expectations. but it can be a starting point for creating a bar chart that combines selected variables.

the workflow here, is using your data filtered on “worker01”, within 34 minutes time-frame.


1 Like