allow caching routing by destination and travel mode; also export all travel methods to csv column

This commit is contained in:
Viktor Barzin 2025-05-20 21:58:08 +00:00
parent f2118c9bc4
commit 10ae25e0d3
No known key found for this signature in database
GPG key ID: 4056458DBDBF8863
5 changed files with 190 additions and 84 deletions

View file

@ -1,14 +1,15 @@
import asyncio
from pathlib import Path
from data_access import Listing
import pandas as pd
def export_to_csv(
async def export_to_csv(
listings: list[Listing],
output_file: Path,
columns: list[str],
) -> None:
ds = [listing.dict_nicely() for listing in listings]
ds = await asyncio.gather(*[listing.dict_nicely() for listing in listings])
df = pd.DataFrame(ds)
# read decisions on file
decisions_path = 'data/decisions.json'