Skip to content

Use Google walking directions for walking-distance schools - #6

Merged
roxburghm merged 3 commits into
mainfrom
google-walking
Nov 13, 2026
Merged

roxburghm merged 3 commits into
mainfrom
google-walking

Conversation

@roxburghm

Copy link
Copy Markdown
Owner

Summary

Drayton Manor gives places by walking distance. Until now the app compared that walking cut-off with your straight-line distance, which is always shorter, so homes looked closer than they really are on the charts and in the verdicts.

When an address is set, the page now asks Google Maps for the walking route from home to each walking-distance school, and uses that exact distance everywhere:

  • Ranked list: "1.23 mi walk" instead of the straight-line figure, and the verdict counts years against the walk.
  • School panel: "In 2026 your 1.2 mi walk was 740 yds inside the 1.6 mi walking cut-off."
  • Charts: the "You" line sits at the walking distance.

Details

  • One request per address, covering all walking-distance schools, using the existing Maps key. Tested: the key already has access to the Distance Matrix service.
  • Near misses (within about 50 m) still read "too close to call", since Google's route won't match the council's exactly.
  • Map unchanged: the walking areas still come from the hand-drawn intakePath outlines, or GraphHopper once it's run.
  • If Google can't return a route: the app falls back to the previous behaviour (straight line as a lower bound, plus the outlines).
  • Privacy wording: the About page now says Google sees the chosen location, and where walking distances come from. The README is updated to match.

Test plan

  • yarn build

  • Three test homes for Drayton Manor:

    Test home Walk Verdict Years inside
    Near 0.20 mi Very likely 8 of 8
    Mid 1.23 mi Possible 6 of 8
    Southall 1.92 mi Outside 0 of 8
  • One Distance Matrix request per distinct address; revisiting an address reuses the stored answer.

🤖 Generated with Claude Code

Until now a walking-distance school (Drayton Manor) compared the walking
cut-off with your straight-line distance, which is always shorter, so homes
looked closer than they are.

When an address is set the page asks Google's Distance Matrix (walking) for
the route from home to each walking-distance school, once per address, and
uses that exact distance for the verdicts, charts and wording. Near misses
still read "too close to call". The map's walking areas are unchanged. The
About page and README say where walking distances come from, and that Google
sees the chosen location.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-forest-0ca6e1603-6.westeurope.3.azurestaticapps.net

…final

- Every school's details carry an "Estimates only" note under the year line:
  figures come from past offers and our own distance measurements, and
  Ealing Council's admissions decisions are final
- Same message in the list's small print and the About page
- Narrow cut-off charts label only the chosen year so labels don't collide

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-forest-0ca6e1603-6.westeurope.3.azurestaticapps.net

Same facts (how to read the mini charts, where figures come from, that
they're estimates and the council decides), without the stacked warnings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@roxburghm
roxburghm merged commit eddbbb8 into main Nov 13, 2026
2 checks passed
@github-actions

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-forest-0ca6e1603-6.westeurope.3.azurestaticapps.net

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant