Converts location names in a datatable column to +/- latitude & longitude

Much information about geocoding exists in this example data-flo (make a copy to see the internal structure).



data: The datatable containing the column to be converted.

PlaceColumn: The source column containing location names.

longitudeColumn: The target column for the longitude result. Defaults to 'longitude'.

latitudeColumn: The target column for the latitude result. Defaults to 'latitude'.

typeColumn: The name of the column to hold the place type. Defaults to type.


data: A datatable containing the new geocoding columns (latitude, longitude, type)


Possible use cases

  • Preparing epidemiological data for mapping in Microreact.

  • Using before reverse-geocoding to obtain more standardized place names (e.g. when the original data contain US state names like NY, ny, New York, and you want them to be consistent)


Misinterpreting placeColumn

The map Api interprets places the best it can, but some values could represent multiple places:

  • Manchester is a city in England and also a city in New Hampshire, USA

  • 15220 is a postcode for Vitrac France and also for Pittsburgh, PA USA

  • Washington is the name of one US State, one US District, 21 US Cities, and 30 US Counties

In these situations, the map API may seem to select arbitrarily, so it can be beneficial to point the placeColumn argument at a column containing more information (e.g. instead of "15220" value, use "15220, France" or "15220, US"). This can be done using columns-concatenation and either combining multiple columns or adding a prefix/suffix to a single column. If your troubleshooting involves columns-concatenation or other modification before the forward-geocoding step, ensure that your forward-geocoding step points at the correct/new placeColumn before testing.

Last updated