How to create a Histogram with data

Hello KNIME members,

I am struggling with making histograms in KNIME. The following histograms I need to make in KNIME(done in excel):

On the x-axis i need to have the months and on the y axis I need to have the temperature for one histogram and electricity usage for the other histogram.

To do this I have the following datasets (included in the ZIP file):
Datasets.zip (63.8 KB)

To explain the datasets a bit more:

Dataset 1(“data”): Contains the electricity load each 30 minutes in years 2014 and 2015. Each row corresponds to the data of one day. Columns 1, 2 and 3 indicate the year, month and day of the measurements, respectively. The remaining columns show the electricity loads in 30 minutes blocks on that day. More specifically, T1 denotes the load of period 00:00-00:30, T2 00:30-01:00, and so on, and T48 is the load of the last 30 minutes of the day, i.e. period 23:30-00:00.

Dataset 2 (“Temperature”): Contains the average daily temperatures from 2012 to In the data file, the first three columns contain the information of year, month, and day, respectively. The last column indicates the average daily temperature in °C.

My question is how can I get this working in KNIME? I am able to load the CSV files in KNIME but then?

Thank you in advance!

Hi @StudentEt

I think there’s some terminology being mixed up. These are not histograms, they are bar charts, so you’d use one of the bar chart nodes (I’d use the GroupBy Bar Chart node) to plot the data.

However, you need to do some preprocessing so that the data is in a format that the GroupBy Bar Chart node can work with.

This includes pivoting the data, replacing month numbers with names, and potentially filtering out the years you don’t want.

See this example for the Temperature data:

You can play around with it to see how it works, and do the same for your other data set.

If you want tips on formatting bar charts, then there are some examples on the KNIME Hub here:

3 Likes

Thank you very much! This helped me a lot and I had it working within minutes!

2 Likes

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