Vega Transform Geopoint

Hello,

I'm trying to emulate the [Flights] Airport Connections (Hover Over Airport) Vega Visualization. I think the problem is at the transform bloc where the lat and long fields are specified. On the demo, the format is

location	{
  "lat": 10.7614316,
  "lon": 122.5379966
}

My data on the other hand is

"location" : "14.619258,120.959765"

Is there anyway to transform this or should I restructure how my location data is written? Thanks.

Others may know better, but I haven't seen any Vega transform to operate in your data results that way. A workaround would be to create an ingest pipeline to generate that output for example using the Grok processor.

Not fully related but if your location field is mapped as a geo_point type, you may want to give a try to Elastic Maps capabilties.

Hi Jorge,

Thanks for the reply.

I also haven't seen Transform for my data results. I already fixed my data to match what is currently accepted. The problem I have right now is that the geo-points aren't visualized properly. Every time I run the vega script, only one point at the upper left of the map shows. I've been reading around and imitating other people's script but I can't seem to make it work.

I have been using Elastic Maps quite extensively for most of our use case. I'm trying to use Vega for this since we need to show the connection between points like in the airport demo.

I'd try to compare your visualization Elasticsearch request and response from the Flights demo. You can check it on your browser console filtering in the network tab for internal/search/es

Have you checked the Point to Point layer type?

Point to Point layer type would be perfect for what we want to do but the geo point is not in the same index pattern from our origin and destination data. I have already been able to visualize the points on the map but since the index pattern are different, I'm trying to use lookup similar to this Mapping Airport Connection Tutorial. Still facing some problems with this in Kibana but I'm not sure on what source of the error is. Thank you for your reply and suggestion.

You could use a pipeline to enrich one index to the other, that is using the common identifier to connect your points.

Maybe an evolution of that is to create a Transform that summarizes your input dataset (say group by destination) and then in the output index set an ingest pipeline to add the coordinates from the destination index. I'm not sure if pipelines can be used with the result of a transform but may be worth a shot.

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