Apartment Search Exercise

Screen Shot 2021-06-14 at 3.13.15 PM-1

I originally opened a ticket here Issues · GIScience/openrouteservice-examples · GitHub

When I run the code the first code cell runs no problem.

The list generates this error (in the second code cell)

list indices must be integers or slices, not str

I don’t see how the error is being generated since all seems sorted.

Hey,
yes, this hasn’t been updated properly.
Print yourself the response you get from clnt.places and that should get clearer.

I think you have to insert a [0] between the places()-call and the ['features']
Best regards

I am relieved but somewhat annoyed I didn’t catch that because I was suspicious…

Thank you,

Bonny

The ValueError: min() arg is an empty sequence is rendered in response to

Quickest route to all POIs

. It stops after the first apartment so something must be amiss in the iteration!?

Hey,

Have a look at the results from when that example was created (they are on our homepage).
You’ll see that the second apartment (the one in the middle to the west) only has one supermarket, and if you zoom in its on Judah Street between 44th Av. and 45th Av.

If you compare your results (actually, if I compare mine that have run just now), you’ll see that your isochrone actually ends before that - somewhere on 43rd Av. between Judah Street and Kirkham Street.

The POI-search therefore doesn’t find this supermarket, which should be reflected in the output of POIs around apartments - the second apartment should list 0 supermarkets.

It doesn’t add any duration for routing to that supermarket, and cat['durations'] is an empty sequence for the supermarket category and the second example.

Best regards