Union Square". If you are not familiar with SF you might be shocked, scared, horrified by how quickly the neighborhood goes downhill as you go west and southwest of Union Square. Beware of the Tenderloin(drug addicts and legally insane former state mental patients we call euphemistically the 'homeless'), South of Market(drunks and drug addicts,also filthy greasy dirty pee-d on sidewalks like the Tenderloin), and Western Addition(black poor high-crime projects-ghetto) neighborhoods. Instead, consider on the north side the Cow Hollow neighborhood with the shopping streets nearby of Lombard, Union, Hyde and Chestnut,,,plus the good mass transit,,,quieter hotels just off busy Lombard,,,and great hostel at Fort Mason,,,and beautiful park on the north end call the Marina Green. This is a much safer and more attractive neighborhood.
And generally you might want to stay out of the entire SE quarter, called Third Street, as it is mostly black poor high crime and very scary looking with big buildings with broken windows for decades, junk yards, terrible pothole streets, drunks and drug addicts, rock tossers at passing cars,high pollution from old dirty power plants and toxic ww2 navy shipyard Hunter's Point and especially the area around the Cow Palace projects for the poor know as Sunnydale and called 'shooter's alley'. Instead, stay in the northern half of the city. Gang violence is becoming more of a problem in the SW.