Public
Edited
Jan 27, 2024
Insert cell
Insert cell
formatE = new Intl.NumberFormat("en-US", {
notation: "compact",
compactDisplay: "short",
style: "currency",
currency: "eur"
}).format
Insert cell
formatE(1e9)
Insert cell
formatE(1.128736876e9)
Insert cell
formatE(-1e12) // European debt
Insert cell
formatUS = new Intl.NumberFormat("en-US", {
notation: "compact",
compactDisplay: "short",
style: "currency",
currency: "USD"
}).format
Insert cell
formatUS(-33e12) // US debt in 2023
Insert cell
Insert cell
Plot.plot({
marginRight: 60,
y: {
tickFormat: formatUS,
type: "log",
tickSpacing: 40,
grid: true,
axis: "right"
},
marks: [
Plot.lineY(hstdebt, { x: "Record Date", y: "Debt Outstanding Amount" })
]
})
Insert cell
HstDebt_17900101_20230930.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

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