Interesting infographic presenting the ratio of length of railway lines and area of European countires.
It's interesting to note that the highest density is in a country that is, literally, the transportation hub of the continent. Other countries with high densities also have very high population density.
Except for the arctic north, there is nothing comparable to the 'miles and miles of nothing but miles and miles' characteristic of the American West. The United States has a large population, but there are vast areas where the 'people per square kilometer' figure is a single digit.
Then, too, what counts as a 'railway?' Does that include streetcar lines and commuter rail? Both are much more common in Europe than they are in the United States. How about rack railways? I'm pretty sure Switzerland has more of the latter than the United States.
Finally, a lot of railway mileage in Europe is either government owned or government supported. In the US the government (barely) supports Amtrak. Privately-owned railways have to earn enough to justify their existence. Those that can't become hiking and bike trails.
Chuck (former statistician)