Tutorial

Circle World Map

The circle world map widget shows a map where the number of values for each area is represented by colored circles.

Circle World Map

Example

import RequestApi from '@devoinc/applications-data-library/requests/RequestApi';
import dateRange from '@devoinc/applications-builder/utils/dateRange';
import circleWorldMapWidget from '@devoinc/applications-builder/widgets/circleWorldMap';

let query = `from demo.ecommerce.data
where isnotnull(clientIpAddress) 
select mmlatitude(clientIpAddress) as latitude,
mmlongitude(clientIpAddress) as longitude
group every 30m by latitude, longitude
select count() as count
`;

let request = new RequestApi({
  query: query,
  dates: dateRange.fromNow(1, 'day'),
});

let widget;
widget = circleWorldMapWidget('circle-world-map-example');
widget.setRequests([request]);
widget.setKeys([{ lat: 'latitude', lon: 'longitude' }]);
widget.setValue('count');

See API