Time series data is a timestamp and a value in principle. What do you want to do with the geo attributes? The Worldmap Panel is an example of how to take coordinates and translate them into groupings. It uses the Elasticsearch geohash aggregation to group values into a grid cell.
Well, I wouldn’t describe the code as magic. All it does is take the data from different databases (time series, table and geohashes) and transforms them into the format Grafana expects. This is the function that handles geohash values from ElasticSearch. It returns the following in the response: