Document toolboxDocument toolbox

Pew Pew map

Overview

Colloquially known as Pew Pew map, this chart track live attacks going from one location to another over a world map, depicted as arrows whose colors and widths are defined by the values in the specified fields.

What data do I need for this widget?

The option to create this map will be disabled unless your query contains at least five columns with numeric values. Furthermore, to show meaningful content on the map, four of those columns must correspond to two pairs of longitude and latitude values and you must group your data.

Creating a Pew Pew map  

Working with Pew Pew maps

To change the visualization area you can perform the following actions:

  • Click the + button to zoom in.

  • Click the - button to zoom out.

  • Left-click and drag to pan the map to the desired area.

  • Double-click to zoom in.

  • Click the button at the top right to toggle fullscreen mode (press Esc to exit fullscreen).

You can hit the following keys to perform different visualization actions:

Shortcut keys

Description

Shortcut keys

Description

w / S

Changes the next color gradient for temperature representation. This will change the color scale for another with a different base color and number of colors to represent the lowest/coldest and highest/warmest. When you get to the las available gradient, pressing the key will go back to the first.

This might be useful when the values are very similar and belong to the same range so they would be represented in the same or very similar color. This way we might be overlooking the differences in the values because of the lack of contrast and changing the gradient could help so that the values would be represented differently.

g

Toggles the use of gradients in arrows.

v

Shows/hides the arrows on the map.

p

Toggles the animation of the arrows on the map.

n

Reset configuration to revert the applied operations to the display of the objects on the map.

l

Applies a logarithmic operation to normalize the data, which will be reflected in the objects represented on the map. This might be useful when some values are too far from the general range so normalization is needed for a more cohesive representation. 

a

Applies an arctangential operation to normalize the data, which will be reflected in the objects represented on the map. This might be useful when some values are too far from the general range so normalization is needed for a more cohesive representation. 

o

Toggles sort descending/ascending (when output is limited). This means the arrows representing the highest values will be shown on the front while the ones representing the lowest values will be shown on the back (descending) and vice versa (ascending).

d

Changes the map style to adapt it to your visualization needs. You can choose from black or white backgrounds.

u

Toggles limit/unlimit. This limits the results shown in the displayed area showing only the most relevant to improve performance. You can check it at the bottom of the map window; Infinity means all results are shown while a number means it is limited to that number.

?

Shows/hides the list of shortcuts keys.

Query example

You can recreate the example shown in the GIF above using the data from the following query and mapping the fields as follows:

This example uses values in a data table generated from the following CSV file.

If you want to try the example for yourself, download the file and upload it to your domain clicking Data upload in the navigation pane. Name the new table my.upload.countries.flights and select Current date as Date parsing type. Learn more about uploading data in Uploading log files.

from my.upload.countries.flights select split(message, ";", 1) as lat1, split(message, ";", 2) as lon1, split(message, ";", 5) as lat2, split(message, ";", 6) as lon2, split(message, ";", 8) as flight, float(lat1) as latitude1, float(lon1) as longitude1, float(lat2) as latitude2, float(lon2) as longitude2, int(flight) as Nflight group every 5m by latitude1, longitude1, latitude2, longitude2, Nflight every 5m

Required field

Column added

Required field

Column added

From(lat)

latitude1

From(lon)

longitude1

To(lat)

latitude2

To(lon)

longitude2

Value

Nflight