Lots of improvements
Some checks failed
CI / Python (lint + test) (push) Failing after 1m39s
CI / Frontend (lint + typecheck) (push) Failing after 1m49s
CI / Rust (lint + test) (push) Failing after 1m50s
Build and publish Docker image / build-and-push (push) Failing after 3m9s

This commit is contained in:
Andras Schmelczer 2026-04-04 10:45:48 +01:00
parent 3853b5dce7
commit b94cf17d75
33 changed files with 2587 additions and 1866 deletions

View file

@ -50,7 +50,6 @@ _AREA_COLUMNS = [
"Number of restaurants within 2km",
"Number of grocery shops and supermarkets within 2km",
"Number of parks within 2km",
"Train or tube stations within 1km",
"Distance to nearest train or tube station (km)",
"Distance to nearest park (km)",
# Environment
@ -325,7 +324,6 @@ def _build(
"restaurants_2km": "Number of restaurants within 2km",
"groceries_2km": "Number of grocery shops and supermarkets within 2km",
"parks_2km": "Number of parks within 2km",
"train_tube_1km": "Train or tube stations within 1km",
"train_tube_nearest_km": "Distance to nearest train or tube station (km)",
"parks_nearest_km": "Distance to nearest park (km)",
"latest_price": "Last known price",

View file

@ -15,11 +15,6 @@ POI_GROUPS_2KM = {
"groceries": ["Greengrocer", "Supermarket", "Convenience Store"],
}
# Train/tube stations counted at 1km radius
TRAIN_TUBE_GROUP = {
"train_tube": ["Metro or Tram stop", "Rail station"],
}
# Groups for which to compute distance to nearest POI (from filtered POIs)
DISTANCE_GROUPS = {
"train_tube": ["Metro or Tram stop", "Rail station"],
@ -67,11 +62,6 @@ def main():
postcodes, pois, groups=POI_GROUPS_2KM, radius_km=2
)
# Count train/tube stations within 1km
counts_1km = count_pois_per_postcode(
postcodes, pois, groups=TRAIN_TUBE_GROUP, radius_km=1
)
# Distance to nearest train/tube station (from filtered POIs)
distances = min_distance_per_postcode(postcodes, pois, groups=DISTANCE_GROUPS)
@ -86,8 +76,7 @@ def main():
# Join all results on postcode
result = (
counts_2km.join(counts_1km, on="postcode")
.join(distances, on="postcode")
counts_2km.join(distances, on="postcode")
.join(park_counts_2km, on="postcode")
.join(park_distances, on="postcode")
)