CSIS Government Open Source Software Policies Dataset

Dataset

Explore the raw data.

Run your own analysis by creating a Codespace and opening the Quarto notebook that powers the charts below.

Using Quarto in Codespaces

  1. Create a Codespace
  2. Within the Codespace, navigate to the file you’re reading right now (index.qmd)
  3. Press 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.

Dataset Preview

Code
Inputs.table(data)

Governments

Code
governmentHistogram = Plot.plot({
  marginLeft: 180,
  y: {
    insetTop: 5,
    domain: governmentsByFrequencyDesc,
  },
  marks: [
    Plot.barX(data, Plot.groupY({ x: "count" }, { y: "Government" })),
  ]
})

Regions

Code
regionHistogram = Plot.plot({
  marginLeft: 200,
  y: {
    insetTop: 5,
    domain: regionsByFrequencyDesc,
  },
  marks: [
    Plot.barX(data, Plot.groupY({ x: "count" }, { y: "Region" })),
  ]
})

Issuing Areas

Code
issuingAreaHistogram = Plot.plot({
  marginBottom: 50,
  marginRight: 90,
  x: {
    tickRotate: -45,
    tickFormat: "d",
  },
  y: {
    insetTop: 5,
  },
  facet: {
    data,
    y: "Issuing Area of Government",
    marginRight: 90,
  },
  marks: [
    Plot.frame(),
    Plot.barY(data, Plot.groupX({ y: "count" }, { x: "Date" })),
  ]
})

Issuing Areas by Region

Code
issuingAreaByRegionHistogram = Plot.plot({
  marginBottom: 90,
  marginRight: 200,
  x: {
    tickRotate: -45
  },
  y: {
    insetTop: 5,
  },
  facet: {
    data,
    y: "Region",
    marginRight: 200,
  },
  marks: [
    Plot.frame(),
    Plot.barY(data, Plot.groupX({ y: "count" }, { x: "Issuing Area of Government" })),
  ]
})

Actions

Code
actionHistogram = Plot.plot({
  marginBottom: 50,
  marginRight: 150,
  x: {
    tickRotate: -45,
    tickFormat: "d",
  },
  y: {
    insetTop: 5,
  },
  facet: {
    data,
    y: "Action",
    marginRight: 150,
  },
  marks: [
    Plot.frame(),
    Plot.barY(data, Plot.groupX({ y: "count" }, { x: "Date" })),
  ]
})

Actions by Region

Code
actionByRegionHistogram = Plot.plot({
  marginBottom: 110,
  marginRight: 200,
  x: {
    tickRotate: -45
  },
  y: {
    insetTop: 5,
  },
  facet: {
    data,
    y: "Region",
    marginRight: 200,
  },
  marks: [
    Plot.frame(),
    Plot.barY(data, Plot.groupX({ y: "count" }, { x: "Action" })),
  ]
})

Statuses

Code
statusHistogram = Plot.plot({
  marginBottom: 50,
  marginRight: 90,
  x: {
    tickRotate: -45,
    tickFormat: "d",
  },
  y: {
    insetTop: 5,
  },
  facet: {
    data,
    y: "Status",
    marginRight: 90,
  },
  marks: [
    Plot.frame(),
    Plot.barY(data, Plot.groupX({ y: "count" }, { x: "Date" })),
  ]
})

Statuses by Region

Code
statusByRegionHistogram = Plot.plot({
  marginBottom: 50,
  marginRight: 200,
  y: {
    insetTop: 5,
  },
  facet: {
    data,
    y: "Region",
    marginRight: 200,
  },
  marks: [
    Plot.frame(),
    Plot.barY(data, Plot.groupX({ y: "count" }, { x: "Status" })),
  ]
})

Types

Code
typeHistogram = Plot.plot({
  marginBottom: 50,
  marginRight: 150,
  x: {
    tickRotate: -45,
    tickFormat: "d",
  },
  y: {
    insetTop: 5,
  },
  facet: {
    data,
    y: "Type",
    marginRight: 150,
  },
  marks: [
    Plot.frame(),
    Plot.barY(data, Plot.groupX({ y: "count" }, { x: "Date" })),
  ]
})

Types by Region

Code
typeByRegionHistogram = Plot.plot({
  marginBottom: 110,
  marginRight: 200,
  x: {
    tickRotate: -45
  },
  y: {
    insetTop: 5,
  },
  facet: {
    data,
    y: "Region",
    marginRight: 200,
  },
  marks: [
    Plot.frame(),
    Plot.barY(data, Plot.groupX({ y: "count" }, { x: "Type" })),
  ]
})

Stated Objective: Modernization

Code
modernizationHistogram = Plot.plot({
  marginBottom: 50,
  marginRight: 90,
  x: {
    tickRotate: -45,
    tickFormat: "d",
  },
  y: {
    insetTop: 5,
  },
  facet: {
    data,
    y: "Stated Objective: Modernization",
    marginRight: 90,
  },
  marks: [
    Plot.frame(),
    Plot.barY(data, Plot.groupX({ y: "count" }, { x: "Date" })),
  ]
})

Stated Objective: Cost

Code
costHistogram = Plot.plot({
  marginBottom: 50,
  marginRight: 90,
  x: {
    tickRotate: -45,
    tickFormat: "d",
  },
  y: {
    insetTop: 5,
  },
  facet: {
    data,
    y: "Stated Objective: Cost",
    marginRight: 90,
  },
  marks: [
    Plot.frame(),
    Plot.barY(data, Plot.groupX({ y: "count" }, { x: "Date" })),
  ]
})

Stated Objective: Sovereignty

Code
sovereigntyHistogram = Plot.plot({
  marginBottom: 50,
  marginRight: 90,
  x: {
    tickRotate: -45,
    tickFormat: "d",
  },
  y: {
    insetTop: 5,
  },
  facet: {
    data,
    y: "Stated Objective: Sovereignty",
    marginRight: 90,
  },
  marks: [
    Plot.frame(),
    Plot.barY(data, Plot.groupX({ y: "count" }, { x: "Date" })),
  ]
})

Stated Objective: Support for National Industry

Code
nationalIndustryHistogram = Plot.plot({
  marginBottom: 50,
  marginRight: 90,
  x: {
    tickRotate: -45,
    tickFormat: "d",
  },
  y: {
    insetTop: 5,
  },
  facet: {
    data,
    y: "Stated Objective: Support for National Industry",
    marginRight: 90,
  },
  marks: [
    Plot.frame(),
    Plot.barY(data, Plot.groupX({ y: "count" }, { x: "Date" })),
  ]
})

Stated Objective: Transparency

Code
transparencyHistogram = Plot.plot({
  marginBottom: 50,
  marginRight: 90,
  x: {
    tickRotate: -45,
    tickFormat: "d",
  },
  y: {
    insetTop: 5,
  },
  facet: {
    data,
    y: "Stated Objective: Transparency",
    marginRight: 90,
  },
  marks: [
    Plot.frame(),
    Plot.barY(data, Plot.groupX({ y: "count" }, { x: "Date" })),
  ]
})

Stated Objective: Security

Code
securityHistogram = Plot.plot({
  marginBottom: 50,
  marginRight: 90,
  x: {
    tickRotate: -45,
    tickFormat: "d",
  },
  y: {
    insetTop: 5,
  },
  facet: {
    data,
    y: "Stated Objective: Security",
    marginRight: 90,
  },
  marks: [
    Plot.frame(),
    Plot.barY(data, Plot.groupX({ y: "count" }, { x: "Date" })),
  ]
})

Appendix

Code
data = await FileAttachment("./data/OSS.Dataset.-.December.2022.v3.csv").csv({ typed: true })
Code
governmentsByFrequencyDesc = d3.rollups(data, v => v.length, d => d['Government'])
  .sort(([, a], [, b]) => d3.descending(a, b))
  .map(([key]) => key)
Code
governmentsByFrequencyDesc
Code
regionsByFrequencyDesc = d3.rollups(data, v => v.length, d => d.Region)
  .sort(([, a], [, b]) => d3.descending(a, b))
  .map(([key]) => key)
Code
regionsByFrequencyDesc