A map of US railroads and Amtrak stations. Data from the National Atlas. 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: steelblue;
fill-opacity: .8;
}
.feature--railroad {
fill: none;
fill-opacity: .8;
stroke: #d77;
}
.feature--state :hover,
.feature--station :hover {
fill: #eba;
}
.feature--state .active {
fill: orange;
}
.feature--railroad {
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