Inspiration
My Grandpa walks every day. It's the thing he does. But every summer he mostly stops, because the sun makes it too much, and he ends up inside for months waiting for it to cool off.
Nothing about that is a routing problem you'd think an app could solve. He knows the way to the store. What he doesn't know is which way is bareable at 3pm, and there's no way to find out except going and finding out the hard way.
The thing is, the information already exists. OpenStreetMap knows where the buildings are and how tall they are. It knows where a lot of the trees are. Physics knows exactly where the shadows will land. Nobody has put those 3 things together and used them to pick a street, because every maps is built around the assumption that what you want is to arrive sooner.
So we built the one that assumes you want to arrive comfortable.
What it does
Give it a start, a destination, and a time. It works out where the sun is, casts a shadow from every building and every tree, measures what fraction of each street segment is in shade at that exact moment, and finds the route that keeps you in it.
Then it tells you the truth about the trade-off:
85% of this walk stays in shade, against 44% on the fastest one. The swap costs 2 min.
44% → 85% · +41 points of shade 15 min → 4 min · −11 min in direct sun 1.75 km → 1.90 km · +148 m walked
That's a real route, a bus stop to a pharmacy in inner Portland at 3pm. Two minutes and 148 metres buys you eleven fewer minutes in direct sun.
Turn-by-turn directions in prose, with the shade and the benches noted leg by leg — readable without ever looking at a map.
Benches along the way, with an honest warning when the longest stretch without somewhere to sit exceeds 300 m.
No stairs, priced out of the graph rather than filtered afterwards.
When to leave, the same router run for every hour of the day. Moving your departure moves the number further than any detour can; leaving at 7am instead of 2pm was worth 13 fewer minutes in the sun on our demo walk.
A shade slider from 0 to 3. At 0 it returns the plain shortest path, exactly — the check that keeps the comparison honest.
Show shadows draws the computed shadow field straight onto the map, so you can see the model rather than take our word for it.
How we built it
Sun position from pvlib, for a real lat/lon and a timezone-aware datetime. If the sun is below the horizon it says so rather than emitting garbage geometry. I used Claude to help me with the building process as well.
Challenges we ran into
Measuring instead of looking. Rounds went into tuning CSS values and asserting the result matched the design. Loading the page in a real browser and looking at a screenshot found in one step what all that measurement had missed, including a fitBounds call still insetting by a control panel's viewport position from a layout that no longer existed, which had quietly zoomed the map out to the whole metro.
Another one was that it was extremely slow the problem was that it downloads the street graph then places, then benches sequentially from Overpass, and it made you wait for all 3.
Accomplishments that we're proud of
Every number on screen can be traced. The headline is decomposed in the UI into modelled building-and-tree geometry versus park area that is assumed fully shaded, because only the first is geometry we computed. No temperature difference is claimed anywhere: shade cuts radiant heat, not air temperature, and we weren't going to display a number we couldn't defend.
At first it was only for Portland now its expanded to the world. A tool that only works in one 2 km box can't tell you where your own shaded streets are. Now it can.
What we learned
How much of a city's comfort is just trees. Watching the shadow field redraw hour by hour, the pattern is unmistakable: the streets that stay walkable in the afternoon are the ones somebody planted decades ago. That's not a conclusion we set out to find.
Progressive disclosure isn't a nicety for a 71-year-old. The first version opened on a hero, a 14-hour chart, a map and 17 directions at once. That's a readout, not a product. It now asks one question with two buttons.
What's next for Shade Route
Terrain and aspect. The model assumes flat ground; Portland is not flat, and a north-facing slope is shaded in ways our geometry can't see.
A deciduous maple in February casts almost nothing. Right now we treat August and January identically, which matters, because it's exactly the trees doing the work. So I'd have to fix that as well.
Shaded transit stops. Eight minutes waiting in full sun at an unshaded stop can undo a shaded walk entirely.
Built With
- css
- fastapi
- html
- javascript
- python
- systemd
Log in or sign up for Devpost to join the conversation.