I need to make a map using Vega-visualization. The coordinates come from an Elasticsearch index. I can load the index into Vega just fine. The issue is that I have no idea how to get Vega to understand the coordinates as anything, especially as geoshapes. My index is of the form:
Looking at the docs for vega geoshape transform, it looks like it is not possible to use the native response from Elasticsearch. Elasticsearch does not return geojson, but rather returns custom json with embedded geojson geometries. Vega geoshape transform requires geojson.
What is missing is a way to wrap _source.coordinates from a geometry like below.
Thanks for the tip! Do you know if it is possible to wrap Elasticsearch results in another schema (in this case, ""type": "Feature","geometry": ")? If not, should this be done by string concat + parsing to json?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.