Published
Edited
Apr 15, 2022
Insert cell
Insert cell
old_data = FileAttachment("penguins.csv").csv({typed: true})
Insert cell
Plot.plot({
y: {
grid: true
},
color: {
legend: true
},
marks: [
Plot.rectY(data, Plot.binX({y: "count"}, {x: "Date"})),
Plot.ruleY([0])
]
})
Insert cell
Plot.plot({
y: {
grid: true
},
color: {
legend: true
},
marks: [
Plot.rectY(data, Plot.binX({y: "count"}, {x: "Date", thresholds: d3.timeMonth})),
Plot.ruleY([0])
]
})
Insert cell
file = FileAttachment("tcx_time_distribution@1.csv").csv()
Insert cell
data = file.map(item => ({ Date: parseDate(item.Date) }))
Insert cell
d3 = require("d3@6")
Insert cell
parseDate = d3.timeParse("%d/%m/%Y")
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