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

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