Published
Edited
Mar 18, 2021
3 forks
Importers
35 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 packingMarimekko
Vizsla and Vega-Lite
Directly 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 landscapeGitHub BurndownCandlestick 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
Insert cell
Insert cell
vz(cars)
.x('Horsepower')
.y('Miles_per_Gallon')
.color('Origin', 'n')
.plot()
Insert cell
vz(cars)
.bar()
.x(true) //count shortcut
.y('Origin', 'n')
.plot()
Insert cell
Insert cell
rule = vz(sp500)
.rule()
.x('date', 't')
.y('price');
Insert cell
line = rule.copy()
.line();
Insert cell
Insert cell
vz.layer(rule, line)
.width(600)
.plot()
Insert cell
Insert cell
vz.layer(
vz(sp500)
.rule(),
vz(sp500)
.line())
.x('date', 't')
.y('price')
.width(600)
.plot()
Insert cell
Insert cell
vz.hconcat(rule, line)
.plot()
Insert cell
Insert cell
vz(cars)
.x('Horsepower')
.y('Miles_per_Gallon')
.color('Origin', 'n')
.column('Origin', 'n')
.plot()
Insert cell
Insert cell
vz.facet(
vz(cars)
.x('Horsepower')
.y('Miles_per_Gallon')
.color('Origin', 'n'))
.column('Origin', 'n')
.plot()
Insert cell
Insert cell
vz.repeat(
vz(cars)
.bar()
.x(false, 'q', {bin: true}) //no field required - repeat sets the field of (a copy of) the inner spec
.y(true) //count shortcut
.color('Origin', 'n'))
.across('x', ['Horsepower', 'Miles_per_Gallon', 'Acceleration'])
.plot()
Insert cell
Insert cell
vz.vconcat(
vz(sp500)
.width(480)
.mark('area')
.x('date', 't', {
scale: {domain: {selection: 'brush'}},
axis: {title: ''}})
.y('price'),
vz(sp500)
.width(480)
.height(60)
.mark('area')
.selection({brush: {type: 'interval', encodings: ['x']}})
.x('date', 't')
.y('price'))
.plot()
Insert cell
Insert cell
{
const base = vz(sp500)
.width(480)
.mark('area')
.y('price');
const upper = base.copy()
.x('date', 't', {
scale: {domain: {selection: 'brush'}},
axis: {title: ''}});
const lower = base.copy()
.height(60)
.selection({brush: {type: 'interval', encodings: ['x']}})
.x('date', 't');

return vz.vconcat(upper, lower)
.plot()
}
Insert cell
Insert cell
vz.layer(
vz(boros, {format: {type: 'topojson', feature: 'boroughs'}})
.geoshape({fill: 'lightgray', stroke: 'white'}),
vz.layer(
vz(centroids)
.circle(),
vz(centroids)
.text({dy: -6, limit: 70}) //text mark
.label('name', 'n')) //label is the text channel
.longitude('cx')
.latitude('cy'))
.width(600)
.height(500)
.title('London Boroughs')
.plot();
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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