This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
This article is part of the Tool Mastery Series, a compilation of Knowledge Base contributions to introduce diverse working examples for Designer Tools. Here we’ll delve into uses of the Reverse Geocoding Macro on our way to mastering the Alteryx Designer:
Have some Latitude/Longitude points and not much else? Working with Spatial Objects and need more information than a simple map point? Time to call in the Reverse Geocoding macro. Reverse Geocoding can give some robust information to help make important business decisions when working with spatial data. Case in point: Your “friend” has hacked the Pokémon Go APK and hands you a list of Pokémon with the associated Latitude/Longitude. You can’t make an informed decision on your next weekend Poke-session without first understanding more than just the location on a map!
This macro queries the TomTom Reverse Geocoding API to produce a record-for-record reverse geocode result. In addition, a summary output is produced that provides a count of records that were successfully and unsuccessfully reverse geocoded. We have had multiple requests from you all for a reverse geocoder, and while we have some great articles outlining a more manual process (see Approximate Reverse Geocoding Information from Latitude and Longitude Coordinate Pairs and Worldwide Reverse Geocoding in Alteryx?), Alteryx is about making things simpler! We do our best to avoid having “Alteryx” and “manual process” in the same sentence.
This tool requires internet access, as it is querying TomTom's Reverse Geocoding API.
This is a macro that is installed with a separate data install found on the Spatial Data Bundle installation Disk. If you do not see this tool in the Tool Palette and are interested, contact your Customer Support Engineer at firstname.lastname@example.org.
This macro is available for all countries where we provide Spatial Data.
For those of you with strict firewalls or proxy, have your IT department whitelist traffic.tomtom.com to avoid errors such as:
Tool #13: Error transferring data: Failure when receiving data from the peer.
The Reverse Geocoder will error if there are special characters - nulls, \ and ", etc. It's always a good idea to cleanse your data before any kind of manipulation, but it's especially important here - you'd hate to be 80% through an 8 hour workflow, only to error on random special characters!
The User can select either a single Latitude/Longitude field, multiple fields, or a Spatial Object field for input.
The User can decide which output fields to keep and whether to keep incoming fields (listed under Additional Options).
Geocoded Output (G): The record-by-record reverse geocoded results.
Summary Output (S): Provides a count of records successful and unsuccessfully reverse geocoded.
NOTES ON PERFORMANCE
The performance of the tool is also related to network speed; this includes the travel distance and speed of the request to TomTom’s servers, and the amount of traffic on that service. This can also be affected by the processing logic TomTom uses to identify which records to fetch coordinates from, and the response time to/from the “logic layer” and their data store.
You can also cache or store the intermediate results, in case something errors downstream.
According to TomTom, “Most often this is needed in tracking applications where you receive a GPS feed from the device or asset and wish to know what address where the point is located.” As we know that Alteryx users come from many different industries and departments, this is just one of the many uses. Here are a couple ideas to help get you started:
Deconstructing Lat/Lon into Address points for CASS validation prior to shipping to locations
Data investigation of a Spatial file to get information such as Country, ZIP or Municipality
By now, you should have expert-level proficiency with the Reverse Geocoding Macro! If you can think of a use case we left out, feel free to use the comments section below! Consider yourself a Tool Master already? Let us know at email@example.com if you’d like your creative tool uses to be featured in the Tool Mastery Series.
Stay tuned with our latest posts every Tool Tuesday by following Alteryx on Twitter! If you want to master all the Designer tools, consider subscribing for email notifications.