Data Visualization with D3.js Cookbook

Turn your digital data into dynamic graphics with this exciting, leading-edge cookbook. Packed with recipes and practical guidance it will quickly make you a proficient user of the D3 JavaScript library.

Data Visualization with D3.js Cookbook

Cookbook
Nick Qi Zhu

Turn your digital data into dynamic graphics with this exciting, leading-edge cookbook. Packed with recipes and practical guidance it will quickly make you a proficient user of the D3 JavaScript library.
$10.00
$44.99
RRP $26.99
RRP $44.99
eBook
Print + eBook
$12.99 p/month

Get Access

Get Unlimited Access to every Packt eBook and Video course

Enjoy full and instant access to over 3000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

+ Collection
Free Sample

Book Details

ISBN 139781782162162
Paperback338 pages

About This Book

  • Create stunning data visualization with the power of D3
  • Bootstrap D3 quickly with the help of ready-to-go code samples
  • Solve real-world visualization problems with the help of practical recipes

Who This Book Is For

If you are a developer familiar with HTML, CSS, and JavaScript, and you wish to get the most out of D3, then this book is for you. This book can also serve as a desktop quick-reference guide for experienced data visualization developers.

Table of Contents

Chapter 1: Getting Started with D3.js
Introduction
Setting up a simple D3 development environment
Setting up an NPM-based development environment
Understanding D3-style JavaScript
Chapter 2: Be Selective
Introduction
Selecting a single element
Selecting multiple elements
Iterating through a selection
Performing subselection
Function chaining
Manipulating the raw selection
Chapter 3: Dealing with Data
Introduction
Binding an array as data
Binding object literals as data
Binding functions as data
Working with arrays
Filtering with data
Sorting with data
Loading data from a server
Chapter 4: Tipping the Scales
Introduction
Using quantitative scales
Using the time scale
Using the ordinal scale
Interpolating a string
Interpolating colors
Interpolating compound objects
Implementing a custom interpolator
Chapter 5: Playing with Axes
Introduction
Working with basic axes
Customizing ticks
Drawing grid lines
Dynamic rescaling of axes
Chapter 6: Transition with Style
Introduction
Animating a single element
Animating multiple elements
Using ease
Using tweening
Using transition chaining
Using transition filter
Listening to transitional events
Implementing a custom interpolator
Working with timer
Chapter 7: Getting into Shape
Introduction
Creating simple shapes
Using a line generator
Using line interpolation
Changing line tension
Using an area generator
Using area interpolation
Using an arc generator
Implementing arc transition
Chapter 8: Chart Them Up
Introduction
Creating a line chart
Creating an area chart
Creating a scatter plot chart
Creating a bubble chart
Creating a bar chart
Chapter 9: Lay Them Out
Introduction
Building a pie chart
Building a stacked area chart
Building a treemap
Building a tree
Building an enclosure diagram
Chapter 10: Interacting with your Visualization
Introduction
Interacting with mouse events
Interacting with a multi-touch device
Implementing zoom and pan behavior
Implementing drag behavior
Chapter 11: Using Force
Introduction
Using gravity and charge
Generating momentum
Setting the link constraint
Using force to assist visualization
Manipulating force
Building a force-directed graph
Chapter 12: Know your Map
Introduction
Projecting the US map
Projecting the world map
Building a choropleth map
Chapter 13: Test Drive your Visualization
Introduction
Getting Jasmine and setting up the test environment
Test driving your visualization – chart creation
Test driving your visualization – SVG rendering
Test driving your visualization – pixel-perfect bar rendering

What You Will Learn

  • Learn how to use functional JavaScript so you can write it the D3 way
  • Select and manipulate HTML and SVG elements efficiently in D3
  • Drive your visualization using data
  • Master D3 scales and interpolators
  • Animate your visualization with style
  • Use SVG and various D3 path generators
  • Explore D3 layouts and understand and leverage D3 force
  • Build mobile-first interactive visualization with touch support
  • Test-drive your visualization implementation
  • Build multi-dimensional data visualization with crossfilter and dc.js in minutes

In Detail

D3.js is a JavaScript library designed to display digital data in dynamic graphical form. It helps you bring data to life using HTML, SVG, and CSS. D3 allows great control over the final visual result, and it is the hottest and most powerful web-based data visualization technology on the market today.

"Data Visualization with D3.js Cookbook" is packed with practical recipes to help you learn every aspect of data visualization with D3.

"Data Visualization with D3.js Cookbook" is designed to provide you with all the guidance you need to get to grips with data visualization with D3. With this book, you will create breathtaking data visualization with professional efficiency and precision with the help of practical recipes, illustrations, and code samples.

"Data Visualization with D3.js Cookbook" starts off by touching upon data visualization and D3 basics before gradually taking you through a number of practical recipes covering a wide range of topics you need to know about D3.

You will learn the fundamental concepts of data visualization, functional JavaScript, and D3 fundamentals including element selection, data binding, animation, and SVG generation. You will also learn how to leverage more advanced techniques such as custom interpolators, custom tweening, timers, the layout manager, force manipulation, and so on. This book also provides a number of pre-built chart recipes with ready-to-go sample code to help you bootstrap quickly.

Authors

Table of Contents

Chapter 1: Getting Started with D3.js
Introduction
Setting up a simple D3 development environment
Setting up an NPM-based development environment
Understanding D3-style JavaScript
Chapter 2: Be Selective
Introduction
Selecting a single element
Selecting multiple elements
Iterating through a selection
Performing subselection
Function chaining
Manipulating the raw selection
Chapter 3: Dealing with Data
Introduction
Binding an array as data
Binding object literals as data
Binding functions as data
Working with arrays
Filtering with data
Sorting with data
Loading data from a server
Chapter 4: Tipping the Scales
Introduction
Using quantitative scales
Using the time scale
Using the ordinal scale
Interpolating a string
Interpolating colors
Interpolating compound objects
Implementing a custom interpolator
Chapter 5: Playing with Axes
Introduction
Working with basic axes
Customizing ticks
Drawing grid lines
Dynamic rescaling of axes
Chapter 6: Transition with Style
Introduction
Animating a single element
Animating multiple elements
Using ease
Using tweening
Using transition chaining
Using transition filter
Listening to transitional events
Implementing a custom interpolator
Working with timer
Chapter 7: Getting into Shape
Introduction
Creating simple shapes
Using a line generator
Using line interpolation
Changing line tension
Using an area generator
Using area interpolation
Using an arc generator
Implementing arc transition
Chapter 8: Chart Them Up
Introduction
Creating a line chart
Creating an area chart
Creating a scatter plot chart
Creating a bubble chart
Creating a bar chart
Chapter 9: Lay Them Out
Introduction
Building a pie chart
Building a stacked area chart
Building a treemap
Building a tree
Building an enclosure diagram
Chapter 10: Interacting with your Visualization
Introduction
Interacting with mouse events
Interacting with a multi-touch device
Implementing zoom and pan behavior
Implementing drag behavior
Chapter 11: Using Force
Introduction
Using gravity and charge
Generating momentum
Setting the link constraint
Using force to assist visualization
Manipulating force
Building a force-directed graph
Chapter 12: Know your Map
Introduction
Projecting the US map
Projecting the world map
Building a choropleth map
Chapter 13: Test Drive your Visualization
Introduction
Getting Jasmine and setting up the test environment
Test driving your visualization – chart creation
Test driving your visualization – SVG rendering
Test driving your visualization – pixel-perfect bar rendering

Book Details

ISBN 139781782162162
Paperback338 pages
Read More