Data Visualization with D3 4.x Cookbook - Second Edition
eBook - ePub

Data Visualization with D3 4.x Cookbook - Second Edition

Nick Zhu

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

Data Visualization with D3 4.x Cookbook - Second Edition

Nick Zhu

Book details
Book preview
Table of contents
Citations

About This Book

Discover over 65 recipes to help you create breathtaking data visualizations using the latest features of D3About This Bookā€¢ Learn about D3 4.0 from the inside out and master its new featuresā€¢ Utilize D3 packages to generate graphs, manipulate data, and create beautiful presentationsā€¢ Solve real-world visualization problems with the help of practical recipesWho This Book Is ForIf 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 serve as a desktop quick-reference guide for experienced data visualization developers. You'll also find this book useful if you're a D3 user who wants to take advantage of the new features introduced in D3 4.0. You should have previous experience with D3.What You Will Learnā€¢ Get a solid understanding of the D3 fundamentals and idiomsā€¢ Use D3 to load, manipulate, and map data to any kind of visual representation on the webā€¢ Create data-driven dynamic visualizations that update as the data doesā€¢ Leverage the various modules provided by D3 to create sophisticated, dynamic, and interactive charts and graphicsā€¢ Create data-driven transitions and animations within your visualizationsā€¢ Understand and leverage more advanced concepts such as force, touch, and Geo data visualizationsIn DetailThis book gives you all the guidance you need to start creating modern data visualizations with D3 4.x that take advantage of the latest capabilities of JavaScript.The book starts with the basic D3 structure and building blocks and quickly moves on to writing idiomatic D3-style JavaScript code. You will learn how to work with selection to target certain visual elements on the page, then you will see techniques to represent data both in programming constructs and its visual metaphor. You will learn how map values in your data domain to the visual domain using scales, and use the various shape functions supported by D3 to create SVG shapes in visualizations.Moving on, you'll see how to use and customize various D3 axes and master transition to add bells and whistles to otherwise dry visualizations. You'll also learn to work with charts, hierarchy, graphs, and build interactive visualizations. Next you'll work with Force, which is one of the most awe-inspiring techniques you can add to your visualizations, and you'll implement a fully functional Choropleth map (a special purpose colored map) in D3.Finally, you'll learn to unit test data visualization code and test-driven development in a visualization project so you know how to produce high-quality D3 code.Style and approachThis step-by-step guide to mastering data visualizations with D3 will help you create amazing data visualizations with professional efficiency and precision. It is a solution-based guide in which you learn through practical recipes, illustrations, and code samples.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on ā€œCancel Subscriptionā€ - itā€™s as simple as that. After you cancel, your membership will stay active for the remainder of the time youā€™ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlegoā€™s features. The only differences are the price and subscription period: With the annual plan youā€™ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
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 1000+ topics, weā€™ve got you covered! Learn more here.
Do you support text-to-speech?
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 here.
Is Data Visualization with D3 4.x Cookbook - Second Edition an online PDF/ePUB?
Yes, you can access Data Visualization with D3 4.x Cookbook - Second Edition by Nick Zhu in PDF and/or ePUB format, as well as other popular books in Informatik & Datenvisualisierung. We have over one million books available in our catalogue for you to explore.

Information

Year
2017
ISBN
9781786469960
Edition
2

Data Visualization with D3 4.x Cookbook - Second Edition


Data Visualization with D3 4.x Cookbook - Second Edition

Copyright Ā© 2017 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author(s), nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: October 2013
Second edition: February 2017
Production reference: 1220217
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78646-825-3
www.packtpub.com

Credits

Author
Nick Zhu
Copy Editor
Dhanya Baburaj
Reviewer
Scott Becker
Project Coordinator
Ritika Manoj
Commissioning Editor
Wilson Dsouza
Proofreader
Safis Editing
Acquisition Editor
Shweta Pant
Indexer
Mariammal Chettiyar
Content Development Editor
Arun Nadar
Graphics
Jason Monteiro
Technical Editor
Sachit Bedi
Production Coordinator
Deepika Naik

About the Author

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.

About the Reviewer

Scott Becker is a partner at Olio Apps, a software consulting company in Portland Oregon. He has built numerous systems including a marketplace for geospatial datasets, HIPAA compliant video services for the medical industry, and visualizations of breaches in data security products. He is currently building a next generation time tracking system atwww.shoutbase.com. He has also produced a video course on data visualization with D3.js available at deveo.tv.

www.PacktPub.com

For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
www.PacktPub.com
https://www.packtpub.com/mapt
Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career.

Why subscribe?

  • Fully searchable across every book published by Packt
  • Copy and paste, print, and bookmark content
  • On demand and accessible via a web browser

Customer Feedback

Thanks for purchasing this Packt book. At Packt, quality is at the heart of our editorial process. To help us improve, please leave us an honest review on this book's Amazon page at https://www.amazon.com/dp/1786468255.
If you'd like to join our team of regular reviewers, you can e-mail us at [email protected]. We award our regular reviewers with free eBooks and videos in exchange for their valuable feedback. Help us be relentless in improving our products!

Preface

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.
D3 v4 is the latest release of the D3 library. This second edition cookbook has been completely updated to cover and leverage the D3 v4 API, modular data structure, as well as revamped force implemented. It 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.
This 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 interpolators, custom tweening, timers, queueing, hierarchy, 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.

What this book covers

Chapter 1, Getting Started with D3.js, is designed to get you up and running with D3.js, covering fundamental aspects, such as what D3.js is, and how to set up a typical D3.js data visualization environment.
Chapter 2, Be Selective, covers one of the most fundamental tasks you need to perform with any data visualization project using D3: selection. Selection helps you target certain visual elements on the page.
Chapter 3, Dealing with Data, explores the most essential question in any data visualization project: how to represent data in both programming constructs and its visual metaphor.
Chapter 4, Tipping the Scales, covers the one key task that you need to perform over and over again as a data visualization developer, that is, mapping values in your data domain to visual domain, which is the focus of this chapter.
Chapter 5, Playing with Axes, explores the usage of the axes component and some related techniques commonly used in the visualization based on the Cartesian coordinates system.
Chapter 6, Transition with Style, deals with a saying that is arguably one of the most important cornerstones of data visualization, "a picture is worth a thousand words." This chapter covers transition and animation support provided by the D3 library.
Chapter 7, Getting into Shape, deals with Scalable Vector Graphic (SVG), which is a mature World Wide Web Consortium (W3C) standard wi...

Table of contents