block by emeeks d0cec4c2e294e3bcd0b4

Ch. 2, Fig. 25 - D3.js in Action

Full Screen

This is the code for Chapter 2, Figure 25 from D3.js in Action that draws a scatterplot from loaded JSON data. For each datapoint in the loaded data, an SVG g element is rendered, each of which has an SVG circle and SVG text element as children. The g element is placed according to the attributes of the data, while the circle element is sized according to the data and the text element has its .text() populated from the data.

index.html

tweets.json