Chapter
Chapter 1: Getting Started with D3
Getting the sources and setting up a web server
Setting up the local web server
Adding rectangles to the group element
Binding the data and updating existing rectangles
Adding new rectangles if needed
Removing elements which aren't needed anymore
Visualizing our first data
Sanitizing and getting the data
Creating the visualization
Grouping the loaded data so we only have the top 10 names for both sexes
Adding the bar chart and baby name
Adding some CSS classes to style the bars and text elements
Adding the axis on the top and bottom
Chapter 2: Basic Charts and Shapes
How long have American firms been in business visualized with pies and donuts
Standard setup, helper objects, and a gray donut
Color interpolation and color schemes
Create the background donut
Individual donut segments
Add the lines from the donut to the text
Making the donut respond to mouse events
Line charts that show income growth
Loading the data and setting up D3 scales
Adding the index line and area gradients
Adding an x-axis with years
Adding a y-axis with absolute income
Adding the y-axis with the index values and the horizontal marker lines
Population growth estimates using a stacked graph
Getting and sanitizing the data
Creating the stacked area chart
Creating the stacked bar chart
Chapter 3: Working with Hierarchical Data
Tree-based visualizations
Getting and sanitizing the data
Converting data into a hierarchical data structure
Using D3 build-in functionality to create a tree
Drawing the tree elements
Adding panning and zooming to the visualization
Rendering the lines, nodes, and text elements
Animating the treemap on initial load
Setting up coloring and draw a legend
Drawing and animating the rectangles
Adding the click event listener to switch the value shown
Alternative visualizations using partition and pack layouts
Data visualized using a partition layout
Data visualized using a pack layout
Chapter 4: Visualizing Graphs
Getting the raw Simpsons data
Getting the relevant information from the database
Converting the data from the database
Creating the force layout
Loading the fonts, setting up the title, and loading the Simpsons logo
Setting up the force simulation
Loading the data and drawing the circles and the lines
Adding images to the circles for the characters
Adding a mouseover effect for selecting and dragging.
Loading and preparing the data
Setting up the simulation
Adding the nodes and running the simulation
Loading and converting the data in D3
Create a chord diagram from the data
Adding a mouseover effect
Setting up the data and the standard D3 components
Filling the matrix with data
Drawing the visualization
Chapter 5: Working with Geo Data
Elections 2016 choropleth
Getting the geometries from the US Census Bureau and exploring these in QGIS
Converting the data to TopoJSON
Getting the results per county
Drawing the visualization
Earthquake data on a flat map
Rendering the earthquake circles
Connect the html elements
Getting and sanitize the data
Render the globe on a HTML canvas
Setting up the HTML page and the output elements
Loading the data and drawing the map
Chapter 6: Visualizing Streaming Data
Setting up the animations and the graphs
Clip path and extra information
Heart rate and respiratory monitoring
Setting up the WebSocket server
Creating the visualization
Scales, lines, and array initialization
Loading the images and setting up the WebSocket connection
Handling the update from the server
Random data-driven streamgraph
Random data WebSocket server
Setting up the scales and the generators
Defining the data and the transition
Visualizing Meetup.com RSVP data on a map
Connecting to the Meetup WebSocket
Showing the information on the map
Chapter 7: Voronoi Diagrams and Heatmaps
Voronoi based on a list of airports
Show the points on the map
Generative art with nested Voronoi diagrams
Recursively creating Voronoi diagrams
Heatmap showing swearword usage in movies
Add the minutes information
Chapter 8: Custom Shapes and Paths and Using a Brush Selection
Using d3.path to draw paths
Drawing using the path API
Exporting visualizations as PNG
Converting the SVG element to a string
Using the canvas to get a PNG file
Exporting visualizations as SVG and importing them in an external program
Importing SVG from Inkscape and use in D3
Using brushes to select elements
Chapter 9: ES6, TypeScript, and External D3.js Libraries
Using D3 with ES6 and TypeScript
Arrow functions and method shorthand
Block-scoped binding constructs (let + const)
Using types in your editor
Preventing errors with compile-time checking of types
Handling complex type signatures
External charting libraries