D3.js
Also known as: D3, Data-Driven Documents
JavaScript library by Mike Bostock for creating custom, data-driven visualizations by binding data to web page elements such as SVG.
D3.js, short for Data-Driven Documents, is a JavaScript library for producing interactive data visualizations in web browsers. Instead of offering ready-made chart types, it provides building blocks: selections that bind data to elements of the Document Object Model, scales that map values to positions and colors, axes, shapes, transitions, geographic projections and layouts for networks and hierarchies. Developers combine these to render custom graphics with web standards such as SVG, Canvas and HTML.
Mike Bostock created D3 in 2011 with Jeff Heer and Vadim Ogievetsky at the Stanford Visualization Group, as a successor to their earlier Protovis toolkit, and described it in a research paper that year. Its central idea, the data join, matches data items to page elements and handles entering, updating and exiting elements as data changes. Since version 4 in 2016 the library has been split into independent modules. Bostock later co-founded Observable, a platform for data notebooks closely associated with D3.
D3 became a standard tool of data journalism and research visualization, including graphics Bostock worked on at The New York Times. Its flexibility allows designs that conventional charting libraries cannot express, but it has a steep learning curve and requires more code for simple charts. Many higher-level charting libraries build on D3 modules, and its approach has influenced how open data is explored and presented on the web.
Key points
- D3 binds data to web page elements and renders custom visualizations with SVG, Canvas or HTML.
- Mike Bostock created D3 with Jeff Heer and Vadim Ogievetsky in 2011.
- It provides low-level building blocks rather than prebuilt chart types.
- D3 is widely used in data journalism and research visualization.
Related entries
Mike Bostock
American computer scientist and data visualization specialist who created the D3.js library and co-founded the Observable data notebook platform.
JavaScript
High-level programming language of the web, created at Netscape in 1995, that runs in every major browser and on servers through runtimes like Node.js.
Document Object Model
Programming interface that represents a web page as a tree of objects, letting scripts read and change its content, structure and style.
Open Data
Data that anyone can freely access, use, modify and share for any purpose, subject at most to requirements that preserve provenance and openness.
HTML
Markup language used to structure content on the World Wide Web, describing headings, paragraphs, links, images and interactive elements.
React
Open-source JavaScript library from Meta for building user interfaces out of reusable components that update efficiently when data changes.
CSS
Style sheet language that controls the layout, colors, typography and visual presentation of HTML documents on the web.