Step 3. Country distribution
Devo also includes a comprehensive set of geolocation functions that can be used to extract relevant geolocalization information from IP addresses.
- Suppose you want to extract the information of the countries from where the connections have been made. You can reuse our example query, going back to the moment we created the operatingSystems column. To do it, select the Toggle Search Tree tool from the query window toolbar and click the step where we created the column.
- Now select the clientIpAddress column and click Create Column from the toolbar.
- Enter Country as the name of the new column and select the Geolocated Country (mmcountry) operation. Select Create column when you're done. You will get the country codes corresponding to the IP countries.
- Apply an Or filter to the new column data to show only not-null values. To do it, hover over the column header and select the arrow that appears. Check the box at the top of the distinct values list to select all the values, and uncheck only the null value from the list. Select Apply in the window that appears to filter the data.
- As said above, the values returned in the Country column are codes, not the country names. If you want to obtain the country names, you have to create a new column using the ISO-3166-1 Country Name (countryname) operation.
Select and drag the new columns next to the clientIpAddress column to display the countries and corresponding codes next to the client IP addresses.