DETOUR
A route-first shopping planner that finds marketplaces worth the detour
Enter a road trip and it finds every marketplace in a corridor around the route, ranked by the minutes each stop costs you.
DETOUR returns fewer stops rather than inventing one to fill a gap — if a segment comes up empty after its rescue pass, it stays empty rather than forcing a marketplace that isn't really there.
Beacon, NY to Southport Island, ME — hunting for a vintage tube amp.
The real DETOUR interface on the reference route: corridor, numbered stops on the map, and under every stop the Probes — Craigslist, Facebook Marketplace, OfferUp and eBay local-pickup searches already scoped to that town, that radius, and whatever you typed. Tap one at a rest stop and you're looking at listings, not typing into a phone at 70 mph.
This is DETOUR's reference route: … to …, 4,353 GPS
points, about … of driving. The candidate towns were found by the tool's own
detect_corridor() — project the route to an equal-area CRS, densify it, and take the
perpendicular distance from every Craigslist market to the line. That geometry ran in Python, because
reimplementing an Albers projection in JavaScript would be exactly the kind of lookalike this site keeps
promising it isn't building.
What runs here is the part you actually turn: cheapest
and spread from corridor/detour.py, ported honestly — including the bit where
spread trims 30 minutes off the start and 45 off the end, divides what's left into equal
segments, and makes one rescue pass at 50% wider before giving up. Segments that are genuinely empty
stay empty; the tool degrades honestly rather than padding the list.
Which exits are worth taking?
This is the actual output of the engine on the reference route — 11 marketplace regions found inside a 25-mile corridor over a 7.2-hour drive. Flip between the two selection strategies and watch the stops redistribute. That difference is the whole product.
What you’re watching: in Cheapest mode the greedy pick clusters Hudson Valley, Hartford and the early stops into the first few hours — you’d shop one region and burn the budget before New Hampshire. Spread cuts the drive into equal time segments and takes the best stop in each, so the finds are distributed — and it honestly leaves segment 1 empty rather than forcing a stop that isn’t there.
Every state you drive through is a market you’ll never otherwise see.
Driving Beacon → coastal Maine means six and a half hours through Connecticut, Massachusetts and New Hampshire — each with Craigslist regions and old New England housestock that turns over inventory I can’t get at home. I wanted to know, before leaving: which exits are worth taking, what each costs me in time, and to have the searches already built so I’m not typing at 70 mph.
The hard rule I set, and the whole reason the engineering is interesting: DETOUR scrapes nothing. Not Craigslist, not Facebook Marketplace, not OfferUp — ever, in any milestone. The value isn’t re-hosting listings; it’s the routing math that tells you where to stop.
Corridor geometry, done right.
Real numbers, from the tested path.
The corridor detection has a golden-file test on this exact route: it asserts Hartford, Worcester, Boston and the NH/Maine regions appear in the right order, that Maine resolves to subareas including Portland, that nothing exceeds the buffer, and that spread and cheapest produce different sets. The geo core is finished and green.
A deliberately scoped wedge — and what’s deferred.
DETOUR is milestones 1–2 of a documented six-milestone spec: the geo core and the probe builders, shipped and tested. It was carved out of a larger platform (QUARRY) specifically so it could ship in a weekend and stand alone.
⚠ Documented, not abandoned
- Persistence + the exact-detour refinement (one re-route on selection) are milestone 3.
- The React/MapLibre UI was milestone 4 — it’s now running; the screens at the top of this page are the app itself.
- Live estate-sale listings come from porting QUARRY’s scraper behind the adapter seam — milestone 5.
This is the one project where the “unfinished” parts are a numbered plan, not a stall — scope discipline with a paper trail.
Project Elements
Have a Project in Mind?
Animation direction, VFX and creative technology. Message me on LinkedIn or get in touch.