python code to create routes and calculate distance