Public
Edited
May 30, 2023
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
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
function getSectorTopic(d) {
if (d !== "") {
return (
sector_topics.find((s) => s.code === d[0]) || {
code: "",
name: "Unspecified"
}
);
} else return { code: "", name: "Unspecified" };
}
Insert cell
function getCountryName(countryName) {
return iso.find((d) => d.code === countryName)?.name || "other";
}
Insert cell
function isHighlighted(isoCode) {
if (highlight.includes(isoCode)) return getCountryName(isoCode);
else return "other";
}
Insert cell
highlighted = highlight.map((h) => isHighlighted(h))
Insert cell
Insert cell
Insert cell
import {
formatGapMinder,
// getSectorTopic,
// getCountryName,
formatNumbersNice
} from "@5knnbdwm/foreign-investment"
Insert cell
// import { Plot } from "@mkfreeman/plot-tooltip"
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