Lets compare salaries on a city by city basis and adjust those salaries based on the Cost of living in dollars per square foot (cost of a house/condo from Zillow). To calculate the location adjusted salary, we simply multiply the salary by 500 (rough average of $/sq foot) and divide by the cost per square foot in that city.
This comparison makes sense only if your salary is spent on literally nothing else but housing.