What is Geocoding?


In order to display data on a map, the data needs to be geocoded. Geocoding in TIBCO Spotfire is the process of using some type of identifiers in a data table and matching those to similar identifiers in another set of data tables (a geocoding hierarchy) which contains latitude/longitude coordinates or geographic features. These coordinates or features are then used for correctly positioning the data in a map context.

If your data contains simple geographic elements such as country names, states, or similar, then Spotfire will attempt to automatically geocode your data. If no automatic geocoding can be performed, you can set up the geocoding manually instead.

Many parts of the user interface allow you to specify that a column in a data table should be used to match against a specific geocoding hierarchy. This will make the process of setting up a map chart with that data easier.

Automatic Geocoding and Hierarchies

A geocoding hierarchy is a collection of ordered geocoding tables that can give you the opportunity to drill down to a more detailed level when zooming in on the data. The hierarchy should contain all geocoding tables that the layer should be allowed to choose from when applying geocoding, and it should preferably be a geographic hierarchy with different level of detail, such as:

When selecting the best suited geocoding table, Spotfire checks the expression on the Geocode by/Marker by-axis and chooses the geocoding table to which the geocoding primary key columns can be matched using column matching. If only State is used on the axis, the US States table would be selected, but if both State and County are used on the axis, then the US Counties table is selected.

Once Spotfire has chosen a geocoding table, the visualization downloads and joins in that table in the map chart based on the found column matches.

For the cases where the column names in the data table do not match any of the columns in the available geocoding tables, you can try using the Auto-match button to match on the content of the column rather than on the column name.

Manual Geocoding

When you are manually setting up geocoding you need to consider which columns in your data can be used to identify the location of the data. For example, this could be a State column or a State/County hierarchy. Note that the level at which you select to display your data is the one that should be used for geocoding, since the Marker by axis and the Geocoding by axis are the same in marker layers. Hence, if you want to show data for different states you must geocode by state and not by counties.

You can specify the geocoding type and representation for a selected column in your analysis using the pop-up menu in the Data panel or in Column Properties.

Geocoding Hierarchies in the Library

A set of default geocoding hierarchies are shipped with TIBCO Spotfire Server as a zip archive which a library administrator can import into the library, as described under Importing to Library. Each hierarchy consists of a number of geocoding tables. Once imported, the geocoding hierarchies are normally located in the GeoAnalytics folder in the library. Since most of these geocoding tables contain geographic shapes they can also be used as feature layers in your map chart. The geocoding hierarchies located in the library will appear in the list when you click Add in the Marker Layer Settings – Positioning dialog and the Feature Layer Settings – Geocoding dialog.

You can also add your own geocoding tables to the library by following the instructions in Setting Up New Geocoding Tables.

Note: If you are using TIBCO Spotfire Desktop these geocoding tables are saved locally. For details, see below.

Locally Stored Geocoding Tables

It is possible to add locally stored geocoding tables to an analysis, if, for example, you do not have access to the library. To add a locally stored geocoding table follow these steps:

  1. Open the properties page for the map chart.

  2. Click Layers.

  3. Select the marker or feature layer you want to use the geocoding for and click Settings.

  4. Click Positioning in the Marker Layer Settings or Geocoding in the Feature Layer Settings.

  5. For the Marker Layer, select Geocoding.

  6. Select the column you want to geocode by.

  7. Click Add > Add Data Tables... next to the Geocoding hierarchy list.

  8. Click Add > File... in the Add Data Tables dialog.

  9. Browse to the geocoding table, click Open and then OK.
    Note: If you are using TIBCO Spotfire Desktop, the default geocoding tables are located in the folder
    C:\Users\<your user>\AppData\Local\TIBCO\Spotfire Desktop\<version number>\Example Data\Geocoding Data\

Geocoding Data Table Properties

Similar to in previous versions of TIBCO Spotfire the loading of a Shape file automatically sets the required properties both on the data table and on the columns in the resulting data table. This means that Shape files can always be used for geocoding both marker and feature layers, provided they contain some identification column (such as State name or similar). It is worth noting that a single SHP file (without a DBF file) never contains such identification information since all column information is located in the corresponding DBF file (except for the geometry column and the numeric columns that are calculated at import, such as XMin, YMax etc.).

There are a number of data table properties that are required for geocoding tables:

Geocoding Column Properties

There are also a number of column properties that should be set on the columns in a geocoding table:

The "geocoding" keyword is automatically added when Exporting Data to Library. This makes it possible to quickly show only geocoding tables by setting the search expression to "keywords:geocoding".

Preferences

A Spotfire Administrator can disable auto-loading of geocoding tables completely for a group of users by setting the AutoloadGeocodingTables preference to False. This may be desired if the group is on a slow connection or if the system repeatedly makes unwanted geocoding matchings.

See also:

Marker Layer Settings – Positioning

Feature Layer Settings – Geocoding

What is a Map Chart?

How to Use the Map Chart