Published
Edited
Aug 28, 2022
1 star
Insert cell
Insert cell
import {
chartHisto,
chart,
chart_stacked,
multi_series
} from "@kjgarza/vega-charts"
Insert cell
chart(issues)
Insert cell
chartHisto(pub, "publication_year")
Insert cell
chartHisto(histo, "created")
Insert cell
chartHisto(registered, "registered")
Insert cell
registered = d3.csv(
"https://raw.githubusercontent.com/kjgarza/datasets/main/contributorTypes/registered_client_20220718_v0.csv"
)
Insert cell
Insert cell
Insert cell
Insert cell
z = require("https://bundle.run/zebras@0.0.11")
Insert cell
calculate_growth_rate = function (data, date) {
z.sortByCol("publication_year", "asc", data);
var caca = z.gbSum(
"Count",
z.groupBy((d) => d.publication_year, data)
);
var growth = z.getCol("sum", caca);
var zdata = z.pctChange(growth);
return z.addCol("growth", zdata, caca);
}
Insert cell
multi_series(calculate_growth_rate(pub, "publication_year"))
Insert cell
calculate_growth_rate(z.slice(2, 1000, registered), "publication_year")
Insert cell
registered
Insert cell
registered
Insert cell
Inputs.table(pub, {
layout: "auto",
columns: ["publication_year", "contributorType", "Count"],
format: {
html_url: (html_url, i, data) =>
htl.html`<a href="${html_url}">${data[i].number}</a>`,
user: (user) => user.login,
created_at: (created_at) => d3.timeFormat("%x %X")(new Date(created_at))
}
})
Insert cell
chart_stacked(issues, "contributorType")
Insert cell
chart_stacked(issues, "keyword")
Insert cell
software_data = d3.csv(
"https://raw.githubusercontent.com/kjgarza/datasets/main/contributorTypes/software_client_20220718_v0.csv"
)
Insert cell
chart_stacked(
software_data.filter((element) => {
return element.software != "__missing__";
}),
"software"
)
Insert cell
chart_stacked(software_data, "software")
Insert cell
publisher = d3.csv(
"https://raw.githubusercontent.com/kjgarza/datasets/main/contributorTypes/publisher_registered_20220718_v0.csv"
)
Insert cell
chart_stacked(publisher, "publisher")
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