drawCounty = {
let svg = d3
.create("svg")
.attr("width", height)
.attr("height", height);
svg
.selectAll("path")
.data([county])
.join("path")
.attr("d", path)
.attr("fill", "none")
.attr("stroke", "#111")
.attr("stroke-width", 0.35);
svg
.selectAll("circle.post")
.data(county.properties.postOffices)
.join("circle")
.attr("r", 2)
.attr("cx", d => projection([d.longitude, d.latitude])[0])
.attr("cy", d => projection([d.longitude, d.latitude])[1])
.attr("fill", "blue")
.classed("post", true);
svg
.selectAll("circle.noaa")
.data(stationsByStation)
.join("circle")
.classed("noaa", true)
.attr("r", 2)
.attr("cx", d => {
let s = d[1][0];
let p = projection([s.LONGITUDE, s.LATITUDE]);
if (p) return p[0];
return 0;
})
.attr("cy", d => {
let s = d[1][0];
let p = projection([s.LONGITUDE, s.LATITUDE]);
if (p) return p[1];
return 0;
})
.attr("fill", "orange");
return svg.node();
}