While higher salaries can help, location and affordability have become more important for some workers, data shows.