Public
Edited
Jan 28, 2024
1 fork
8 stars
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 Union 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

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