Geovisualization Developer's Guide

Geocode

The geocode request body is a JSON object sent in the body in a Geovisualization REST API request to specify the columns in the dataset to convert to geocoordinates. Note that you can run only one geocoding job per dataset at a time.

Table 1. Geocode Request Elements
Element Data Type Mandatory Description
input_columns Array Yes List of columns to use for geocoding; for example country, city, or state. Note that the order is important: ["street", "city", "country"] will produce different results from ["country", "street", "city"].
lat_column String Yes Name of the latitude column where latitude values are written, for example "lat"
lon_column String Yes Name of the longitude column where longitude values are written, for example "lon"
input_constants String No List of strings to be appended to the input columns, for example "Berlin"
overwrite String No If a previous geocoding job already created lat_column and lon_column, setting this element to true will overwrite the values in those columns

The code example below shows the data structure sent in a request to create a geocode job.

{
  "input_columns": ["country"],
  "lat_column": "lat",
  "lon_column": "lon",
}