No. Coastal California is populated by Democratic voters, people who generally prefer high taxes and more (albeit of questionable quality) government services. SF is dirty because it has never had a Rudy Giuliani to clean it up — and the aforementioned residents would never vote someone like that into office.
(I grew up in NYC, and have been living in both SF and Oakland for the last four years.)