Published
Edited
Sep 30, 2022
6 stars
Neuefische Yearly Bootcamp Event Planner
Voronoi Treemap - Data Science Process
Insert cell
Insert cell
Insert cell
displaydata=data.map(d => {return {city: tracks[d.track],start: d.target}})
Insert cell
Insert cell
tracks = ["Hamburg", "Cologne", "Munich", "Remote"]
Insert cell
bootcamp_days = 12 * 7
Insert cell
t = function (d) {
return Math.trunc(d / 120);
}
Insert cell
monday = function(d){
return d3.timeDay.offset(d, - d.getDay() + 1)
}
Insert cell
formatTime = d3.timeFormat("%B %d")
Insert cell
x = d3
.scaleTime()
.domain([
new Date("2023-01-01T00:00"),
new Date(new Date("2023-12-31T24:00Z"))
])
.rangeRound([margin.left, width - margin.right])
Insert cell
interval = d3.timeDay.every(1)
Insert cell
xAxis = g => g
.attr("transform", `translate(0,${height - margin.bottom})`)
.call(g => g.append("g")
.call(d3.axisBottom(x)
.ticks(interval)
.tickSize(-height + margin.top + margin.bottom)
.tickFormat(() => null))
.call(g => g.select(".domain")
.attr("fill", "#FB734B")
.attr("stroke", null))
.call(g => g.selectAll(".tick line")
.attr("stroke", "#FCE584")
.attr("stroke-opacity", d => d <= d3.timeMonth(d) ? 0 : 1))) // mark beginning of month
.call(g => g.append("g")
.call(d3.axisBottom(x)
.ticks(d3.timeMonth)
.tickPadding(0))
.attr("text-anchor", null)
.call(g => g.select(".domain").remove())
.call(g => g.selectAll("text").attr("x", 6)))
Insert cell
margin = ({top: 10, right: 0, bottom: 20, left: 100})
Insert cell
height = tracks.length * 120
Insert cell
d3 = require("d3@5")
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