Public
Edited
Dec 19, 2022
1 fork
Insert cell
Insert cell
vega({
$schema: "https://vega.github.io/schema/vega-lite/v4.json",
data:{
values: summaryData
},
transform:[{fold:["2019","2020","2021"]}],
mark: {type:"rect",tooltip:true},
title :["December Retail Sales volume vs. Annual Average"],
encoding:{
x:{
field: "key",
type: "nominal",
title:"Year"
},
y:{
field:"NAPCS",
title:"Category"
},
color:{field:"value",
type:"quantitative",
scale: {scheme:"viridis"}
}
}
})
Insert cell
vega = require("vega-embed@6")
Insert cell
d3 = require('d3-dsv')
Insert cell
summaryData = FileAttachment("NAPCS_Christmas@2.csv").csv({typed:true})
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