I've also had friends swallowed up by the bay area, also to violence and drugs. They all had in common that they were scraping by on a little over minimum wage or engaging in sex work to survive or homeless or almost homeless
By and large, the bay area is not dangerous for salaried tech folks receiving benefits that, yearly, amount to more than double what most service class folks earn in cash in 5 years. The bay area is dangerous for the homeless and the mentally ill and the folks with vastly fewer resources, working as dishwashers but classed as 1099 contractors or totally under the table.
The bay area is an extremely cruel place to most of the people who aren't on tech or finance salaries. Most of my friends not in tech are constantly having to move because their buildings are getting sold to companies that flip properties into luxury housing.
Anyway, if this isn't you, the bay is your oyster. There's constantly technical talks and dev oriented events and conventions and hackathons and meetups and spaces like noisebridge and sudo room in the east bay. There's great food, excellent excellent healthcare and probably the best mental healthcare in the world in terms of quality of care and accessibility. There are phenomenal libraries and bookstores (see Moe's in Berkeley and SFPL and alleycat books). Lots of great companies, lots of opportunities for mentorship.