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

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more