I'm trying to build a heatmap in Vega. I can't build it in the normal heatmap visualization because I need each cell to be a ratio.
I have 3 fields, X from 0 to 9, Y from 0 to 9 and Z with values 0 or 1.
My goal is to build a heat map where the value of each cell is the ratio of all [X,Y] where Z==1 divided by all [X,Y].
So I do the following query: "GET logstash-/_search?q=X:0 AND Y:0 AND Z:1" and the hits.total is the numerator value I'm looking for. And if I do this one: "GET logstash-/_search?q=X:0 AND Y:0" I get the denominator.
Is there a way of using the ratio of all the 100 combinations I get to build the heatmap?
Is there a simple example of building a heatmap with vega that I could follow? The only one I found is a bit complicated.
Thank you very much.