Adding Location or Machine Readable Capabilities to a Mobile-Ready Analysis

Adding distance calculation capabilities for mobile users

By adding a calculated column for distance to your location-aware Spotfire analysis, you can give Spotfire mobile app users the ability to find the distance from the device location and any latitude and longitude combination in the data set.

About this task

Perform this task in Spotfire Analyst

Before you begin

Your data set must have latitude and longitude columns, and you must have completed the steps in Adding location capabilities for mobile users.

Procedure

  1. On the menu, click Insert > Calculated Column.
  2. In the Insert Calculated Column dialog, click Insert Columns.
  3. In the Expression box, build the following expression.
    6371 * GreatCircleDistance(${AppGeoLongitude}, ${AppGeoLatitude},
    [latitude], [longitude])
    
    Note: This calculation specifies kilometers. To specify miles, use 3959.
    latitude and longitude in this example reflect column names. If yours differ, modify the example.
  4. Give the column a name, such as distance, and click OK to save and close the dialog.

Results

The calculated column appears in the Data Panel, and your analysis can use this column to measure distances between the mobile device and any data point in the data set by using its geo-positioning properties.

What to do next

Add a text area and details visualization for users to see locations and distances.