Public
Edited
May 24, 2023
1 fork
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
issues_org = fetchGithubResponse(`/orgs/datacite/issues`, {
per_page: 50
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
contributions = [
{ contributor: "digitaldogsbody", contributions: 284, team: "dev" },
{ contributor: "kjgarza", contributions: 407, team: "product" },
{ contributor: "richardhallett", contributions: 500, team: "dev" },
{ contributor: "jrhoads", contributions: 498, team: "dev" },
{ contributor: "svogt0511", contributions: 554, team: "dev" },
{ contributor: "codycooperross", contributions: 125, team: "dev" }
]
Insert cell
contributions_2020 = [
{ contributor: "kjgarza", contributions: 1548, team: "dev" },
{ contributor: "richardhallett", contributions: 648, team: "dev" },
{ contributor: "svogt0511", contributions: 115, team: "dev" }
]
Insert cell
closed_bugs = [
{ contributor: "digitaldogsbody", closed: 8, team: "dev" },
{ contributor: "kjgarza", closed: 0, team: "product" },
{ contributor: "richardhallett", closed: 20, team: "dev" },
{ contributor: "jrhoads", closed: 9, team: "dev" },
{ contributor: "svogt0511", closed: 11, team: "dev" },
{ contributor: "codycooperross", closed: 12, team: "dev" }
]
Insert cell
closed_bugs_year = [
{ year: "2022", closed: 76, team: "dev" },
{ year: "2021", closed: 84, team: "product" },
{ year: "2020", closed: 238, team: "dev" },
{ year: "2019", closed: 205, team: "dev" }
]
Insert cell
chart_closed_ye(closed_bugs_year)
Insert cell
chart_closed_ti(closed_bugs)
Insert cell
chart_contributions(contributions_2020)
Insert cell
chart_contributions(contributions)
Insert cell
chart_closed_ye = function (contributions) {
return vegalite({
$schema: "https://vega.github.io/schema/vega-lite/v5.json",
title: "Closed bugs in 20222 to datacite organisation by contributor",
data: { values: contributions },
mark: {
type: "bar",
tooltip: true
},
encoding: {
x: { field: "year", type: "temporal", timeUnit: "year" },
y: {
type: "quantitative",
field: "closed"
},
opacity: { value: 0.7 }
}
});
}
Insert cell
chart_closed_ti = function (contributions) {
return vegalite({
$schema: "https://vega.github.io/schema/vega-lite/v5.json",
title: "Closed bugs in 20222 to datacite organisation by contributor",
data: { values: contributions },
mark: {
type: "bar",
tooltip: true
},
encoding: {
x: { field: "contributor", type: "nominal", sort: "y" },
y: {
type: "quantitative",
field: "closed"
},
color: {
field: "team"
},
opacity: { value: 0.7 }
}
});
}
Insert cell
chart_contributions = function (contributions) {
return vegalite({
$schema: "https://vega.github.io/schema/vega-lite/v5.json",
title: "contributions to datacite organisation in github 2022",
data: { values: contributions },
mark: {
type: "bar",
tooltip: true
},
encoding: {
x: { field: "contributor", type: "nominal", sort: "y" },
y: {
type: "quantitative",
field: "contributions"
},
color: {
field: "team"
},
opacity: { value: 0.7 }
}
});
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

Insert cell
Insert cell
import { chart_stacked } from "@kjgarza/vega-charts"
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