Public
Edited
Jul 28
1 star
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
{
map.legend({
title: "Euro per inhabitant",
x: 10,
y: 135,
width: 200,
shapeWidth: 20,
tickLength: tickLength,
ticks: legendLabelType == "generic" ? false : 3, // defaults to 'low' and 'high' when unspecified
lowLabel: "Low",
highLabel: "High",
orientation: orientation,
highlightTolerance: 1000, //for legend mouseover
boxOpacity: 0
});
}
Insert cell
function getUntransform(transformName) {
const untransforms = {
Identity: (d) => d,
Log: Math.exp,
"Log base 10": (d) => Math.pow(10, d),
"Square root": (d) => d ** 2,
"Cube root": (d) => d ** 3,
Square: Math.sqrt,
Cube: Math.cbrt,
Reciprocal: (d) => 1 / d
};

return untransforms[transformName] || ((d) => d); // fallback to identity
}
Insert cell
eurostatmap = require("eurostat-map")
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