If you're in the Tenderloin, Civic Center area, parts of the Mission or SoMA, then sure, you know you're in a dodgy area. But I'm pretty sure that if you're in Forest Hills, West Portal, Lake Merced, or the Presidio, you'll feel pretty safe, and crime maps seem to bear that out. I'll take my preschoolers alone to visit friends in the city on public transportation - I drive to Forest Hills, park in the neighborhood, muni to the Castro. Never had a problem.
I think that what gets tourists to SF is that areas you'd expect would be safe are actually bad. Normally you'd expect that major shopping districts like Union Square, or the city government like Civic Center, would be safe. In SF they're right next to the Tenderloin, which is a cesspit of filth and addicts. And gentrified vs. dodgy areas in SF are very close together, like walking two blocks toward Valencia and Guerrero in the Mission is dramatically different from walking two blocks in the opposite direction to Van Ness and Folsom, or being on the north side of Potrero is dramatically different from wandering the south side.
I have no delusions though, I would not consider any part of the city as truly safe, the metric being I'd be ok with my wife walking around alone.
Kara Swisher is a self-involved imbecile, please don't compare me to her.
Much of SFs homeless population and crime is concentrated around the Tenderloin and SOMA areas with downtown also being relevant. You can use something like the Citizen app to get a rough geographic understanding.
This is an important topic but so many clueless individuals (not OP, in general) decide to comment anyways.