JavaScript is a general-purpose language widely used to create interactive behavior in web browsers and data visualizations. Front-end web development is closely associated with JavaScript, whose asynchronous nature can make execution timing difficult to follow. section 1.5.3
For visualization, JavaScript commonly works with D3, a free, open-source library for building data-driven documents. D3 uses SVG, HTML5, and CSS, and can turn a small fruit dataset into a bar chart with roughly 50 lines of code. section 1.5.3
A basic D3 bar chart
A fruit-data bar chart demonstrates how JavaScript and D3 can produce an interactive web visualization; similar work appears in online journalism such as The New York Times. section 1.5.3
Inspect the basic D3 bar chart as a concrete example of JavaScript-based visualization. section 1.5.3











