Public
Edited
Jul 11, 2023
2 forks
32 stars
Global temperature trendsBeeswarm, Log ScaleContoursDensity contoursBubble chart componentCircle packing componentExploring Data with Vega-LiteStreaming data into VegaVega-Lite Line ChartBrushable scatterplotVega-Lite ScatterplotNight Skies — Lights and Light Pollution WebGL GlobePhysics based t-SNEGraphvizRidgeline plotZoomable sunburstHierarchical edge bundlingMethods of Comparison, ComparedChord diagramA Guide to Guides: Axes & Legends in VegaPSR B1919+21HexbinStacked-to-grouped barsTree of LifeHeat indexZoomable circle packingMarimekkoVizsla and Vega-LiteDirectly labelling linesParallel coordinatesCollapsible treeTangled tree visualizationMarey’s TrainsWorld History TimelineSmall multiple chart cartogramThe Real MVP in the NBAAnimated treemapDensity Contour Matrix with BrushingStars and constellationsHertzsprung–Russell diagramThe Coronavirus landscape
GitHub Burndown
Candlestick ChartConcentration values vs. TimeA few days of CO2 levels in my homeIrregular bins histogramELD ViewerDistributions and summary statistics - a collection of Plot examplesMermaidBivariate Bubble MapD3 galleryCalendarStacked bar chartDot plotConnected scatterplotCandlestick chartHistogramForce-directed graphDisjoint force-directed graphIndex chartSankey diagramLine chart, percent changeStacked area chartBubble chartArea chartHorizontal bar chartRadial tidy treeCircle packingIcicleStreamgraphTidy treeCluster treeSunburstHorizon chartBox plotScatterplotDifference chartBand chartBar chart transitionsTreemapLine chart, multiple seriesScatterplot matrixBrushable scatterplot matrixPlayfair's Wheat and Wages
Also listed in…
Plot Examples
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
data = {
if (!form.repo) {
yield [];
return;
}

let issues = [];
let pageNumber = 1;

while (true) {
const params = new URLSearchParams({
per_page: "100",
state: "all",
page: pageNumber
});
const data = await fetch(
`https://api.github.com/repos/${form.repo}/issues?${params.toString()}`,
{
headers: {
Authorization: form.token ? `token ${form.token}` : undefined,
Accept: "application/vnd.github.v3+json"
}
}
).then((r) => r.json());
issues = [...issues, ...data];
pageNumber++;
yield issues;
if (!data.length) return;
await Promises.delay(100);
}
}
Insert cell
cast = data
.filter((i) => {
switch (kind) {
case "Both":
return true;
case "Issues":
return !i.pull_request;
case "Pull requests":
return !!i.pull_request;
}
})
.map((d) => {
return {
...d,
created_at: new Date(d.created_at),
closed_at: d.closed_at && new Date(d.closed_at),
updated_at: new Date(d.updated_at)
};
})
Insert cell
Insert cell
function pulse(sources, lifeof, interval = d3.utcDay) {
return sources.flatMap((source) => {
const [start, end] = lifeof(source);
const dates = interval.range(interval.offset(interval.floor(start), -1), interval.offset(interval.floor(end), 2));
return dates.map((date, i) => {
return {
...source,
value: i === 0 || i === dates.length - 1 ? 0 : 1,
date
};
});
});
}
Insert cell
today = d3.utcDay(new Date)
Insert cell
expanded = pulse(cast, d => [d.created_at, d.closed_at ?? today])
Insert cell
Insert cell
domain = [d3.min(cast, d => d3.utcDay(d.created_at)), d3.utcDay.offset(today)]
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