San Francisco is trending in the wrong direction, but there's time.