This example shows the General Update Pattern, which is required to create things with D3.js that update with dynamic data.
Part of the video course: D3.js in Motion.
See also: