Published
Edited
Apr 4, 2022
7 stars
Plot: A few custom time axesAccess to Family planningPlot: MarimekkoAutoplot matrixWhat do people buy on Bandcamp?Plot: colorContrast transformA Timeline of Democratic Presidential CandidatesPlot: Diverging stacked barsPlot: Horizon ChartPlot: Ridgeline PlotTwo-Tone Pseudo Color Scales with Observable Plot & Vega-LiteRecreating Östling’s regression visualizationsError barsPlot: regressionSkies PlotHorizon graph & Barcode with PlotTemporal AliasingPlot for mathematiciansPlot Isotype dot plotCOVID-19 Netherlands Reproduction Number TutorialPlot Mountain SunsetSpine chartsGreenhouse gas emission projectionsRaincloud Plots with Observable PlotUpset Plots with Observable PlotExploring CIELChabNature variant waves graphicWhen Presidents Fade AwayThe Coronavirus landscapeOur World In Data charts visualisationThe normal modelVisualizing The New York Times’s Mini CrosswordDistributions and summary statistics - a collection of Plot examplesVariants of SARS-Cov-2 in EuropeLaid off: 6 million jobs and countingConcentration values vs. TimeTopological subsamplingPlot of plotsCyclical time scale, v2Bullet graph IIPlot: Bullet graphCyclical time scaleRoad traffic under COVID restrictions (France)K-means binningMatrix diagramELD ViewerHappy anniversary, Project Gutenberg!ROC curvePlot stargazer historyPlot HyperboloidPhone bar plotsLog-scale histogram
Database Outage Plot
Bertin’s hotelIreland’s top trade partnersBump chartBubble MatrixRenko ChartGitHub BurndownPlot: Grid choroplethCandlestick Chart
Insert cell
Insert cell
// fake time of the postgres fix 🪄
tfix = new Date(Date.UTC(2021, 4, 19, 21))
Insert cell
simulated = {
const random = d3.randomPareto(1);

// start date
let t0 = new Date(Date.UTC(2021, 4, 17));

// the interval between queries is random and depends on the time of the day
const density = (t) => 0.1 + Math.cos(1 + (t.getHours() / 24) * Math.PI) ** 2;

// query duration is random, but the denser the number of queries, the slower it gets
// after the fix, it becomes immediately much better: the base time is reduced from 3s to 10ms
// and the lag is 100x better
const duration = (t) =>
(t < tfix ? 0.1 : 0.1) +
Math.min(15 * density(t) * (t < tfix ? 1 : 0.01) * (random() - 1), 30);

return Array.from({ length: 14000 }, () => ({
time: (t0 = new Date(+t0 + 12000 * d3.randomExponential(density(t0))())),
duration: duration(t0)
}));
}
Insert cell
Plot.dot(simulated, { x: "time", y: "duration", r: 1, fill: "black" }).plot({
marks: [Plot.tickX([tfix], { stroke: "brown" }), Plot.tickY([0])]
})
Insert cell
Plot.plot({
color: { scheme: "ylgnbu", type: "sqrt" },
marks: [
Plot.rect(
simulated,
Plot.bin(
{ fill: "count" },
{ x: "time", y: "duration", r: 1, thresholds: 50 }
)
),
Plot.lineY(
simulated,
Plot.binX(
{ y: "median" },
{ x: "time", y: "duration", r: 1, thresholds: 50, curve: "step" }
)
),
Plot.tickX([tfix], { stroke: "brown" }),
Plot.tickY([0])
]
})
Insert cell
Insert cell
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