# Creating heatmapjs using elasticsearch database

**URL:** <https://discuss.elastic.co/t/creating-heatmapjs-using-elasticsearch-database/21765>\
**Category:** Elasticsearch\
**Created:** [January 22, 2015, 2:09am UTC](https://discuss.elastic.co/t/creating-heatmapjs-using-elasticsearch-database/21765 "2015-01-22T02:09:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![apert](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/apert/32/779_2.png) [@apert](https://discuss.elastic.co/u/apert)\
**Post date:** [January 22, 2015, 2:09am UTC](https://discuss.elastic.co/t/creating-heatmapjs-using-elasticsearch-database/21765/1 "2015-01-22T02:09:04Z")

</div>

I'm trying to make a new heatmapjs using data from twitter-river  
elasticsearch. I can extract geolocation from Twitter data, but how do I  
pass the data the heatmapjs. Here is sample dataset from heatmapjs:

var testData = {  
max: 8,  
data: [{lat: 24.6408, lng:46.7728, count: 3},{lat: 50.75, lng:-1.55, count: 1},{lat: 52.6333, lng:1.75, count: 1},{lat: 48.15, lng:9.4667, count: 1},{lat: 52.35, lng:4.9167, count: 2},{lat: 60.8, lng:11.1, count: 1},{lat: 43.561, lng:-116.214, count: 1},{lat: 47.5036, lng:-94.685, count: 1},{lat: 42.1818, lng:-71.1962, count: 1},{lat: 42.0477, lng:-74.1227, count: 1},{lat: 40.0326, lng:-75.719, count: 1},{lat: 40.7128, lng:-73.2962, count: 2}]  
};

```
 heatmap.setData(testData);

```

How can I parse data from elasticsearch queries to dataset?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/464d96b1-dbca-45b7-b4df-ee1285f2e10d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/464d96b1-dbca-45b7-b4df-ee1285f2e10d%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 12:37am UTC](https://discuss.elastic.co/t/creating-heatmapjs-using-elasticsearch-database/21765/2 "2017-07-06T00:37:24Z")

</div>


