It's actually very funny how the (perceived) worst/cheapest area in SF is right in the center of the city with easy transportation everywhere.
Of course, after 2 years I felt mentally exhausted from walking around so many mentally ill homeless and seeing garbage everywhere, but it was a calculus I made at the time and looking back the pros of a short commute, cheap rent for sf, and being centrally located with short walk to lots of transit at civic center muni/bart outweighed the cons.