Public
Edited
Jan 31, 2024
Insert cell
Insert cell
Insert cell
Insert cell
literature
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
benchmark_datasets
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
Insert cell
{
let d = []

let allliteratureyears = [...new Set(literature.map(l => parseInt(l["year"])))].sort().filter(y => y > 2000)
let allbenchmarkdatasets = [...new Set(literature.map(l => l["Dataset tag relations"].split(",").map(a => a.split("(")[0])).flat())].filter(a => a != "")
allbenchmarkdatasets = allbenchmarkdatasets.filter(b => !b.includes("Custom"))
allbenchmarkdatasets = allbenchmarkdatasets.slice(0, 20)

console.log(allbenchmarkdatasets, allliteratureyears)

for (let dataset of allbenchmarkdatasets){
let literature_entries_with_this_dataset = literature.filter(l => l["Dataset tag relations"].includes(dataset))
let literature_years = [...new Set(literature_entries_with_this_dataset.map(l => l.year))]

for (let year of allliteratureyears){
let count = literature_entries_with_this_dataset.filter(l => l.year == year).length
d.push({dataset: dataset, year: parseInt(year), count: count})
}
}

d = d.sort((a, b) => a.year > b.year)
console.log(d)
return Plot.plot({
color: {
legend: true,
type: "categorical",
// domain: d3.range(10).map((d) => `Category ${d + 1}`),
scheme: "accent" // use the "accent" scheme
},
y: {
// tickFormat: "s"
},
marks: [
Plot.areaY(d, {x: "year", y: "count", fill: "dataset"}),
// Plot.lineY(d, {x: "year", y: "count"}),
Plot.ruleY([0])
]
})
}
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