Companies build their factories close to cities and transportation centers in the mid 1800s to?