Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Find the safest well lit walking route between two locations (github.com/mfbx9da4)
222 points by mfbx9da4 on Dec 21, 2020 | hide | past | favorite | 110 comments



Out of several thousand hours (close to 10K?) of late-night walking in urban areas (such as from working into the wee hours, then walking home all the way across town), I've been held up at gunpoint twice, discouraged or thwarted countless other approaches by muggers, and several times had bottles thrown at me.

Two of the locations that were memorably the most dangerous-seeming were some of the best-lit, and they weren't lit because they were high-crime.

Some other factors to consider in what's safe and/or feels safe:

* The presence of houses on the sidewalk (with people in them who might hear you, and doors you could go bang on), even if the street is dark except for the occasional porch light or glow through the drapes.

* Presence of open businesses (restaurants, hotels, cafes, hospitals, donut shops), which are pretty obviously places you can run into, where there will be other people.

* On the other side of open businesses being good... people outside of nightlife businesses can be risky, and sometimes feel risky. (Usually innocuous here, but walk enough, and you'll eventually encounter drunk people looking to fight, and also see people looking to prey upon someone from the concentration of candidates out late at night. And you'll read news reports of criminal score-settling with gunshots, outside some of the bars/clubs you walk past every night.)

* Office buildings with visible security guard desk in the lobby. In practice, I think they could only phone the police while you're getting stabbed against their glass wall, but the witness will discourage some attackers, and it seemed much more reassuring than an empty skyscraper lobby on a completely deserted downtown street.

* Possibly: Unlocked lobby/vestibule front doors of apartment buildings, which aren't obviously reassuring like an open business with people inside, but (if you paired this info with tips) can be used by walkers to thwart attackers.

* Street crime data.

(I should add that I'm white and male, and I know other groups of people face additional threats on the street, but I don't know how my experience applies to that.)


Excellent points, I’d add the counterintuitive:

* Pedestrian traffic - busier streets with more people mean less likely to be mugged vs the empty side street.


It's counterintuitive for a reason, and to be honest I have bad (not necessarily direct) experiences in both cases, and can't conclude which one is the best. Does a busier street really mean less likely to be mugged? Why?


Correction: I think it was 3K to 5K hours. I miscalculated from when I stopped late-night walking much.


Question: I solve quests in StreetComplete [1], and one of the things it asks me is whether a stretch of way is lit. Sometimes, these stretches can be very short (like 1m), e.g. at intersections. I typically only mark those as lit if there's a streetlamp directly on it - so if there's not, I'll mark it as unlit even though nearby streetlamps do shine on it.

Is that the right thing to do?

[1] https://github.com/westnordost/StreetComplete


If the question asks "is it lit" I'd respond based on if it was normally lit in some way at night or not. Where streetlamps are is a separate question that can only imply if a section is normally lit or not.


I think the right interpretation of the question is whether there is lighting in the area rather than whether there is lighting immediately adjacent.

I guess there's still some subjectivity in that interpretation. But given that lights can be directly mapped, I think capturing whether there is lighting on the segment is a sensible way to do the quest.

If you want, I can help you find the ones you already marked, just send me an email.


That'd be great! Sent you an email.


Held up at gunpoint twice! America is so weird. So many friends of mine in the US have been held up.


I’m Australian and have never even heard of someone I know being robbed in person ever, let alone with a weapon.

Is this actually a common occurrence in America? How do people put up with this?


No. Not at all. I don't exactly live somewhere good and I don't know anyone who's been held up.

Like a lot of things on HN, it might be a SV thing that I'm simply unaware of.


I’m not in SV (Midwest -> NYC) so I can’t verify based on my experience, but this is a really interesting theory.

VC Twitter likes suggesting that SF has practically surrendered to criminality and that the city is among the world’s worst-governed. I had suspected that this might be a pretty one-sided view of things, but perhaps it’s really true and SF (& SV if we consider it to include SF) truly are that dangerous.


A friend of mine got stabbed a few years ago while walking home in Redfern (he survived and is okay now with no lasting injuries, but was in hospital for a while). It does happen here too.


> How do people put up with this?

One common strategy is to not carry anything of obvious value, don’t wear jewelry or watches or fancy clothes, don’t walk with your cell phone out. Basically don’t look like an easy target.


There is a pretty detailed wiki if you want to work deeper with openstreetmap. It often has examples of how to tag different features. The entry for Lit [1] does not quite say it but it references the street_lamp [2] entry. There it mentions street_lamp should be on a point of the location of the light source and to tag Lit on the surface that is iluminated. So I have been doing Lit on all roads that is lit up by the street lights.

[1] https://wiki.openstreetmap.org/wiki/Key:lit

[2] https://wiki.openstreetmap.org/wiki/Tag:highway%3Dstreet_lam...


Thanks - that means I did this incorrectly :( Hopefully I'll be able to correct it with the help of the author of a sibling comment, and I suppose I'll file an issue against StreetComplete to see if they'd prefer to clarify it.


This is the first time I've seen a .geojson file and I was surprised to see Github actually renders it on a map: https://github.com/mfbx9da4/brightpath-backend/blob/b0f5f1c3...


Oh so cool! Didn't even see that myself on github!


That is a great idea! Often I find walking directions put me on busy, unsafe streets, or make me take unsafe crossings. Didn't even think about the well lit part, but that is important as well. Gl with this!


This could really be a game-changer for me when we're allowed to travel again. I have a rare condition where a problem with brain metabolism screws up the signal to noise ratio in multiple senses, by day I'm quite photophobic and by night I can't see a thing thanks to "TV static" in my vision. Having a navigation tool that sticks to well-lit areas would be an amazing improvement over existing tools for me!


Out of curiosity, what's the name of your condition?

I have a friend where this could apply.


As trishmapow2 correctly guessed, I have visual snow syndrome. Whether it's a quirk of vision or an outright disability really tends to depend on the intensity, for some people it doesn't affect their lives at all but for others it's completely disabling because they can't read any more. Personally I'm quite lucky, I'm never going to drive in the dark or be good at things that require excellent vision but I can still hold down a job as a programmer.


Possibly https://en.wikipedia.org/wiki/Visual_snow. I used to assume everyone had this but since it doesn't really affect day to day life for me it was never a concern.


Oh, huh. I definitely experience all of those, though only the photophobia is really constant. I've also got a photic sneeze reflex, so I had just always chalked those two together as a sensitivity to direct sunlight, and didn't even think to consider the dots or floaters as odd or connected.


Same here, mind a bit blown atm.


Ditto. Additionally, Google Maps makes me try to cross streets that technically shouldn't be crossed by pedestrians.


Google Maps has functionality for reporting problems. I've done the same when it suggested an unsafe bicycle street-crossing and they updated the routing.


It may take a while for such information to make it to the map. https://www.theguardian.com/money/2020/dec/20/google-maps-po...:

“His problem was that the postcode for his east London flat was incorrect on Google Maps, so any driver using the service for navigation ended up not at his address, but in parkland at Three Mills Green, Bromley-by-Bow, half a mile away as the crow flies, but a mile and a half to drive.

What was an easily fixable error resulted in three years of frustration for Borghs, who first noticed the problem when an Uber driver took a wrong turn when taking him home.”


Google sure loves free employees...


As long as I don't have to pay obscene amounts for navigation, especially in the car, I don't mind.


In my Mazda, I only had to buy a $30 SD card from Ebay to make navigation functional


If I were you, I would stop buying random SD cards from the internet and connect to my devices, especially things like my car.


lol, fair point... but they can probably hack it remotely anyways...

Are you also of the opinion that you can't buy used phones?


> Are you also of the opinion that you can't buy used phones?

Depends, if you want a throwaway phone for a call or two that are not important, go ahead.

But if you're looking for a phone you'll keep for multiple years and you want the least possible risk of being tracked by someone else than who made your phone, then I would absolutely not buy a used phone.

Small problem as OK phones can be bought for ~$100 or less in most parts of the world.


You can also contribute this to OpenStreetMap :)


This is cool, however there is an implicit assertion here that better lit = safer. As far as I can tell this is questionable at best, a decent roundup of studies can be found here https://www.washingtonpost.com/news/wonk/wp/2017/11/02/what-...


All the studies mentioned seem to focus on total crimes and not crimes per trip. I wonder if the (lack of) effect they observe is because of increased lighting leading to increased trips which leads to more crimes just because there are more people, cancelling out or negating any increased safety per trip.


More likely that more trips means more lighting. Municipalities don't tend to spend the bucks lighting places with low traffic.


Isaac Asimov did an interesting short article on the full moon and increased crime.

He concludes crime goes up because we have a connection to the full moon rather than the extra lighting.

His article was written decades ago. I suspect today he'd change that idea given the better data available.

Personally I think adding lighting to cities makes personal safety far better. I get what the studies are doing but I think they are relying on novelty to get published over boring.

But certainly you have to watch putting someone down a well-lit underpass over crossing a not so well-lit busy road.

I think the value to the data is for councils to find where lighting should be improved. Plus there's also more to safety than just crime.


Thanks a lot for pointing this out. Probably it is also about perceived safety :)


In a team at a hackathon I implemented a similar thing (safe way to school) with GraphHopper: https://github.com/karussell/nordhopper (Disclaimer: I'm one of the GraphHopper devs)

There is no mobile app only a simple web app. But we also considered crash data from the German government which could be important. Additionally with GraphHopper walking routes avoid bigger streets and consider many signals from OpenStreetMap data. My personal route would probably just to avoid some dark parks to be honest as every detour is ugly.

And so a nice feature is the customizable routing where you can change your preferences per request because it is not clear if a longer detour along lamps is really safer if it is twice the length and at which point your personal preferences are or how you wish to mix other signals into the cost function of the route.

Check out the next release soon that will get a heavily improved customization feature: https://github.com/graphhopper/graphhopper/pull/2209


A route where there are other people is more important than well lit. Eg a busy shopping street vs a well-lit back street.


Depends on the neighborhood. The average open-air drug market in the Tenderloin is dangerous precisely because of how busy it is.

Crowds are a decent security by obscurity mechanism, but only if you blend in. If you code as an outsider (e.g. a Japanese tourist in West Philly), then bustle might be a bug not a feature. More potential predators' attention to catch.


So many factors play into both subjective and objective safety. This is an interesting project but I'm not sure how you algorithmically encode the route you should probably walk if you're going from the Hilton on O'Farrell to the Moscone.


The most direct route (stockton->market->howard) is actually the one I’d take in that case. What do you think it should suggest?


I guess that actually is a tad shorter--and the preferred route Google Maps gives you. A lot of people would be inclined to cut down to Market though because it seems more direct. (Google does give this as an alternate and the two are basically the same distance.)


O'Farrel to Market on Mason is definitely more shady than going down Stockton. Not so shady that I've personally felt unsafe, but it's the kind of place I have to step around a dice game on the sidewalk.


> If you code as an outsider

More likely a jumpy or purse clutching individual who is oblivious to their surroundings will stand out to perps.


If you mind your own business and don't act stupid, most places are perfectly safe.


The Tenderloin is a busy place, but I wouldn't walk through it compared to a well-lit back street outside the Tenderloin.


Yeah, but I'll also take a sketchy crowd in the Tenderloin at 10pm over being in the Richmond at 1am with nobody around except that one car that keeps circling the blocks.


I have attended a talk of a team who built something similar few years ago, it might be interesting for you http://goodcitylife.org/happymaps/index.php


Where does the data come from for defining sketch areas?


From the article:

> For this hackathon we used data about whether a street is lit or not from Open Street Map. Later we could incorporate official UK gov data about street lighting or even incorporate satellite imaging data.


Ooh, what an excellent question. Is the data crowdsourced, if so, by whom? What defines sketchy areas _besides crime_.

What an excellent opportunity for consistency by certain worldviews.


Imagine the shit storm if Google made "safe" paths.


Microsoft has a patent issued in 2012 for this very topic...and as you predicted, there were many news articles and questions about ethics brought up. [1]

Given the market share Google Maps has, the economic fallout from them suddenly avoiding certain areas deemed "unsafe" could swing billions of dollars annually from one set of businesses to another.

[1] https://www.npr.org/2012/01/25/145337346/this-app-was-made-f...


They probably do, even just by factoring in how popular segments are. I agree there would be a shit storm if they labeled certain paths as safer though.


Wouldn’t a crime heatmap be more than sufficient?


@bestofnextdoor

More seriously there are some serious ethical concerns people are missing here.


Great idea. I can certainly relate to the feeling of thinking "this is sketch" while following a google map route.

Google should just build this feature in.


What I would even more like to see is municipal governments use this sort of a tool to identify areas for improvement.


Microsoft patented the feature (but has not implemented it, AFAIK).

http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO1&Sect2=H...


Wow, reading patents sucks. A quick read of the text would lead you to believe (incorrectly, I think) that the patent is for any system which provides different routes to pedestrians than to cars. They skirt around defining exactly what they’d like to protect.


This gives me the same strong negative impression as the Citizen and Nextdoor apps.

The idea makes sense in some abstract theoretical way, but in practice this will simply reflect the biases of users by representing the subjective "sketchiness" of (typically) poorer areas, leading to gentrified travel routes that siphon yet more business away from communities who could really use it.


It is currently using openstreetmap data to determine if a street is lit or not. There is no user feedback declaring a place "sketchy".


That's good and I hope it stays that way. I also hope that OSM data remains faithful to real conditions, and that other factors such as poor street/sidewalk quality, etc. which can have significant correlation with underserved communities aren't included in the app in the future.


I don’t doubt that happens but the flip side is that in my area the food trucks and mom and pop locations have been getting a big boost from people in the neighboring gentrified neighborhood giving them shout outs or sharing job opportunities. My neighbor has started selling her mother’s tamales starting on next door and now has enough business to stop working in an Amazon warehouse.

My area is probably not representative of most Nextdoor communities however


That's awesome!

I am only speaking out because I get the sense from this community (and having worked in the tech industry for long enough) that such externalities are not really considered when designing apps like this one. The other comments give a hint to the proportion of time that these concerns and issues are discussed.

I see all the time only the consideration of "could" without any regard for "should".


It is sad how everything nowadays is expected to be curated by PMCs with degrees in social work because everyone else is considered too stupid to not be biased.


Not stupid, just uncritical.

I could share with you many stories from FAANG privacy compliance groups about how little engineers think about the impacts of their releases.


Maybe I care more about not being mugged than doing racial justice in where I choose to walk. Certain neighborhoods being crime-infested hellholes is not my problem.


False equivalence, and false dichotomy. Poorly argued point.


as other commenters have mentioned, the project currently defines "safe" as "well-lit" and does not take any other factors into account. the potential next steps listed do not involve asking users for their opinion on what areas are sketchy.

while it's important not to conflate "poor" with "unsafe", I don't think it's unreasonable or unfair for individuals to try to avoid walking around in areas with a higher rate of violent crime. as long as the service makes a good faith attempt at objectivity, I don't feel there is anything wrong with a service providing this sort of information. crime maps might be a good place to start looking for data.


"gentrified travel routes that siphon yet more business away from communities who could really use it" <- that made my day kudos.


Heya, congrats on getting on the HN front page! I'm Bence, one of the judges from hack.travel, where I believe this project originated. (Note for bystanders: the project got first place at that hackathon.)

I wonder what's been up with the project and why the sudden activity? Have you been doing anything cool behind the scenes?


lol no and thanks! I recently posted an email validator I built about a year ago with not much thought https://news.ycombinator.com/item?id=25440220 Today, I noticed my github stars went through the roof on that repo so I thought I should probably post some of my other repos too!


Kudos - well done :)

If you still like the topic of path finding you can checkout GraphHopper - we always look for contributors :)


GraphHopper is great, especially for Map Matching. The IoT startup I work for in New Zealand was struggling with fuzzy-matching routes with Google Maps and ESRI. When I tried GraphHopper, it gave excellent results, and when I had more questions, email replies were extremely punctual. Another friend in Germany is using GraphHopper for some research on tram lines.

So just to echo what karussell says: GraphHopper seem like a great team, with wonderful tech and friendly people. So if you have an interest in maps, it's worth chatting to them!


Nice idea and implementation!

In case you plan to move this from hackathon experiment to real product, to me the second letter in the logo splash (first image in the readme) looks like an "l" instead of the "r" that it's supposed to be. So I first read it as "BlightPath" which is probably not desired.


A similar idea I’ve often thought about would be a route planner than finds the path with the most shade on hot days. You’d have to take topography and building heights into account, along with the time of day. Weather is a factor too - overcast skies? Great! Would be an interesting problem to work on.


There was an app a while back that could tell you if the café's outdoor tables were sunlit or not, taking sun angle and buildings into account. But this is Sweden, it's not hot enough to stay out of the sun anyway. To be able to sit outdoors, you want the sun most of the time. :-)


Eh, it's not bad, but phones are so distracting while walking. I use walking directions sometimes and it's like wearing blinders to an extent. You need all your senses in focus if you really want to be safe while walking somewhere unfamiliar.


Walking directions with a smart watch is so much more convenient. When I am coming up to a turn it taps my wrist and a quick look at my watch shows an arrow with the way I need to go.


ideally you would have your route committed to memory before starting the walk. still, it's better to whip out your phone every few blocks than to accidentally walk through a place you didn't intend to.


I wonder how you would define a proper loss function for this? You probably need to optimize distance versus “sketchyness”. How would one go about that? Also every user probably has a different feeling about how much sketch they will endure to save a couple minutes walking distance.


From the description of the backend:

> Clean geojson to remove dark pathways.

Doesn't this eliminate routes with tradeoffs? e.g., cutting through a small park or alleyway may not be so risky (the other end is visible, both ends are well lit) while the alternative route may be very long in comparison?


It says a lot about a society that people even think along those lines. I often take a walk in the night, it feels nice, surrounded by darkness in the cool night, looking at the stars, listening to the animals scrambling around in the fields and ditches.


Use technology to protect users from walking down streets populated by people negatively impacted by socioeconomic conditions (poverty, mental health, food insecurity), or use technology to bring awareness and compassion to the most vulnerable.


Believe it or not, it is possible to both have compassion for those in poverty, struggling with mental health issues, etc. AND want to avoid being mugged.

Only a ridiculously privileged and sheltered person would think these things are somehow mutually exclusive. I can hear all the hardworking immigrants in rough neighborhoods rolling their eyes.

I don't understand why some people talk as if compassion entails complete vulnerability. Seems like a lot of grandstanding.


It’s in Show HN. The person built a tool that could be genuinely useful to some people. You go build your social project and stop shittin’ on other people’s projects.


Are you implying an exclusive-or?


How is your comment at all related to the linked project? It literally just attempts to determine how brightly-lit the physical area is and uses that to plan a walking route.


Nothing does social justice like getting mugged.


It'd be nice to see a list of the few places in the world where it's generally safe to walk alone at night, with your iPhone out and everything. I can only think of Singapore and Japan, along with maybe some parts of Europe.


I have literally never felt unsafe at night in south Australia.


Same here in Eastern Europe. The whole topic and comments make me think "wait, people live like that, I thought that just happened in movies". I wouldn't have any concerns if my wife and kid walked around any streets in my city, even at 3am.


There's also a direct correlation between homeless presence & crime. Are there any available APIs for mapping encampment locations?

Living in Californian cities I've come to realize that homelessness should be illegal.


Very good job with this. I am working on a similar project and I was wondering if you are planning on hosting your own OSM tiles or using a service (Mapbox is listed, but are you going with that?) ? Thanks!


> 3. Clean geojson to remove dark pathways.

I sort of expected this to be the "draw the rest of the owl" step, but apparently "Lit" is actually a property of the geojson data! Very interesting.


Interesting, especially when usage patterns emerge. I wonder for which countries, cities and neighborhoods this ends up being used mostly.

I guess usage relates to safety.


Coll but how you collect the source of light point in each roads?

Are the application actively recording light intensity? Are they coming from open-data?


From the Github page:

> For this hackathon we used data about whether a street is lit or not from Open Street Map. Later we could incorporate official UK gov data about street lighting or even incorporate satellite imaging data.

It sounds like getting the data right wasn't the focus yet:

> Later we could incorporate many other kinds of data such as safe checkpoints trivially. The core technical challenge was wrangling the data and writing our own custom routing algorithm.


This is a common pattern for OSM. The tool to use the data helps locate areas where the data isn't complete (say you plan a route through an area you know and it doesn't make sense).


Correct the primary data source was open street map.


I'm curious what you're looking for in OSM. I looked at highway=street_lamp and the results were....let's say "sparse".


The lit-key is used on ways and indicates the lighting of it:

https://wiki.openstreetmap.org/wiki/Key:lit

The highway=street_lamp tag indicates that there is a lamppost (which can be a navigational aid), but is a much more detailed form of mapping that should be used in addition to the lit-key on the ways themselves.


"For fear of his yasa and punishment his followers were so well disciplined that during his reign no traveller, so long as he was near his army, had need of guard or patrol on any stretch of road ; and, as is said by way of hyperbole, a woman with a golden vessel on her head might walk alone without fear or dread."

https://www.reddit.com/r/AskHistorians/comments/3x0ae1/was_t...


What point are you trying to make?


Perhaps just that the topic of road safety has been discussed for millennia? I doubt they are arguing for the restoration of Mongol rule, if that's what you're worried about.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: