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

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