I've not been to SF but have have been to Ca many times (as well as the rest of north America. Its pretty much the same as everywhere else in the world in the respect of good and bad areas. As the post above says generally keep out of known bad areas and if you find your way into one by mistake then make your way out ASAP.
Hotel staff will normally guide you on where not to go.
If the area looks really bad and the hotel is as bad then don't stay there, Hotels are numerous and usually can acomodate without reservations.
Enjoy the trip.
Unbearable grief compounded by our adult children’s reactions
Soops kitchen, a place of reflection, refuge and at times revelry.
Where Is Greta Thunberg These Days?
50 Greatest books of all time.
Things that (sometimes unreasonably) get on your nerves...hopefully lighthearted



