Binding Data

		...

		var data = [
			{name: "one", height: 34, weight: 870, colour: "red"},
			{name: "two", height: 12, weight: 650, colour: "green"},
			{name: "three", height: 25, weight: 330, colour: "blue"},
		];


		svg.selectAll("circle")
			.data(data)
			.enter()
			.append("circle")
			.attr("r", 10)
			.attr("cx", 100)
			.attr("cy", 100)		
	

More from Mike Bostock:

Thinking with joins How selections work