How to use this
- Pick the school you walk to.
- Type the address or cross streets you start from, or
click anywhere on the map.
- Compare the three routes it offers and pick one.
The walk
Two cross streets, like Hauser & Venice, are
found on this device and work offline. Full addresses are looked up
through OpenStreetMap. You can also click the map to drop a pin.
Time of day
Morning5am to 10am
Afternoon10am to 5pm
Evening5pm to 5am
Getting there
On footthe whole way
Bus or railwalk to a stop
Riding covers distance without putting
you on the street, so a bus trip usually carries less exposure even
when it takes longer.
Three options
Exposure is the average risk of the blocks you walk,
scored from 0 to 100 against every block in Los Angeles at that
hour. Lower is calmer.
Same route, different hour
Keep this route
A link opens this exact trip on any phone. The card
is for a student without one: the streets, in order, on a single
sheet.
Open it somewhere else
School report
A single route only tells one student what to do.
This scores every direction a student might approach a school
from, which is the version a principal or a council member can
act on.
Put this on your school's website
Paste this where a page accepts HTML. It opens the
planner with your school already chosen, so a student only has to
type where they start.
It also works as a plain link, for a newsletter or a
text to families.
The problem
Those robberies repeat in specific places, and every one of those
places is already in the public record. What no map app does is
route around them.
The federal Safe Routes to School program dates to 1971 and deals
almost entirely with cars: crosswalks, speed bumps, crossing
guards. Ask a student in Los Angeles what worries them on the walk
home and traffic is rarely the answer.
What we measured
Splitting incidents by time of day only means something once you
divide by how long each window lasts. Evening covers 12 hours and
would look worst just for being longest. Per hour:
| Window | Incidents | Per hour |
| Morning, 5am to 10am | 10,261 | 2,052 |
| Afternoon, 10am to 5pm | 29,721 | 4,246 |
| Evening, 5pm to 5am | 45,652 | 3,804 |
The afternoon walk home is the worst hour of a student's day, worse
hour for hour than after dark. That is the same 2pm to 6pm window
the robbery figure points at. We were not looking for it.
Where the data comes from
What we threw away
The raw LAPD file holds roughly a million records. We keep only
offences that threaten someone walking down a street: robbery,
assault, criminal threats, brandishing a weapon. A stolen catalytic
converter says nothing about whether a child is safe on that block.
A second filter keeps only incidents that happened in public space,
meaning street, sidewalk, alley, bus stop, park, underpass. That
one drops about 81,000 records that happened
indoors. Domestic violence is serious and it is also not a hazard
of walking past a building, so counting it would have marked
ordinary residential blocks as dangerous to walk through.
How a block gets scored
Every surviving incident is weighted by how severe it was, how
recently it happened (exponential decay on a 2.5 year half life),
and whether the victim was a child. Crimes against
children count triple, because a crime against a
13 year old tells you more about the risk to a 13 year old than a
crime against an adult does.
Incidents then spread out as Gaussian kernels with a 120 m
bandwidth. We picked 120 m to match how coarsely LAPD records
locations, not to suggest we know more precisely than that. Each
block is sampled every 25 m and scored, then ranked against every
other block, so 90 means the block is worse than 90% of Los
Angeles at that hour.
Streetlights earn a block up to 35% off its score, capped so a
well lit block in a bad area never comes out looking calm. Wide
arterials take a penalty, footpaths get a small credit.
How the route is chosen
Routing is A*, minimising length × (1 + λ ·
risk1.5). The three options you get are the same
search at three values of λ. The 1.5 exponent tolerates
slightly elevated blocks while avoiding genuinely bad ones firmly.
A linear penalty gives mushy routes that dodge everything a little.
Every edge multiplier is at least 1, so straight line distance
never overestimates what is left to walk. The heuristic is
admissible and the route is provably the cheapest one, not an
approximation. validate.py checks this against
Dijkstra on random pairs and the costs come out identical.
Riding a bus is scored differently: minutes on board are minutes
off the street, so they carry no exposure at all. Waiting does.
A minute at a stop is charged like 80 m of walking on that block,
because standing still on a bad corner is not a safe place to be.
All of it runs in this browser. The scored graph is built offline
and shipped as a 5 MB binary, so there is no server behind this
page and no cost to running it. Once the page has loaded, it keeps
working without a connection.
Development goals
11
Sustainable cities and communities
Target 11.2 asks for safe transport with attention to
children. Target 11.7 asks for safe public space.
4
Quality education
Target 4.a asks for safe learning environments. A commute a
child is scared to make keeps them out of school.
16
Peace, justice and strong institutions
Target 16.2 asks for an end to violence against children,
here using records those institutions already publish.
10
Reduced inequalities
The students carrying this risk are the ones without a car
or a ride. They are who this routes for.
Where it runs next
One bounding box in config.py is the only Los Angeles
specific thing here. The pipeline needs geocoded incident records,
school locations, and OpenStreetMap, which already covers the
planet. Chicago, New York, Seattle, Denver, Austin, Baltimore,
Toronto and London all publish incident data in a compatible
shape, so pointing this at one of them is configuration rather than
a rewrite.
What this cannot tell you
- Reported crime is not all crime. Reporting
rates vary between neighbourhoods and with immigration status, so
a low score partly reflects who calls the police.
- Locations are approximate. LAPD rounds
coordinates to protect victims, which is why the model smooths
over 120 m.
- The data stops in December 2024, when LAPD
moved to a new records system. It is complete and stable, and it
is not live.
- Scores are relative to Los Angeles. A 20 means
quiet by the standards of this city.
- This is a second opinion about a walk. An
empty street the model likes can still be worse than a busy one
it marks down, and you know things about your own neighbourhood
that a crime table does not record.
About this project
Built by three Los Angeles students. It placed third in the Young
Coders' Sphere Code for Transportation challenge in August 2026,
and has kept growing since: Spanish, bus and rail, a school report,
printable walking cards, and a version that works offline.
The code is open at
github.com/safe-routes-la.