Maps: Doing simple math on a region Aggregation

I have an index (index1) with that contains documents with a geo spatial boundary field and an associated area field. I have a second index (index2) that includes documents with a simple geopoint field.

I would like use the Maps app to do a simple calculation:
I want to do a count aggregation of the documents in index2 for each region in index1, then I would like the color scale for the regions on the map to be displayed as the ratio of Count/Region Area. Is there any good way to do this?

Things I have already tried:

  1. Scripted fields don't work because can only apply on a single index
  2. I tried to do this in a Vega visualization, with a bucket aggregation query but I am limited to only showing 10,000 region boundaries and I have more than 10,000

Thanks in advance!

Hello,

Dynamic color ranges in the Maps App aren't possible yet. There is however a PR in progress along with some relevant linked issues.

Regards,
Aaron

Thanks Aaron, this actually isn't really what I'm looking for. The part that is hard is to do basic math in the aggregation query within a Kibana Map or other type of Visualization

For example a Count aggregation where the result is divided by a constant can easily be done that way, but then I have no way to display the result unless I build a custom Vega visualization

In the case described above a Vega map would be a fine solution, however, since the query is limited to 10000 results I can't do it easily. Maps would be a great solution, but I don't think there is any way to do this?

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