# Geopoint Coordinate map question

**URL:** <https://discuss.elastic.co/t/geopoint-coordinate-map-question/163444>\
**Category:** Kibana\
**Created:** [January 9, 2019, 1:48am UTC](https://discuss.elastic.co/t/geopoint-coordinate-map-question/163444 "2019-01-09T01:48:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexwbai](https://avatars.discourse-cdn.com/v4/letter/a/bb73d2/32.png) [@alexwbai](https://discuss.elastic.co/u/alexwbai)\
**Post date:** [January 9, 2019, 1:48am UTC](https://discuss.elastic.co/t/geopoint-coordinate-map-question/163444/1 "2019-01-09T01:48:56Z")

</div>

Hi,

Rather than have a bazillion messages go to Elasticsearch, I'd like to summarize the number of people in a subway station in a json record at a given time like this. A JSON event sent to Elasticsearch would look something like this (Excuse the JSON syntax; I'm freestyling here):

{  
stationName: "Wellesley St.",  
lat: 78.9348,  
long: -98.8764,  
peoplecount: 50,  
@timestamp: 15098796,  
}

I would send something like this for each station every couple of seconds and use a coordinate map vizualization to tell me show me many people are in the subway station based on a SUM of the "peoplecount" field. (eg. The higher the count of people, the bigger the dot on the map)

Is this possible with Kibana? Or do I need to send every separate event to Elasticsearch and then do a count.

Thanks,  
AlexW

---

<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:** [January 9, 2019, 4:30am UTC](https://discuss.elastic.co/t/geopoint-coordinate-map-question/163444/2 "2019-01-09T04:30:58Z")

</div>

Either will work.  
Individual events also means you could do things like track journeys. But the flipside is it's more data, you could do `_rollups` on the data after a period of time (eg a month) to reduce long term storage though.

Just make sure you map the event in a format that Elasticsearch understands - [https://www.elastic.co/guide/en/elasticsearch/reference/6.5/geo-point.html](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/geo-point.html)

---

<div class="post-metadata">

**Author:** ![alexwbai](https://avatars.discourse-cdn.com/v4/letter/a/bb73d2/32.png) [@alexwbai](https://discuss.elastic.co/u/alexwbai)\
**Post date:** [January 18, 2019, 4:21pm UTC](https://discuss.elastic.co/t/geopoint-coordinate-map-question/163444/3 "2019-01-18T16:21:21Z")

</div>

Hey Mark,

Thanks so much for taking the time to reply! I was hoping you could guide me a little further if possible (with Kibana specifically).

So I have the data going to Elasticsearch and the geocoordinates seem to be working fine. Here's what the sent data looks like (I'm using the bulk api):

{"id": "672d4f9712db446888c13bbaccfbfb7c", "ts": 1547821765000, "station": "spadina", "devicecount": 101, "location": {"lat": 43.6694, "lon": -79.40440000000001}}  
{"create": {"\_index": "test", "\_type": "\_doc", "\_id": "ed6e18ef0c66423e8778da15e263f050"}}

{"id": "ed6e18ef0c66423e8778da15e263f050", "ts": 1547821765000, "station": "spadina", "devicecount": 101, "location": {"lat": 43.6678, "lon": -79.4042}}  
{"create": {"\_index": "test", "\_type": "\_doc", "\_id": "403bbe951d524127876d61cfb79328c4"}}

And this is being done for every station (about 80 stations). I'm streaming this into ES successfully.

My goal is to plot these locations on a geocoordinate map and then do a SUM of the "devicecount" grouped by station. The end result will be a map of Toronto which is refreshing periodically with how many devices are seen in each station.

I'm having difficulties in how I can group the stations in the geocoordinate map. I only seem to get one coordinate with a giant sum of everything. Any thoughts?

AlexW

---

<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:** [January 18, 2019, 11:14pm UTC](https://discuss.elastic.co/t/geopoint-coordinate-map-question/163444/4 "2019-01-18T23:14:54Z")

</div>

What is the current mapping for the index?

---

<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:** [February 15, 2019, 11:15pm UTC](https://discuss.elastic.co/t/geopoint-coordinate-map-question/163444/5 "2019-02-15T23:15:01Z")

</div>

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