Hi,
I am interested in studying the efficiency of the public transport. I need to know how much duration does public transport takes for given day and time. The following code does give the duration for car,
import os
import openrouteservice
load_dotenv() # Load variables from .env
client = openrouteservice.Client(key=os.getenv("ORS_API_KEY"))
# Coordinates as (longitude, latitude)
coords = ((2.3522, 48.8566), (2.1204, 48.8014))
route = client.directions(coords, profile='driving-car')
# route = client.directions(coords, profile='public-transport')
duration = route['routes'][0]['summary']['duration'] / 60 # in minutes
print(f"Travel time: {duration:.1f} minutes")
However, I would like to know if route = client.directions(coords, profile='public-transport')
sort of function exist or not. I did try this command and it does not work.
Thanks very much.