Public
Edited
Jun 17, 2024
2 forks
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
Insert cell
Insert cell
Insert cell
Insert cell
upper_ace = {
const ace = structuredClone(upper);

let f = ace.features;
ace.features = f.filter(
(d) => !["ONDA", "ISRAEL_AA", "UKSATSE"].includes(d.properties.code)
);
// convert to integers
ace.features.forEach((d) => {
d.properties.id = +d.properties.id;
d.properties.airac_cfmu = +d.properties.airac_cfmu;
});

for (let i = 0; i < factsheets.length; i++) {
ace.features.forEach((d) => {
if (d.properties.id == 45) {
// console.log(d);
// console.log(factsheets[i].ansp_id);
}
if (+d.properties.id == factsheets[i].ansp_id) {
d.properties = { ...d.properties, ...factsheets[i] };
// logo
d.properties.logo =
"https://ansperformance.eu/images/ansp/logo/" +
d.properties.code.toLowerCase().replace(/\s+/g, "_") +
".png";
// pdf
d.properties.pdf =
"https://www.eurocontrol.int/ACE/ANSP-Factsheets/" +
d.properties.name +
".pdf";
// NA for MUAC
if (d.properties.reve_revenue === "NA") {
d.properties.reve_revenue = 0;
}
}
});
}
return ace;
}
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
formatZeroSpecial = function (d) {
if (+d >= 1) {
return d3.format(".3s")(d);
} else {
return "—";
}
}
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

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