vega(
{
$schema: "https://vega.github.io/schema/vega-lite/v4.json",
title: {
text: "Word count for Hansard entries containing the words 'Northwest Terrotiries' or spoken by the NWT MP",
subtitle: ["Based on a hansard search - 2002 to 2023"],
subtitleColor: "f4f4f4"
},
subtitle: "hello",
height: 500,
width: 850,
data: {
values: hansardnorthwestterritoritoriespos
.filter((d) => d.word !== "ii" && d.word !== "%")
.slice(0, 50)
},
mark: { type: "bar", tooltip: true },
encoding: {
x: {
field: "word",
type: "nominal",
sort: "-y",
axis: { labelAngle: -60 }
},
y: {
field: "count",
type: "quantitative"
},
color: {
field: "tag",
type: "nominal",
title: "Parts of speech tag"
}
}
},
{ theme: "carbong90" }
)