Add a geographical data setting
Certain attribute columns that contain location data can be used to create Geo maps. ThoughtSpot supports Latitude, Longitude, Zip Code, US States, US Counties, Countries, and select international sub-nation regions.
You can designate a column as Geo
by editing the GEO CONFIG column in the table Columns page.
You cannot edit the geo configuration column information in the model.xls
file.
Guidelines for geographic columns
Columns that can be designated as Geo
columns need to contain text (VARCHAR
) data unless they contain latitude/longitude data.
Latitude and longitude columns can contain numeric data (DOUBLE
) or text.
If you import geo
columns as numeric values, the data type defaults to INT64
.
ThoughtSpot recommends that you import geo
columns, such as zip codes as text values.
The column type
defaults to measure
when you import numeric values.
In ThoughtSpot, a measure
is a numeric value that you can use in mathematical formulas.
For geo data, you must change the column type
to attribute
and specify additive
as no
.
If you are using a column with the data type DOUBLE
for latitude and longitude, change the following settings for those columns:
-
set Column Type to
ATTRIBUTE
-
set Additive to
NO
-
set Aggregation Type to
NONE
For information on these settings, see Set ADDITIVE or AGGREGATION.
As a best practice, you should make the following changes to your geographical data before importing it to ThoughtSpot:
-
Specify
geo
columns as text values, and not numeric. -
Make sure your data is specific, and does not contain duplicates.
For example, you may be collecting data for locations in Washington County, Alabama, and also for locations in Washington County, Wisconsin. According to the 2010 Census, there are 31 distinct Washington Counties in the United States. To account for multiple different geographical entities with the same name, you must be specific within your data. A value of Washington County without a state attached to it may result in incorrect or incomplete geo maps.
Auto select
As of 9.4.0.cl, ThoughtSpot classifies the Geo config column as Auto select, which automatically detects the type of geo data in the column and classifies it. In Worksheets with geographical data classified as Auto select, we support the following features:
-
Geomap data for all countries. For a full list, see Openstreetmap supported countries.
-
Multiple levels of subdivisions within a country, rather than just city and zip code.
-
Visualizations comparing subdivisions of multiple countries in a single visualization. For example, if a selected column contains data from cities in the United States and Mexico, all data would be displayed on a single visualization.
How to manually edit geographic columns
You can also designate the column as a geographical data type when you edit the system-wide data model.
To manually set the geographical data type, follow these steps:
-
Find the GEO CONFIG for the column that contains the geographical data.
-
Select the GEO CONFIG for the column. The Specify Geographic Configuration dialog box appears.
-
Select the correct geographic configuration, depending on the kind of geo data the column contains. If you would like to use a custom map to visualize the data, select Custom map, and select the correct map from the dropdown that appears.
If your data includes latitude and/or longitude columns that are stored as a numeric data type (
DOUBLE
), make these changes for those columns:-
Change the Type to
ATTRIBUTE
. -
Change ADDITIVE to
NO
/FALSE
.
-
-
Save your changes.
Supported geo maps
For a complete list of supported geo maps in ThoughtSpot, refer to Geo map reference.
To learn how to upload your own geo maps with custom regions, refer to Upload custom geo maps.
Related information