I think the most dangerous situations are when you yourself are not fully "up to scratch". With a couple of rather strange exceptions, once I got past my mid-20's the only time I encountered violence was in the pub/club scene. At this point in the evening, my own ability to even think straight, never mind perform any technique was often questionable.
Yes you can minimise risks, as mentioned. However, I personally don't ever want to get back into the "combat ready" mind-set, which some seem to suggest is the aim of any "true MA". Been there, bought the T shirt, found it barely distinguishable from a dictionary definition of paranoia - it's taken years to lose. I can now relax and that is a much greater gift to myself. Instead learn to assess a situation/venue for potential threat, always know where the nearest exits are, never sit with your back open unless you have a mirror/trustworthy friend in front of you and always get a taxi back if you're out late in a city you don't know well.
As for avoiding the "bad areas" - sorry, but some of us have had to live in them, avoiding them completely is not always an option.