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

This ebook is included in a Mapt subscription

Nick ZhuOctober 2013

1 customer reviews

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.

Book Details

ISBN 139781782162162

Paperback338 pages

Book Description

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.

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

Authors

Nick Zhu

Nick Zhu is a professional programmer and data engineer with more than a decade experience in software development, big data, and machine learning. Currently, he is one of the founders and CTO of Yroo.com - meta search engine for online shopping. He is also the creator of dc.js—a popular multidimensional charting library built on D3.

Alerts & Offers

Series & Level

We understand your time is important. Uniquely amongst the major publishers, we seek to develop and publish the broadest range of learning and information products on each technology. Every Packt product delivers a specific learning pathway, broadly defined by the Series type. This structured approach enables you to select the pathway which best suits your knowledge level, learning style and task objectives.

Learning

As a new user, these step-by-step tutorial guides will give you all the practical skills necessary to become competent and efficient.

Beginner's Guide

Friendly, informal tutorials that provide a practical introduction using examples, activities, and challenges.

Essentials

Fast paced, concentrated introductions showing the quickest way to put the tool to work in the real world.

Cookbook

A collection of practical self-contained recipes that all users of the technology will find useful for building more powerful and reliable systems.

Blueprints

Guides you through the most common types of project you'll encounter, giving you end-to-end guidance on how to build your specific solution quickly and reliably.

Mastering

Take your skills to the next level with advanced tutorials that will give you confidence to master the tool's most powerful features.

Starting

Accessible to readers adopting the topic, these titles get you into the tool or technology so that you can become an effective user.

Progressing

Building on core skills you already have, these titles share solutions and expertise so you become a highly productive power user.