The rule I used to follow is that if I saw three or more youths that didn't seem to have purpose in their activity, I'd avoid them. Most often those groups were black or hispanics, but when they are white youths, I'll avoid them too. Another part of that rule is to walk in plain sight....near the center of a sidewalk rather than shadowed or obscured. Also, avoid city sidewalks, recreation areas, parking lots etc that don't have a critical mass of law-abiding citizens in the area.
Now I won't walk, park, or drive anywhere that I can't be seen by a steady flow of people.
Too many people have been attacked in locations you wouldn't expect it to happen. It's sad that it's come to this.