Published
Edited
Oct 2, 2020
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
barChartRace
Insert cell
k = 4
Insert cell
data = d3.csvParse(await FileAttachment("aiddata.csv").text(), ({country, year, net_donations}) => ({
date: new Date(year),
name: country,
category: "Entity",
value: +net_donations
})).filter(d => d.date >= new Date("1980"))
Insert cell
import { chart as barChartRace } with { replay, k, data as data } from "@d3/bar-chart-race"
Insert cell
d3 = require("d3@6")
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