The Green line(s) in Boston are like that, underground in a large portion of downtown, up on the street the rest of the way. Some share the way with cars, some use a separate right-of-way: a noticeable difference in travel time and convenience, or at least the perception thereof.
Shared right of way is pretty clearly "deprecated" in Boston these days (considered unpractical, they'll never build another one and they'd be glad to get rid of the one they have).
The two tram routes which have been cut in the last 50 years were both shared-right-of-way and there's only one short piece left.
There's a streetcar line in Toronto that does that, and a light rail system that's currently under construction that will be underground for a portion of the line.