In the late 1860s elevated railways became popular in US cities.
The New York West Side and Yonkers Patent Railway operated with cable cars until 1870 when they were replaced by locomotives.
While most the of the subway system is now underground, during this time most of the railways were above ground.