Public
Edited
Oct 15, 2023
Insert cell
Insert cell
Insert cell
Insert cell
CanadaHelpful@1.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
TrudeauHelpful@1.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
vega({
$schema: "https://vega.github.io/schema/vega-lite/v4.json",
height: 500,
width: 700,
title: {
text: [
`Helpfulness rating counts for community notes containing the word "Poilievre"`
],
subtitle: ["Pulled on October 14, 2023"],
subtitleColor: "f4f4f4"
},
data: {
values: pollivrehelpful1.map((d) => {
return { noteAndTweetID: d.tweetId + "-" + d.noteId, ...d };
})
},
mark: { type: "bar", tooltip: true },
encoding: {
y: {
field: "cnt",
type: "quantitative",
axis: { grid: false }
},
x: {
field: "noteAndTweetID",
type: "nominal",
axis: false,
sort: "-y"
},
color: {
field: "helpfulnessLevel",
type: "nominal",
sprt: "y",
legend: { orient: "top" }
}
}
})
Insert cell
PollivreHelpful@2.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
// Create an embed function that applies the loader and theme
vega = function (spec) {
return vegaEmbed(spec, {
loader: vegaEmbed.vega.loader({ baseURL: "https://vega.github.io/vega/" }),
config: vegaThemes["carbong90"],
actions: true
});
}
Insert cell
// load the Vega-Embed library
vegaThemes = require("vega-themes@2.14.0")
Insert cell
// load the Vega-Embed library
vegaEmbed = require("vega-embed@6")
Insert cell
html`<link href="https://cdn.jsdelivr.net/npm/@carbon/charts@1.0.4/styles.css" rel="stylesheet" />`
Insert cell
html`<link href="https://cdn.jsdelivr.net/npm/carbon-components@10.56.0/css/carbon-components.css " rel="stylesheet" />`
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