Pew Pew map
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
Go to Data Search and open the required table.
Perform the required operations to get the data you want to use in the chart.
To generate a Pew Pew map, your table must contain fields representing two pairs of latitude and longitude values in integer or float format. You can use the operations in the Geolocation group to create latitude and longitude fields based on existing data in your table.
For example, you can add to your table the latitude and longitude values corresponding to a set of IP addresses using the Geolocated Latitude (mmlatitude) and Geolocated Longitude (mmlongitude) operations.
- Select Additional tools → Charts → Maps → Pew Pew map from the toolbar.
Click and drag the column headers to the corresponding fields. This chart requires you to select five fields:
Required field Description Data type From (Lat) Latitude values of the source locations. float, integer From (Lon) Longitude values of the source locations. float, integer To (Lat) Latitude values of the destination locations. float, integer To (Lon) Longitude values of the destination locations. float, integer Value The values in this field are used to determine the width of each arrow. float, integer Color (optional) Set the color of each of the resulting arrows on the map. The string field may contain the color name itself ("red", "blue"...) or its corresponding code (hexadecimal, RGB, HSL, HSV, HWB or CMYK). string
- The Pew Pew map is displayed.
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:
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.
|Toggles the use of gradients in arrows.|
|Shows/hides the arrows on the map.|
|Toggles the animation of the arrows on the map.|
|Reset configuration to revert the applied operations to the display of the objects on the map.|
|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.|
|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.|
|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).|
|Changes the map style to adapt it to your visualization needs. You can choose from black or white backgrounds.|
|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.|
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 this 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|