Built with blockbuilder.org
xxxxxxxxxx
<meta charset="utf-8">
<title>watershed</title>
<body>
<script src="//d3js.org/d3.v4.min.js"></script>
<script src="//d3js.org/topojson.v2.min.js"></script>
<script>
var width = 960, height = 500;
var svg = d3.select('body').append('svg')
.attr('width', width)
.attr('height', height);
// For d3 representation of various stateplanes, see: d3-stateplane
// We'll set the scale and translate later, based on the data
var projection = d3.geoConicConformal()
.parallels([38 + 18 / 60, 39 + 27 / 60])
.rotate([77, -37 - 40 / 60]);
var path = d3.geoPath()
d3.json("https://raw.githubusercontent.com/leenoah1/class_project/master/watershed.json", function(json) {
svg.selectAll("path")
.data(json.features)
.enter()
.append("path")
.attr("d", path);
d3.json("watershed.json", function(json) {
//Put things here that depend on the JSON loading
svg.selectAll("path")
.data(json.features)
.enter()
.append("path")
.attr("d", path);
});
//Only put things here that can operate independently of the JSON
console.log("I like cats.");
});
</script>
https://d3js.org/d3.v4.min.js
https://d3js.org/topojson.v2.min.js