Hello everyone !
I would like to be able to produce a heatmap based on something else than the
total count of index in each cell, like the example below (get an heatmap with
average population age instead of juste population count for each cell) :
Query :
{
"avg_age_heatmap": {
"type": "heatmap",
"geom": "[-180 -90 TO 80 90]",
"gridLevel": 1,
"field": "house coordinates",
"aggregationFunc": "avg"
"facet": {
"age": {
"type": "range",
"field": "age",
"start": 0,
"end": 120,
"gap": 1
}
}
}
}
Result :
{
"facets": {
"count": 999,
"avg_age_heatmap": {
"gridLevel": 1,
"columns": 8,
"rows": 4,
"minX": -180.0,
"maxX": 180.0,
"minY": -90.0,
"maxY": 90.0,
"counts_ints2D": [
[
80,
26, => average population age in this cell
35,
19,
0,
42,
32,
30
],
}
}
}
I know that the nested facet inside heatmap is not supported yet, but does
anyone know if this is feature is planned for a futur release ? Or is there any
other mean that I did not think about to get this kind of result ?
Have a good day !
Nicolas