Public
Edited
Apr 10, 2024
Insert cell
Insert cell
Insert cell
Insert cell
vega(
{
$schema: "https://vega.github.io/schema/vega-lite/v4.json",
height: 750,
width: 1000,
title: "Total face value of coins minted (cents)",
data: {
values: coinminting
},
mark: { type: "bar", tooltip: true },
encoding: {
y: {
field: "TotalValue",
type: "quantitative",
axis: { grid: false, title: "Total Value in Cents" }
},
x: {
field: "Year",
type: "ordinal",
axis: { labelAngle: -90, labelFontSize: 9, grid: false }
},
color: {
field: "Coin",
sort: "-y",
type: "nominal"
},
shape: {
}
}
},
{ theme: "carbong90" }
)
Insert cell
// load the Vega-Embed library
vega = require("vega-embed@6")
Insert cell
html`<link href="https://cdn.jsdelivr.net/npm/carbon-components@10.56.0/css/carbon-components.css " rel="stylesheet" />`
Insert cell
html`<link href="https://cdn.jsdelivr.net/npm/@carbon/charts@1.0.4/styles.css" rel="stylesheet" />`
Insert cell
CoinMinting@2.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