Creating "distance from store"
Lilja
Registered Posts: 5 ✭✭✭✭
Hi Team,
I working for a client which has multiple stores around the country. My client offers a loyalty program. I have the home address for all loyalty members, and of course the street address of all stores. I would like measure the distance from each clients address to the nearest store. What is the best way to do that in DataIku? Is there a particular plugin I need to install?
Many thanks,
Lilja
I working for a client which has multiple stores around the country. My client offers a loyalty program. I have the home address for all loyalty members, and of course the street address of all stores. I would like measure the distance from each clients address to the nearest store. What is the best way to do that in DataIku? Is there a particular plugin I need to install?
Many thanks,
Lilja
Tagged:
Answers
-
Hi Lilja,
There is a geo-join processor (https://doc.dataiku.com/dss/latest/preparation/processors/geo-join.html) in the Prepare recipe that should do it. You would create the Prepare recipe on the customer data, and then join the store data to it with the geo-join processor.
Best,
Alex -
Hi Lilja,
You can use the geocoding plugin on both datasets: https://www.dataiku.com/dss/plugins/info/geocoder.html. That will give you one new GEOPOINT column for each of the 2 datasets (stores and clients). You can decompose these GEOPOINTs in latitude and longitude.
Then you can use the "Geo-join" processor of a visual Prepare recipe to compute the "distance from store" column.
Cheers,
Alex -
Hi Alex,
I signed up for an API key from Bing (Azure Maps Account). However, I get this error message when I try to use the geocoding plugin.
Error while running a script step
Bing API error: 401: Unauthorized: {"authenticationResultCode":"InvalidCredentials","brandLogoUri":"http:\/\/spatial.virtualearth.net\/Branding\/logo_powered_by.png","copyright":"Copyright © 2018 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.","errorDetails":["Access was denied. You may have entered your credentials incorrectly, or you might not have access to the requested resource or operation."],"resourceSets":[],"statusCode":401,"statusDescription":"Unauthorized","traceId":"c18416f318ac4b20b1e450bd14bc2df8|DU00000139|7.7.0.0"}
Do you know what might be causing this error?
Thanks,
Lilja -
Hi, The Bing geocoder is working fine on my side. Have you installed the latest version of the geocoder plugin (1.0.9)? Have you followed the instructions on https://www.bingmapsportal.com/ to get an API key?
-
Hi, I have the geocoder plugin (1.0.7). Should it not work on that version?
I tried the link you shared (https://www.bingmapsportal.com/) and I'm having creating a Bing Maps API for Enterprise because it does not allow me to "Review Legal Terms".
Then I created an API key from MapQuest and tried it in DSS. Then I got a different error:
Error while running a script step
NullPointerException
Additional technical details: HTTP code: 400, Code: STEP_RUN_EXCEPTION, type: ApplicativeException -
Could you retry with the newest version of the plugin (1.0.9) please?