Process for looking up the times for walking and bus:
Get start and stop locations from get request which are stop tags
Convert those to stop titles
Find the routes that service both stop titles
Get the corresponding stop titles from the stop tags for the route chosen
Call the NextBus API with the stop tags
Call own API with the stop tags
This is necessary because routes use different stop tags for the same stop location.
So to help look things up fast, I use lots of dicts, but I can't figure out a good way to name them. Examples:
# key: stop tag, value: stop title
stop_key_tag_value_title = dict()
# key: (route,stop title), value: stop tag
stop_key_route_and_title_value_tag = dict()
So, the following is how the lookups occur:
This is necessary because routes use different stop tags for the same stop location.
So to help look things up fast, I use lots of dicts, but I can't figure out a good way to name them. Examples:
Can anyone think of anything better?