The biggest factors would be food and water.
The transcontinential railroad brought more money to the railroad companies because more people had access to the railroads, therefor using them more, and money was brought in. Not 100% sure, but that is my guess
The strength of the federal government