Published
Edited
Jun 5, 2019
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
repos =repos_1.concat(repos_2)
Insert cell
mappings = {
return {
"AGPL-3.0": "AGPL",
"Apache License 2.0": "Apache",
"ALv2":"Apache",
"Apache":"Apache",
"Apache 2.0": "Apache",
"Apache-2.0": "Apache",
"BSD-2-Clause": "BSD",
"BSD-3-Clause": "BSD",
"Creative Commons Zero (CC0)": "CC0",
"CC0-1.0": "CC0",
"GNU General Public License v2.0": "GPL",
"GPLv2": "GPL",
"GPL-2.0": "GPL",
"GPL-2.1": "GPL",
"GPL.v3": "GPL",
"GPL-3.0": "GPL",
"GPLV2": "GPL",
"GPLv3": "GPL",
"GPLv6": "GPL",
"LGPL-2.1": "LGPL",
"LGPL-3.0": "LGPL",
"Mozilla Public License": "MPL",
"MPL-2.0": "MPL",
"NASA Open Source": "NASA",
"NASA Open Source Agreement Version 1.3": "NASA",
"NASA Open Source v1.3": "NASA",
"NASA v3": "NASA"
};
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
data = licenses_normalized
Insert cell
//import { chart } with { data, height } from "@mbostock/d3-bar-chart@172"
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
import {select} from "@jashkenas/inputs"
Insert cell
d3 = require("d3@5")
Insert cell
x = d3.scaleBand()
.domain(data.map(d => d.name))
.range([margin.left, width - margin.right])
.padding(0.1)
Insert cell
y = d3.scaleLinear()
.domain([0, d3.max(data, d => d.value)]).nice()
.range([height - margin.bottom, margin.top])
Insert cell
margin = ({top: 20, right: 0, bottom: 30, left: 40})
Insert cell
xAxis = g => g
.attr("transform", `translate(0,${height - margin.bottom})`)
.call(d3.axisBottom(x).tickSizeOuter(0))
Insert cell
yAxis = g => g
.attr("transform", `translate(${margin.left},0)`)
.call(d3.axisLeft(y))
.call(g => g.select(".domain").remove())
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