Public
Edited
Mar 27, 2023
Insert cell
Insert cell
data = data_raw
.filter((d) => d.trans_day.getTime() > 0)
.filter((d) => d.trans_day > new Date("2010-01-01"))
.filter((d) => d.trans_day < new Date("2022-12-31"))
Insert cell
countries = ["MX", "IN", "JP", "ML", "ID", "EG"]
// countries = ["CN", "KR", "JP", "TW", "HK"] // east asia
// countries = ["EG", "IN", "MA", "TR", "UA"]
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
sector_topics = [
{ code: "1", name: "Social Development Sectors" },
{ code: "2", name: "Infrastructure and Services" },
{ code: "3", name: "Economic Sectors" },
{ code: "4", name: "Environmental Protection" },
{ code: "5", name: "Development Assistance" },
{ code: "6", name: "Debt Management" },
{ code: "7", name: "Disaster Management" },
{ code: "9", name: "Donor Support and Miscellaneous" }
]
Insert cell
color = {
return {
type: "ordinal",
// type: "categorical",
domain: sector_topics.map((d) => d.name).reverse()
};
}
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