# Aggregation/Clustering of Geo Points

**URL:** <https://discuss.elastic.co/t/aggregation-clustering-of-geo-points/42718>\
**Category:** Elasticsearch\
**Created:** [February 25, 2016, 1:23pm UTC](https://discuss.elastic.co/t/aggregation-clustering-of-geo-points/42718 "2016-02-25T13:23:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bamboo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bamboo/32/8058_2.png) [@bamboo](https://discuss.elastic.co/u/bamboo)\
**Post date:** [February 25, 2016, 1:23pm UTC](https://discuss.elastic.co/t/aggregation-clustering-of-geo-points/42718/1 "2016-02-25T13:23:26Z")

</div>

I have a list of geo coordinates with timestamps. I want to get the areas with the most geo points for today.

Example:  
`{[lat, lng], time}, ..., {[lat, lng], time} -> {area, #points in area},...,area, #points in area}`

I have seen that Elastic Search provides an [Aggregation functionality shown here](https://www.elastic.co/guide/en/elasticsearch/guide/current/geohash-grid-agg.html). I cannot translate that example to my use case.

Do you have an idea how I could solve this?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 26, 2016, 1:26am UTC](https://discuss.elastic.co/t/aggregation-clustering-of-geo-points/42718/2 "2016-02-26T01:26:06Z")

</div>

Basically the first thing you want to do is filter by time so you aren't grouping all the docs together by area irrespective of time.  
Then you can use this agg to gather things together for your results - [https://www.elastic.co/guide/en/elasticsearch/reference/2.2/search-aggregations-bucket-geohashgrid-aggregation.html](https://www.elastic.co/guide/en/elasticsearch/reference/2.2/search-aggregations-bucket-geohashgrid-aggregation.html)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:13pm UTC](https://discuss.elastic.co/t/aggregation-clustering-of-geo-points/42718/3 "2017-07-05T23:13:28Z")

</div>


