Published
Edited
Feb 27, 2018
Insert cell
Insert cell
Insert cell
Insert cell
plot = {
const svg = d3.select(DOM.svg(width, height))
.style("width", "100%")
.style("height", "auto");
const countries = topojson.feature(topojsonData, topojsonData.objects.countries);
const basemapGroup = svg.append("g").attr("class", "base");
const bandsGroup = svg.append("g").attr("class", "bands");
const scaleGroup = svg.append("g").attr("class", "scale");
const bandsTemp = rastertools.isobands(tempData, geoTransform, intervals);
const colorScale = d3.scaleThreshold()
.domain(intervals)
.range(colors);
//return bandsTemp;
return ready(svg, countries, basemapGroup, bandsTemp, path, colorScale, intervals).node()
}

Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
radarColors = {
var linear = d3.scaleLinear()
.domain(intervals)
.range(colors);
console.log(linear);
var svg = d3.select("svg");
svg.append("g")
.attr("class", "legendLinear")
.attr("transform", "translate(20,20)");
var legendLinear = legend.legendColor()
.shapeWidth(20)
.shapeHeight(20)
.shapePadding(0)
.cells(17)
.orient('horizontal')
.labelOffset(5)
.scale(linear);
svg.selectAll(".legendLinear")
.selectAll(".label")
.attr("font-size", "8px")
.attr("font-family","sans-serif")
.attr("fill","#555555");
svg.select(".legendLinear")
.call(legendLinear);
return svg.node();
}
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
//https://otro-cpnooxboun.now.sh/
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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