Published
Edited
Apr 4, 2022
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
Insert cell
Insert cell
Insert cell
// viewof show_zero = Radio([true, false], {
// label: "Show 0 (in y axis)",
// value: query["show_zero"] ? query["show_zero"] : defaults.show_zero
// })
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
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
usedControllers = Array.from(d3.group(connections, (c) => c.controller).keys())
Insert cell
usedControllers.includes("ctr-nue15")
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
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
interpolator = d3.scaleSequential(palette).domain([1, 64 * 1024])
Insert cell
countryScale = d3
.scaleBand()
.domain(countries)
.range([1, 64 * 1024])
.padding(0.1)
.round(true)
Insert cell
controllerScale = d3
.scaleBand()
.domain(allControllers)
.range([1, 64 * 1024])
.padding(0.1)
.round(true)
Insert cell
blahScale = d3
.scaleLinear()
.domain([0, 100])
.range([1, 64 * 1024])
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
defaults = {
return {
asn: 3333,
country: "NL,BE",
location: "Amsterdam, The Netherlands",
radius: 50, // km
dim: false,
state: "up",
show_zero: true
};
}
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
// sometimes the OpenStreetMap Nominatim API is down
// net::ERR_ADDRESS_UNREACHABLE?
// fallback to selecting a place on the map by hand
// viewof _coordinates = worldMapCoordinates({
// value: nominatim_down ? [-122.27, 37.87] : [0, 0]
// })
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