A map of US railroads, Amtrak stations, and live Amtrak train locations. Data from the National Atlas and Amtrak's MapsEngine feed. Based on Mike Bostock's Swiss Cantons example and the U.S. Atlas project.
xxxxxxxxxx
<meta charset="utf-8">
<style>
.background {
fill: none;
pointer-events: all;
}
.boundary {
fill: none;
stroke: #fff;
stroke-linejoin: round;
stroke-linecap: round;
}
.feature--state {
fill: #bbb;
}
.feature--station {
fill: white;
fill-opacity: .8;
stroke: steelblue;
stroke-opacity: .8;
}
.feature--railroad {
fill: none;
fill-opacity: .8;
stroke: #d77;
}
.feature--train {
fill: steelblue;
fill-opacity: .8;
}
.feature--state .active {
fill: orange;
}
.feature--railroad {
pointer-events: none;
}
.train-cell {
fill: #eee;
fill-opacity: .1;
}
.label {
pointer-events: none;
}
</style>
<body>
<script src="https://d3js.org/d3.v3.min.js"></script>
<script src="https://d3js.org/topojson.v1.min.js"></script>
<script src="./railroads.js"></script>
Modified http://d3js.org/d3.v3.min.js to a secure url
Modified http://d3js.org/topojson.v1.min.js to a secure url
https://d3js.org/d3.v3.min.js
https://d3js.org/topojson.v1.min.js