Public transport profile in direction

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.

The ORS backend software has experimental support for public transport. However, this profile is not deployed on the public service. If you like to use this experimental profile, you need to run the ORS yourself.

Thanks very much @sascha I am beginner in the area. Could you please give me some directions about how could I run it myself?

Sure. Sorry, I forgot to put the link in my previous post.

1 Like

Thanks very much!

Hi,

I have been trying to run Docker. But not successful with public transport yet. And the car profile is still working on localhost after running docker. I have a question.

  1. Does “experimental support for public transport” mean not fully functional yet?