Public
Edited
Dec 13
2 forks
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
d3.max( cc_list_data.map( d => d.ipv4_pfx_cnt ) )
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
md`Beyond this text there is only analysis code needed to make the rest of this page work`
Insert cell
cc_list_data = {
var d = []
const cc_set = new Set( countries )
for (var cc_obj_idx in data['countries']) {
const cc_obj = data['countries'][ cc_obj_idx ]
if ( cc_set.has( cc_obj['cc'] ) ) {
d.push( cc_obj )
}
}
return d
}
Insert cell
countries = cc_list.split(',')
Insert cell
data = FileAttachment("ris-distance.2024.12.11.json").json()
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
countrydata = data.countries.filter( x => x['cc'] == cc_filter )[0]
Insert cell
// mangling for scatter plot
v4scatterdata = data.countries.map( x => [ x['cc'], x['ipv4_mindist_avg'], x['ipv4_pfx_cnt'] ] )
Insert cell
v6scatterdata = data.countries.map( x => [ x['cc'], x['ipv6_mindist_avg'], x['ipv6_pfx_cnt'] ] )
Insert cell
import { table } from "@gampleman/table"
Insert cell
margin = ({top: 25, right: 40, bottom: 35, left: 40})
Insert cell
height = 600
Insert cell
import {Text} from "@observablehq/inputs"
Insert cell
d3 = require("d3@6")
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