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

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more