allow caching routing by destination and travel mode; also export all travel methods to csv column
This commit is contained in:
parent
f2118c9bc4
commit
10ae25e0d3
5 changed files with 190 additions and 84 deletions
|
|
@ -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'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue