
- 308 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
D3.js 4.x Data Visualization - Third Edition
About this book
Create and publish your own interactive and compelling data visualizations with D3.js 4.xAbout This Book• Build interactive and rich graphics and visualization using JavaScript`s powerful library D3.js• Learn D3 from the ground up, using the all-new version 4 of the library• Gain insight into producing high-quality, extensible charts and visualizations using best practices such as writing testable, extensible code and strong typingWho This Book Is ForThis book is for web developers, interactive news developers, data scientists, and anyone interested in representing data through interactive visualizations on the Web with D3. Some basic knowledge of JavaScript is expected, but no prior experience with data visualization or D3 is required to follow this book.What You Will Learn• Map data to visual elements using D3's scales• Draw SVG elements using D3's shape generators• Transform data using D3's collection methods• Use D3's various layout patterns to quickly generate various common types of chart• Write modern JavaScript using ES2017 and Babel• Explore the basics of unit testing D3 visualizations using Mocha and Chai• Write and deploy a simple Node.js web service to render charts via HTML Canvas• Understand what makes a good data visualization and how to use the tools at your disposal to create accurate chartsIn DetailWant to get started with impressive interactive visualizations and implement them in your daily tasks? This book offers the perfect solution-D3.js. It has emerged as the most popular tool for data visualization.This book will teach you how to implement the features of the latest version of D3 while writing JavaScript using the newest tools and techniqueYou will start by setting up the D3 environment and making your first basic bar chart. You will then build stunning SVG and Canvas-based data visualizations while writing testable, extensible code, as accurate and informative as it is visually stimulating. Step-by-step examples walk you through creating, integrating, and debugging different types of visualization and will have you building basic visualizations (such as bar, line, and scatter graphs) in no time.By the end of this book, you will have mastered the techniques necessary to successfully visualize data and will be ready to use D3 to transform any data into an engaging and sophisticated visualization.Style and approachThis book follows a tutorial-based approach in teaching the world's most powerful data visualization library, D3.
Tools to learn more effectively

Saving Books

Keyword Search

Annotating Text

Listen to it instead
Information
Making Data Useful
Thinking about data functionally
Built-in array functions
- Array.prototype.map applies a function on every element of an array and returns a new array with changed values:
> [1,2,3,4].map(d => d+1)
[ 2, 3, 4, 5 ]
- Array.prototype.reduce uses a combining function and a starting value to collapse an array into a single value:
> [1,2,3,4].reduce((acc, curr) => acc + curr, 0)
10
- Array.prototype.filter goes through an array and keeps elements for which the predicate returns true:
> [1,2,3,4].filter(d => d%2)
[ 1, 3 ]
- Two more useful functions are Array.prototype.every and Array.prototype.some, which are true if every or some items in the array are true:
// Are all elements odd?
[1,3,5,7,9].every(elem => elem % 2); // True
[1,2,5,7,9].every(elem => elem % 2); // False
// Is at least one odd?
[1,3,5,7,9].some(elem => elem % 2); //...
Table of contents
- Title Page
- Copyright
- Credits
- About the Authors
- About the Author2
- About the Reviewer
- www.PacktPub.com
- Customer Feedback
- Preface
- Getting Started with D3, ES2017, and Node.js
- A Primer on DOM, SVG, and CSS
- Shape Primitives of D3
- Making Data Useful
- Defining the User Experience - Animation and Interaction
- Hierarchical Layouts of D3
- The Other Layouts
- D3 on the Server with Canvas, Koa 2, and Node.js
- Having Confidence in Your Visualizations
- Designing Good Data Visualizations
Frequently asked questions
- Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
- Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app