Public
Edited
Dec 14, 2022
Fork of Workshop
Insert cell
Insert cell
url = "https://vikusviewer.fh-potsdam.de/data/vangogh/data.csv"
Insert cell
data = d3.csv(url)
Insert cell
viewof table = Inputs.table(data)
Insert cell
data[0]
Insert cell
![](https://vikusviewer.fh-potsdam.de/data/vangogh/1024/${data[11].id}.jpg)
Insert cell
dataParsed = data.map(d => {
const keywords = d.keywords.split(",")
const aspectRatio = (d._width / d._height).toFixed(1)
return { ...d, keywords, keywords, aspectRatio }
})
Insert cell
dataParsed.map( d => d.keywords.map(k => ({ keyword: k, ...d })))
Insert cell
dataParsed[0]
Insert cell
d3.group(data, d => d.year)
Insert cell
d3.group(data, d => d._material)
Insert cell
Plot.plot({
marks: [
Plot.barX(dataParsed, Plot.groupY({x: "count"}, {y: "year", sort: {y: "x", reverse: true, limit: 10}})),
Plot.ruleX([0])
]
})
Insert cell
Plot.plot({
marks: [
Plot.barX(dataParsed, Plot.groupY({x: "count"}, {y: "_material", sort: {y: "x", reverse: true, limit: 10}})),
Plot.ruleX([0])
]
})
Insert cell
Plot.plot({
marks: [
Plot.barX(dataParsed, Plot.groupY({x: "count"}, {y: "aspectRatio", sort: {y: "x", reverse: true, limit: 10}})),
Plot.ruleX([0])
]
})
Insert cell
Plot.plot({
marks: [
Plot.tickX(dataParsed, {x: "id", y: "year"})
]
})
Insert cell
Plot.plot({
marks: [
Plot.rectY(dataParsed, Plot.binX({y: "count"}, {x: "year"})),
Plot.ruleY([0])
]
})
Insert cell
Plot.plot({
height: 400,
marks: [
Plot.dot(data, Plot.dodgeY({x: "year"}))
]
})
Insert cell
Plot.plot({
marks: [
Plot.voronoi(dataParsed, {x: "year", y: "_material", fill: "year", stroke: "white"})
]
})
Insert cell
Plot.plot({
marginLeft: 200,
marks: [
Plot.density(data, { x: "year", y: "_material" })
]
})
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