Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Do you have a sample workflow using Open Route Service API to share?

jovia
7 - Meteor

Hi, 

 

I am looking for a free service to geocode address to longitudes and latitudes. It seems Google geocode API has no free tier any more. I signed up for the Open Route Service today. If you have a geocode address workflow using this service to share with me, that will be greatly appreciated! 

 

Thank you,

Jovia

4 REPLIES 4
DavidThorpe
Alteryx
Alteryx

Hi @jovia 

 

Take a look at the article below by The Data School, which uses the OpenRouteService API:

https://www.thedataschool.co.uk/jack-parry/geocoding-basic-address-lines-using-the-open-route-servic...

 

A macro version of this workflow is available on our public gallery:

https://gallery.alteryx.com/#!app/Geocode-Addresses/5c1963f08a93370dc8e4de35

 

Thanks,

 

David

jovia
7 - Meteor

Hi @DavidThorpe ,

 

Thank you for your information. I am working on US addresses. I downloaded the geocode address macro. Do you happen to know what are the equivalent US information to 'Neighborhood' and 'Region'. Which field is equivalent to the States in US? I tried leaving the neighborhood and region fields blank. I got parse error: type mismatch in operator. 

 

jovia_0-1617984761320.png

jovia_1-1617985264719.png

jovia_2-1617985300008.png

 

Should I delete the neighbourhood and region parameters if I am leaving them blank? Then I need to modify the URL too.

Do you happen to know what is the URL for US addresses? Where to put in the state info in the URL? 

 

jovia_3-1617985741475.png

 

Thank you !

DavidThorpe
Alteryx
Alteryx

Hi @jovia 

 

If you take a look at the API documentation:

https://openrouteservice.org/dev/#/api-docs/geocode/search/get

 

You can see the requests are structured with a series of optional values (country code, neighbourhood etc.) you can search with, or you can simply search with open text.

 

I have created the following simple workflow which will allow you to enter your own key into the API Key Text Input, and your own free-form addresses (I have used our London office location 186 City Road, London, EC1V2NT) to return JSON which can then be filtered and parsed for the items you need (lat and long values)

 

DavidThorpe_2-1618398134459.pngDavidThorpe_1-1618397729893.png

DavidThorpe_3-1618398153679.png

Simply filter/parse/transform for Contains([JSON_Name],"coordinates"), or other such detail you require.

 

You can add more search parameters (for instance my search returned several results, so I may wish to search by country code as an additional field, or add the country to the address string for parsing) by using the online interactive documentation, which is pretty neat, then adding them in as fields in the top Text Input tool and adding them into the replace funtion in the Formula.

 

Give it a go with your own key and data, let me know how you get on!

 

David

jovia
7 - Meteor

Hi @DavidThorpe , 

 

I am making progress. I added in steps from the Geocode Address macro to the workflow you shared with me. It seems working (attached). I want to know if one of the optional fields has null value, how to handle the nulls in the formula step for the URL? 

 

In general, should I pick the highest confidence value per address?

 

Thank you so much !!

 

Jovia

Labels