Book Image

Data Visualization with D3 4.x Cookbook - Second Edition

By : Nick Zhu
Book Image

Data Visualization with D3 4.x Cookbook - Second Edition

By: Nick Zhu

Overview of this book

Master D3.js and create amazing visualizations with the Data Visualization with D3 4.x Cookbook. Written by professional data engineer Nick Zhu, this D3.js cookbook features over 65 recipes. ? Solve real-world visualization problems using D3.js practical recipes ? Understand D3 fundamentals ? Includes illustrations, ready-to-go code samples and pre-built chart recipes
Table of Contents (21 chapters)
Data Visualization with D3 4.x Cookbook - Second Edition
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Introduction


As a data visualization developer, one of the key tasks that you will need to perform over and over is to map values from your data domain to your visual domain; for example, mapping your most recent purchase of a fancy tablet of $453.00 to a 653-px-long bar, and your last night's pub bill of $23.59 to a 34-px-long bar. In a sense, this is what data visualization is all about, mapping data elements to their visual metaphor in an efficient and accurate manner. Because this is an absolutely essential task in data visualization and animation (animation will be discussed in Chapter 6, Transition with Style, in detail), D3 provides rich and robust support on this topic, which is the focus of this chapter.

What are scales?

D3 provides various constructs called scales to help you perform this kind of mapping. A proper understanding of these constructs conceptually is crucial to become an effective visualization developer. This is because scales are used not only to perform the mapping...