The world map widget displays geographical data on a world map. Different map projections are supported, such as the standard mercator or orthographic projection.
Field | Type | Description |
---|---|---|
lat |
number | A field containing the latitude to use for geohash bucketing. |
lon |
number | A field containing the longitude to use for geohash bucketing |
geohash |
string | OPTIONAL. A base32 geohash string to calculate latitude and longitude. |
precision |
number | 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. |
magnitude |
aggregate | 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. |
If both geohash
and lat
and lon
are specified, geohash
is ignored.
The world map widget can be used with any input that satisfies the format above, but you will usually want to bucket locations using geohashing. Humio provides a function worldMap
that helps you conform to the format.
worldMap(ip=ip)
worldMap(lat=myLatitudeField, lon=myLongitudeField, magnitude=avg(responseTime))
You do not have to use the worldMap
function in order to use the widget. You can also provide data that conforms to the input format. The results in Example 2 can be reproduced using the following query:
geohash(lat=myLatitudeField, lon=myLongitudeField)
| groupBy(_geohash, function=avg(responseTime, as=magnitude))
Here we use the geoHash
function to achieve the same bucketing of points as the worldMap
function does for us. If we do not use geohashing, we risk getting way too many points, making the widget very slow.