A helper function to produce data compatible with the World Map widget. It takes either IP addresses or lat/lon as input and buckets points using a geohashing algorithm.
Parameter | Type | Required | Default Value | Description |
---|---|---|---|---|
ip | string | optional[a] | The field containing the IP address to look up geo-coordinates for. | |
lat | string | optional[a] | A field containing the latitude to use for geohash bucketing. | |
lon | string | optional[a] | A field containing the longitude to use for geohash bucketing. | |
magnitude | aggregate | optional[a] | count(as=_count) | A function used to calculate the magnitude (weight) of each bucket. This value is used to determine the size or opacity of the world map markers. |
precision | number | optional[a] | 4 | The precision to use in the calculation of the embedded geohash. Usually 4 is fine for a full globe, 12 is for a small area of zoom. |
[a] Optional parameters use their default value unless explicitly set. |
worldMap()
Syntax Examples
Plot IP addresses on the World Map. The magnitude is the number of observations in each bucket (the default).
worldMap(ip=myIpField)
Plot existing geo-coordinates (latitude/longitude) on the
World Map. The worldMap()
function will
automatically bucket the locations to reduce the number of
points.
worldMap(lat=location.latitude, lon=location.longitude)
Plot IP addresses on the World Map and use average latency as magnitude of the points.
worldMap(ip=myIpField, magnitude=avg(latency))
worldMap()
Examples
Click
next to an example below to get the full details.Calculate Geohash Value of a Set of Coordinates
Calculate a geohash value given two fields representing latitude and longitude using the geohash()
function