Converting a range of numbers to a heatmap (have scores for risk category)

rob.curry

New member
Joined
May 30, 2018
Messages
2
Hi there,

I am looking to plot a heat map in a style equivalent to that in page 9 of this PDF: https://www.hw.ac.uk/documents/risk-policy.pdf

I have a range of scores to use for a particular risk category (25, 20, 16, 16, 12). I don't want to just plot a bar from 12 to 25, as this does not reflect the multiple of instances of risks with a score of 16.

Does anyone have an idea for how I can plot a linear bar with upper and lower limits that reflect the quantity as well as range of distribution. i.e. what formula can I apply to average out the range into 5 distinct number with an appropriate upper and lower limit?

Hope this makes senses!



Thanks,

Rob
 
Hi there,

I am looking to plot a heat map in a style equivalent to that in page 9 of this PDF: https://www.hw.ac.uk/documents/risk-policy.pdf

I have a range of scores to use for a particular risk category (25, 20, 16, 16, 12). I don't want to just plot a bar from 12 to 25, as this does not reflect the multiple of instances of risks with a score of 16.

Does anyone have an idea for how I can plot a linear bar with upper and lower limits that reflect the quantity as well as range of distribution. i.e. what formula can I apply to average out the range into 5 distinct number with an appropriate upper and lower limit?

Hope this makes senses!



Thanks,

Rob

Hey Rob,

I like data visualization problems, but it's not totally clear what you are trying to do here. A colour bar is usually used to indicate scale on a 2D visualization known as a heat map, colour map, or intensity map, like the one below:

https://eoimages.gsfc.nasa.gov/images/imagerecords/87000/87992/canadalsta_tmo_2016126.jpg

In a heat map, you have 3-dimensional data. The two spatial dimensions (in this case latitude and longitude) make a 2D plot, and then the value of the third dimension (temperature in this example) at each set of coordinates is indicated using a colour. The colour bar shows what one-to-one mapping of temperature value to shade is being used.

I'm not sure why you would use a colour bar to visualize one-dimensional data. It's not clear what it tells you that looking at a line graph or bar graph wouldn't. In fact, there is no obvious way for it to capture the frequency information the way you would like it to (e.g. the fact that the value 16 occurs twice). For this, the standard thing to do would be to make a histogram, which is a graph (usually a bar graph) showing the set of values you have (grouped into bins) on the horizontal axis, and the count/number of occurrences within each bin on the vertical axis.

I looked at page 9 of that PDF, and I have to say, it appears somewhat meaningless. There's a table whose columns are degrees of severity (so this is qualitative data, not quantitative), each indicated by a colour. Then in rows there are different categories, each of which can range over any of those degrees. For some inexplicable reason, the bars showing the different degrees of severity spanned by each category are rainbow colour bars, but every single one spans the full range of colours, regardless of their length! And these colours are reused from the ones indicating the degree of severity. And the colours don't convey any additional useful information: the bar in each row could have just been a solid shade. This figure looks like it was put together by someone who doesn't understand data visualization too well, TBH.
 
Last edited:
Hey Rob,

I like data visualization problems, but it's not totally clear what you are trying to do here. A colour bar is usually used to indicate scale on a 2D visualization known as a heat map, colour map, or intensity map, like the one below:

https://eoimages.gsfc.nasa.gov/images/imagerecords/87000/87992/canadalsta_tmo_2016126.jpg

In a heat map, you have 3-dimensional data. The two spatial dimensions (in this case latitude and longitude) make a 2D plot, and then the value of the third dimension (temperature in this example) at each set of coordinates is indicated using a colour. The colour bar shows what one-to-one mapping of temperature value to shade is being used.

I'm not sure why you would use a colour bar to visualize one-dimensional data. It's not clear what it tells you that looking at a line graph or bar graph wouldn't. In fact, there is no obvious way for it to capture the frequency information the way you would like it to (e.g. the fact that the value 16 occurs twice).


Thanks. All very valid points. I have been trying to create something like this: https://www.mathworks.com/matlabcen...s/submissions/47165/versions/2/screenshot.jpg, but don't seem to be able to find a tool that will do that for me. Can't seem to in either Excel of PowerBI (I've tried various custom options). Any ideas what would give me this option?




Thanks,

Rob.
 
Top