13 lines
441 B
Python
13 lines
441 B
Python
from data_access import Listing
|
|
from tqdm import tqdm
|
|
|
|
listings = Listing.get_all_listings()
|
|
BROCK_STREET_LAT_LONG = 51.52570434674584, -0.13956495005056113
|
|
|
|
for listing in tqdm(listings):
|
|
lat, long = BROCK_STREET_LAT_LONG
|
|
listing.calculate_route(lat, long, recalculate=False)
|
|
traveltime = listing.travel_time[0]
|
|
duration_minutes = traveltime['duration'] / 60.
|
|
|
|
tqdm.write(f"{listing.identifier} {duration_minutes}")
|