TIBCO Cloud™ Spotfire® User Guide

Aggregating coordinate-based locations values

If geographic coordinates are available in the data loaded into a marker layer in the map chart, each marker is positioned at its coordinates. But you might not be interested in separate markers; instead an aggregated value representing multiple markers might be of interest.

The most common way to position markers is by geocoding. Then you can aggregate values by moving up one level in the specified geographic hierarchy. For example, if the columns you use for geocoding are Country > City, you simply remove the "City" column to get a marker representing the aggregated value for all the cities in each country.

If you want to aggregate values for markers positioned using coordinates, first check whether geocoding can be used.

In the installed client, you can open the visualization properties dialog, locate the Positioning page and, under Position markers using, choose Geocoding:

In the web client, open the visualization properties popover and, under Geographic location, switch to Name-based (geocoding).

However, this option requires that columns with geographical names are provided. If no such columns are provided, see the example of a possible solution below.

Example: Aggregating while keeping coordinate positioning on axes

The data below contains house prices for four different objects. Two of the objects are located by the sea, and two of them are further into the land. Note that no columns with geographical names are available, only coordinates.

Below, the data is loaded into a map with the objects placed at their coordinates (labels show the prices), and the visualization properties panel is open to the right of the map:

Assume you wish to compare the average price of houses with a sea view, to houses without. Geocoding is not an option, because no column contains geographic names.
Instead, select "Area" on the Marker by selector to aggregate values per "Area" type. Then, the X- and Y-column values must also be aggregated; otherwise each of the four coordinates will still be shown. The best aggregation method is probably average, as shown below:

The markers are now placed on an average position based on the latitude and longitude for each area type.

Note: The labels in this example have been manually updated to show the average price for the aggregated markers. You specify labels in the Labels section of the visualization properties.