Make Data Compatible With World Map Widget - Example 2

Make data compatible with World Map Widget using the worldMap() function and geo-coordinates

Query

flowchart LR; %%{init: {"flowchart": {"defaultRenderer": "elk"}} }%% repo{{Events}} 0{{Aggregate}} result{{Result Set}} repo --> 0 0 --> result
logscale
worldMap(lat=location.latitude, lon=location.longitude)

Introduction

The World Map Widget displays geographical data on a world map. Typical fields used in the World Map Widget are lat, lon, geohash, precision, and magnitude.

The worldMap() function is a helper function to produce data compatible with the World Map Widget.

In this example, the worldMap() function takes either IP addresses or geo-coordinates (latitude/longitude) as input and buckets points using a geohashing algorithm.

The worldMap() function will automatically bucket the locations to reduce the number of points.

Step-by-Step

  1. Starting with the source repository events.

  2. flowchart LR; %%{init: {"flowchart": {"defaultRenderer": "elk"}} }%% repo{{Events}} 0{{Aggregate}} result{{Result Set}} repo --> 0 0 --> result style 0 fill:#ff0000,stroke-width:4px,stroke:#000;
    logscale
    worldMap(lat=location.latitude, lon=location.longitude)

    Plots existing geo-coordinates (latitude/longitude) on the world map.

  3. Event Result set.

Summary and Results

The query with the worldMap() function is used to visualize and present location data, in this case IP adresses and their exact geo-coordinates, in a World Map Widget.

Visualization of IP addresses ond their exact geo-coordinates on a global map is more accurate and useful in cases where high precision is required, for example for physical asset tracking.