Published
Edited
Feb 21, 2018
2 forks
Insert cell
Insert cell
intervals = [0, 5, 10, 15, 20, 25, 30, 40, 200, 240, 260]
Insert cell
colors = ["ForestGreen", "DarkGreen", "Green", "LimeGreen", "Chartreuse", "GreenYellow", "Gold", "Tomato", "Orchid", "Navy", "LightSkyBlue"]
Insert cell
Insert cell
Insert cell

ready = function(svg, countries, basemapGroup, bandsTemp, path, colorScale, intervalsTemp){
basemapGroup.insert("path", ".map")
.datum(countries)
.attr("d", path)
.style("opacity", "0.4")
.style("fill", "#eee")
.style("stroke", "#999")
.style("stroke-width", "1px")
const states =
bandsTemp.features.forEach(function(d, i) {
svg.insert("path", ".streamline")
.datum(d)
.attr("d", path)
.style("fill", colorScale(intervalsTemp[i]))
.style("stroke", "None");
});

return svg
}
Insert cell
Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

Insert cell
Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

Insert cell


Insert cell
Insert cell
projection = d3.geoAzimuthalEqualArea()
.rotate([80, -40, 15])
.scale(800)
Insert cell
Insert cell
Insert cell
tiffData = d3.buffer("https://reflectivity-nxjentgqup.now.sh/r50.tif")
Insert cell
//https://otro-cpnooxboun.now.sh/
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
rastertools = require("raster-marching-squares")
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more