Learning d3. Some code snippets from the tutorials.