I think I have found something of great OTL interest here-
New factories were constructed through out the Empire of Brazil in the 1880s, allowing Brazil's cities to modernised and receive the benefits of gas, electrical, sanitation, telegraph and trams. The Empire was was the fifth country in the world to install modern city sewers in its cities and the third to have sewage treatment works.
By 1889 railways had grown to 9,200 kilometres (5,700 mi) and another 9,000 kilometres (5,600 mi) under construction, making it "the largest rail network in Latin America".
Between 1901 and 1910, coffee made up 51% of Brazil's total exports, far overshadowing rubber, sugar and cotton. But reliance on coffee made Brazil (and São Paulo in particular) vulnerable to poor harvests and the whims of world markets.