Data Visualization with D3.js Cookbook
eBook - ePub

Data Visualization with D3.js Cookbook

  1. 338 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Data Visualization with D3.js Cookbook

About this book

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.

Approach

Packed with practical recipes, this is a step-by-step guide to learning data visualization with D3 with the help of detailed illustrations and code samples.

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.

Tools to learn more effectively

Saving Books

Saving Books

Keyword Search

Keyword Search

Annotating Text

Annotating Text

Listen to it instead

Listen to it instead

Data Visualization with D3.js Cookbook


Table of Contents

Data Visualization with D3.js Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Getting Started with D3.js
Introduction
Setting up a simple D3 development environment
Getting Ready
How to do it...
How it works...
There's more...
How to get source code
Setting up an NPM-based development environment
Getting Ready
How to do it...
How it works...
There's more...
Setup a local HTTP server
Python Simple HTTP Server
Node.js HTTP Server
Understanding D3-style JavaScript
Getting ready
How to do it...
How it works...
Functions are objects
Static variable scoping
Variable-parameter function
Function chaining
There's more...
Finding and sharing code
How to get help
2. Be Selective
Introduction
Selecting a single element
Getting ready
How to do it...
How it works...
Selecting multiple elements
Getting ready
How to do it...
How it works...
Iterating through a selection
Getting ready
How to do it...
How it works...
Performing subselection
Getting ready
How to do it...
How it works...
Function chaining
Getting ready
How to do it...
How it works...
Manipulating the raw selection
Getting ready
How to do it...
How it works...
3. Dealing with Data
Introduction
The enter-update-exit pattern
Binding an array as data
Getting Ready
How to do it...
How it works...
Binding object literals as data
Getting Ready
How to do it...
How it works...
Binding functions as data
Getting Ready
How to do it...
How it works...
Working with arrays
Getting Ready
How to do it...
How it works...
Filtering with data
Getting Ready
How to do it...
How it works...
Sorting with data
Getting Ready
How to do it...
How it works...
Loading data from a server
Getting Ready
How to do it...
How it works...
4. Tipping the Scales
Introduction
What are scales?
Using quantitative scales
Getting Ready
How to do it...
How it works...
There's more...
Using the time scale
Getting Ready
How to do it...
How it works...
There's more...
See also
Using the ordinal scale
Getting Ready
How to do it...
How it works...
Interpolating a string
Interpolator
Getting Ready
How to do it...
How it works...
There's more...
Interpolating colors
Getting Ready
How to do it...
How it works...
See also
Interpolating compound objects
Getting Ready
How to do it...
How it works...
Implementing a custom interpolator
Getting Ready
How to do it...
How it works...
See also
5. Playing with Axes
Introduction
Working with basic axes
Getting Ready
How to do it...
How it works...
Customizing ticks
Getting Ready
How to do it...
How it works...
Drawing grid lines
Getting Ready
How to do it...
How it works...
Dynamic rescaling of axes
Getting Ready
How to do it...
How it works...
6. Transition with Style
Introduction
What is Transition?
Animating a single element
Getting Ready
How to do it...
How it works...
Animating multiple elements
Getting Ready
How to do it...
How it works...
Using ease
Getting Ready
How to do it...
How it works...
Using tweening
Getting Ready
How to do it...
How it works...
There's more...
Using transition chaining
Getting Ready
How to do it...
How it works...
Using transition filter
Getting Ready
How to do it...
How it works...
See also
Listening to transitional events
Getting Ready
How to do it...
How it works...
Implementing a custom interpolator
Getting Ready
How to do it...
How it works...
Working with timer
Getting Ready
How to do it...
How it works...
See also
7. Getting into Shape
Introduction
What is SVG?
Vector
Scalability
Creating simple shapes
Getting Ready
How to do it...
How it works...
There's more...
D3 SVG shape generators
See also
Using a line generator
Getting Ready
How to do it...
How it works...
See also
Using line interpolation
Getting Ready
How to do it...
How it works...
Changing line tension
Getting Ready
How to do it...
How it works...
Using an area generator
Getting Ready
How to do it...
How it works...
Using area interpolation
Getting Ready
How to do it...
How it works...
There's more...
See also
Using an arc generator
Getting Ready
How to do it...
How it works...
Implementing arc transition
Getting Ready
How to do it...
How it works...
There's more...
See also
8. Chart Them Up
Introduction
Creating a line chart
Getting ready
How to do it...
How it works...
Creating an area chart
Getting ready
How to do it...
How it works...
Creating a scatter plot chart
Getting ready
How to do it...
How it works...
Creating a bubble chart
Getting ready
How to do it...
How it works...
Creating a bar chart
Getting ready
How to do it...
How it works...
See also
9. Lay Them Out
Introduction
Building a pie chart
Getting ready
How to do it...
How it works...
There's more...
See also
Building a stacked area chart
Getting ready
How to do it...
How it works...
There's more...
Expanded area chart
Streamgraph
See also
Building a treemap
G...

Table of contents

  1. Data Visualization with D3.js Cookbook

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
  • 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.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 990+ topics, we’ve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access Data Visualization with D3.js Cookbook by Nick Qi Zhu in PDF and/or ePUB format, as well as other popular books in Computer Science & Data Modelling & Design. We have over one million books available in our catalogue for you to explore.