Published
Edited
Nov 16, 2021
Insert cell
# RIPE Atlas Traceroute display
Insert cell
viewof msm_id = Inputs.text()
Insert cell
viewof prb_id = Inputs.text()
Insert cell
viewof ts = Inputs.text()
Insert cell
trace_format( trace_data[0] )
Insert cell
trace_format = function( data ) {
let out = "";
out += `# prb:${data.prb_id} #msm_id:${data.msm_id}\n`;
for ( const hopr of data['result'] ) {
const hop = hopr.hop
for ( const hoprr of hopr['result'] ) {
out += hopr.hop + " " + hoprr.from + " " + hoprr.rtt + "\n";
}
}
return out
}
Insert cell
trace_data = {
const ts_conv = Date.parse( ts ) / 1000
const url=`https://atlas.ripe.net/api/v2/measurements/${msm_id}/results?probe_ids=${prb_id}&start=${ts_conv - 1}&stop=${ts_conv + 1}`
console.log( url )
return await fetch(url).then( j => j.json() )
}
Insert cell
prettier = require("prettier@2", "prettier@2/parser-babel.js")
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