find driving distance using bing and osrm api
%%time
#example
testData = '''
lat1 : 13.732048
lon1 : 100.567623
lat2 : 13.856271
lon2 : 100.546467
'''
i = yaml.load(testData, Loader=yaml.FullLoader)
f'the distance is {getDistanceOsrm(**i)} m'
from nicHelper.secrets import getSecret
testData = '''
origin:
!!python/tuple
- 13.732048
- 100.567623
destinations:
- !!python/tuple
- 13.856271
- 100.546467
- !!python/tuple
- 13.856444
- 100.549487
- !!python/tuple
- 13.857444
- 100.549487
'''
i = yaml.load(testData, Loader = yaml.FullLoader)
apikey = getSecret( name = 'webApiKeys')['bing']
results = getDistBing( **i, bingApiKey = apikey )
results
# print(f'distances are {dist}, time taken are {timetaken}')