Public
Edited
Oct 18, 2024
1 fork
3 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
iwidth = 900
Insert cell
Insert cell
timePartOptions = ["year", "month", "date", "hours", "minutes", "seconds"]
Insert cell
viewof timeTruncate = html`<input type="range" min=0 max=${timePartOptions.length} value="3" style="width:100px"/>`
Insert cell
viewof unitsX = select({
options: timeUnitOptions,
value: ["hours"],
title: "x"
})
Insert cell
viewof unitsY = select({
options: timeUnitOptions,
value: ["day"],
title: "y"
})
Insert cell
timeTruncateSelected = timePartOptions.slice(0, timeTruncate).join("")
Insert cell
data = FileAttachment("chi2019Tweets.csv")
.text()
.then(d3.csvParse)
Insert cell
import { vl } from "@vega/vega-lite-api"
Insert cell
d3 = require("d3-dsv", "d3-time-format")
Insert cell
import { select } from "@jashkenas/inputs"
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