Code
.table(data) Inputs
Explore the raw data.
Run your own analysis by creating a Codespace and opening the Quarto notebook that powers the charts below.
index.qmd
)Cmd+Shift+K
or Ctrl+Shift+K
to render the notebook.Ordinarily, you’d need to install Quarto first, but the prebuild configuration for this repo’s Codespaces uses an image with Quarto pre-installed for you.
Read more about Quarto and writing Observable JS (ojs
) cells.
.table(data) Inputs
= Plot.plot({
governmentHistogram marginLeft: 180,
y: {
insetTop: 5,
domain: governmentsByFrequencyDesc,
,
}marks: [
.barX(data, Plot.groupY({ x: "count" }, { y: "Government" })),
Plot
] })
= Plot.plot({
regionHistogram marginLeft: 200,
y: {
insetTop: 5,
domain: regionsByFrequencyDesc,
,
}marks: [
.barX(data, Plot.groupY({ x: "count" }, { y: "Region" })),
Plot
] })
= Plot.plot({
issuingAreaHistogram marginBottom: 50,
marginRight: 90,
x: {
tickRotate: -45,
tickFormat: "d",
,
}y: {
insetTop: 5,
,
}facet: {
,
datay: "Issuing Area of Government",
marginRight: 90,
,
}marks: [
.frame(),
Plot.barY(data, Plot.groupX({ y: "count" }, { x: "Date" })),
Plot
] })
= Plot.plot({
issuingAreaByRegionHistogram marginBottom: 90,
marginRight: 200,
x: {
tickRotate: -45
,
}y: {
insetTop: 5,
,
}facet: {
,
datay: "Region",
marginRight: 200,
,
}marks: [
.frame(),
Plot.barY(data, Plot.groupX({ y: "count" }, { x: "Issuing Area of Government" })),
Plot
] })
= Plot.plot({
actionHistogram marginBottom: 50,
marginRight: 150,
x: {
tickRotate: -45,
tickFormat: "d",
,
}y: {
insetTop: 5,
,
}facet: {
,
datay: "Action",
marginRight: 150,
,
}marks: [
.frame(),
Plot.barY(data, Plot.groupX({ y: "count" }, { x: "Date" })),
Plot
] })
= Plot.plot({
actionByRegionHistogram marginBottom: 110,
marginRight: 200,
x: {
tickRotate: -45
,
}y: {
insetTop: 5,
,
}facet: {
,
datay: "Region",
marginRight: 200,
,
}marks: [
.frame(),
Plot.barY(data, Plot.groupX({ y: "count" }, { x: "Action" })),
Plot
] })
= Plot.plot({
statusHistogram marginBottom: 50,
marginRight: 90,
x: {
tickRotate: -45,
tickFormat: "d",
,
}y: {
insetTop: 5,
,
}facet: {
,
datay: "Status",
marginRight: 90,
,
}marks: [
.frame(),
Plot.barY(data, Plot.groupX({ y: "count" }, { x: "Date" })),
Plot
] })
= Plot.plot({
statusByRegionHistogram marginBottom: 50,
marginRight: 200,
y: {
insetTop: 5,
,
}facet: {
,
datay: "Region",
marginRight: 200,
,
}marks: [
.frame(),
Plot.barY(data, Plot.groupX({ y: "count" }, { x: "Status" })),
Plot
] })
= Plot.plot({
typeHistogram marginBottom: 50,
marginRight: 150,
x: {
tickRotate: -45,
tickFormat: "d",
,
}y: {
insetTop: 5,
,
}facet: {
,
datay: "Type",
marginRight: 150,
,
}marks: [
.frame(),
Plot.barY(data, Plot.groupX({ y: "count" }, { x: "Date" })),
Plot
] })
= Plot.plot({
typeByRegionHistogram marginBottom: 110,
marginRight: 200,
x: {
tickRotate: -45
,
}y: {
insetTop: 5,
,
}facet: {
,
datay: "Region",
marginRight: 200,
,
}marks: [
.frame(),
Plot.barY(data, Plot.groupX({ y: "count" }, { x: "Type" })),
Plot
] })
= Plot.plot({
modernizationHistogram marginBottom: 50,
marginRight: 90,
x: {
tickRotate: -45,
tickFormat: "d",
,
}y: {
insetTop: 5,
,
}facet: {
,
datay: "Stated Objective: Modernization",
marginRight: 90,
,
}marks: [
.frame(),
Plot.barY(data, Plot.groupX({ y: "count" }, { x: "Date" })),
Plot
] })
= Plot.plot({
costHistogram marginBottom: 50,
marginRight: 90,
x: {
tickRotate: -45,
tickFormat: "d",
,
}y: {
insetTop: 5,
,
}facet: {
,
datay: "Stated Objective: Cost",
marginRight: 90,
,
}marks: [
.frame(),
Plot.barY(data, Plot.groupX({ y: "count" }, { x: "Date" })),
Plot
] })
= Plot.plot({
sovereigntyHistogram marginBottom: 50,
marginRight: 90,
x: {
tickRotate: -45,
tickFormat: "d",
,
}y: {
insetTop: 5,
,
}facet: {
,
datay: "Stated Objective: Sovereignty",
marginRight: 90,
,
}marks: [
.frame(),
Plot.barY(data, Plot.groupX({ y: "count" }, { x: "Date" })),
Plot
] })
= Plot.plot({
nationalIndustryHistogram marginBottom: 50,
marginRight: 90,
x: {
tickRotate: -45,
tickFormat: "d",
,
}y: {
insetTop: 5,
,
}facet: {
,
datay: "Stated Objective: Support for National Industry",
marginRight: 90,
,
}marks: [
.frame(),
Plot.barY(data, Plot.groupX({ y: "count" }, { x: "Date" })),
Plot
] })
= Plot.plot({
transparencyHistogram marginBottom: 50,
marginRight: 90,
x: {
tickRotate: -45,
tickFormat: "d",
,
}y: {
insetTop: 5,
,
}facet: {
,
datay: "Stated Objective: Transparency",
marginRight: 90,
,
}marks: [
.frame(),
Plot.barY(data, Plot.groupX({ y: "count" }, { x: "Date" })),
Plot
] })
= Plot.plot({
securityHistogram marginBottom: 50,
marginRight: 90,
x: {
tickRotate: -45,
tickFormat: "d",
,
}y: {
insetTop: 5,
,
}facet: {
,
datay: "Stated Objective: Security",
marginRight: 90,
,
}marks: [
.frame(),
Plot.barY(data, Plot.groupX({ y: "count" }, { x: "Date" })),
Plot
] })
= await FileAttachment("./data/OSS.Dataset.-.December.2022.v3.csv").csv({ typed: true }) data
= d3.rollups(data, v => v.length, d => d['Government'])
governmentsByFrequencyDesc .sort(([, a], [, b]) => d3.descending(a, b))
.map(([key]) => key)
governmentsByFrequencyDesc
= d3.rollups(data, v => v.length, d => d.Region)
regionsByFrequencyDesc .sort(([, a], [, b]) => d3.descending(a, b))
.map(([key]) => key)
regionsByFrequencyDesc