This commit is contained in:
Andras Schmelczer 2026-01-27 22:39:09 +00:00
parent 6b1539a3e7
commit 6f28fa9d2a
3 changed files with 3 additions and 3 deletions

View file

@ -66,7 +66,7 @@ def main():
pl.lit(f"{journey_time[:2]}:{journey_time[2:]}").alias("journey_time"),
)
successful = results_df.filter(pl.col("cycling").is_not_null()).height
successful = results_df.filter(pl.col("cycling_minutes").is_not_null()).height
print(f"Completed: {successful}/{len(results)} successful")
parquet_path = save_results(results_df, destination.name)

View file

@ -8,7 +8,7 @@ DATA_DIR = Path("./data_sources")
OUTPUT_DIR = DATA_DIR / "processed"
MAX_DELAY = 10
REQUESTS_PER_MIN = 50
REQUESTS_PER_MIN = 500
MAX_POSTCODES = 100 # Set to None to process all postcodes
MAX_CONCURRENT = 5

View file

@ -28,7 +28,7 @@ class RateLimiter:
warnings.warn(
f"Rate limit reached ({REQUESTS_PER_MIN}/min), "
f"waiting {wait_time:.1f}s",
stacklevel=2,
stacklevel=1,
)
await asyncio.sleep(wait_time)