Public
Edited
Oct 8, 2024
Paused
Importers
Insert cell
Insert cell
/*
The actual lookup
Returns _all_ results for this ASN
*/
getName_ = (asn) => {
if (typeof asn === "undefined" || asn === null) return "";

if (typeof asn === typeof "string") asn = parseInt(asn);

let res = asn2asnames.get(asn);

// if not found return an empty array
return res ? res : [];
}
Insert cell
Insert cell
asnames = [...crowdsourced, ...peeringdb, ...ripencc, ...potarooNet]
Insert cell
asnames
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
strategy = ({
1: "crowdsourced",
2: "peeringdb",
3: "ripencc",
4: "potaroo.net"
})
Insert cell
/*
Looks up the matches with getName_ and then
prioritises according to the _strategy_ (e.g. "crowsourced first")
*/

getName = (asn, strat = strategy) => {
let valueToKey = {};
for (let k of d3.sort(Object.keys(strat))) valueToKey[strat[k]] = k;

return d3.sort(getName_(asn), (o) => valueToKey[o.source]);
}
Insert cell
{
let _paq = (window._paq = window._paq || []);
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["trackPageView"]);
_paq.push(["enableLinkTracking"]);
(function () {
var u = "https://www-analytics.ripe.net/";
_paq.push(["setTrackerUrl", u + "matomo.php"]);
_paq.push(["setSiteId", "67"]);
var d = document,
g = d.createElement("script"),
s = d.getElementsByTagName("script")[0];
g.async = true;
g.src = u + "matomo.js";
s.parentNode.insertBefore(g, s);
})();
}
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