ebook img

Mastering D3.js - Data Visualization for JavaScript Developers PDF

352 Pages·2014·3.51 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Mastering D3.js - Data Visualization for JavaScript Developers

Mastering D3.js Bring your data to life by creating and deploying complex data visualizations with D3.js Pablo Navarro Castillo BIRMINGHAM - MUMBAI Mastering D3.js Copyright © 2014 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, 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: August 2014 Production reference: 1180814 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78328-627-0 www.packtpub.com Cover image by Artie Ng ([email protected]) Credits Author Project Coordinator Pablo Navarro Castillo Harshal Ved Reviewers Proofreaders Andrew Berls Simran Bhogal Simon Heimler Maria Gould Lars Kotthoff Ameesha Green Nathan Vander Wilt Paul Hindle Commissioning Editor Indexers Edward Gordon Hemangini Bari Mariammal Chettiyar Acquisition Editors Rekha Nair Nikhil Chinnari Priya Subramani Mohammad Rizvi Production Coordinator Content Development Editor Arvindkumar Gupta Sankalp Pawar Cover Work Technical Editors Arvindkumar Gupta Indrajit A. Das Humera Shaikh Copy Editors Dipti Kapadia Deepa Nambiar Stuti Srivastava About the Author Pablo Navarro Castillo is a mathematical engineer and developer. He earned his Master's degree in Applied Mathematics from École des Mines de Saint-Etienne in France. After working for a few years in operations research and data analysis, he began to work as a data visualization consultant and developer. He has collaborated with Packt Publishing as a technical reviewer for Data Visualization with D3.js and Data Visualization with D3.js Cookbook. In 2014, he founded Masega, which is a data visualization agency based in Santiago, Chile, where he currently works. I wish to thank the Packt Publishing team for their collaboration in the inception and development of this book. I am also grateful to the technical reviewers, whose insightful comments and kind suggestions have been essential to improve the content and examples of every chapter. To Miriam, for her patience and continuous support. About the Reviewers Andrew Berls is a Ruby and JavaScript developer who lives in Santa Barbara, CA. He has developed dashboards for www.causes.com using D3.js to visualize social networks and recently acted as a reviewer for Data Visualization with D3.js Cookbook, Packt Publishing. Andrew recently completed his degree in Computer Science at the University of California, Santa Barbara. When he's not programming, you can find him attempting to cook or hiking up a mountain. Andrew regularly blogs about web technologies at http://www.andrewberls.com. Simon Heimler is currently studying and working as a research assistant at the University of Applied Research in Augsburg in the field of Semantic Content Management. He has a degree in Interactive Media and over a decade of experience with web design and development. Lars Kotthoff is a postdoctoral researcher at University College Cork, Ireland, where he uses artificial intelligence methods to make software faster and better. When he is not researching ways to make computers more intelligent, he plays around with JavaScript visualizations. He has extensive experience with D3.js. Nathan Vander Wilt is a freelance software developer. He offers clients a wide range of expertise, including everything from creating HTML5 and native application interfaces to developing low-level control software for embedded and wireless systems. He especially enjoys solving problems such as peer-to-peer syncing or the many challenges of digital cartography. In order to stay sane in the suburbs, Nate also enjoys raising plants, fish, snails, honeybees, chickens, and rabbits with his family. www.PacktPub.com Support files, eBooks, discount offers, and more You might want to visit www.PacktPub.com for support files and downloads related to your book. 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. TM http://PacktLib.PacktPub.com Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books. Why subscribe? • Fully searchable across every book published by Packt • Copy and paste, print and bookmark content • On demand and accessible via web browser Free access for Packt account holders If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access. Table of Contents Preface 1 Chapter 1: Data Visualization 7 Defining data visualization 9 Some kinds of data visualizations 10 Infographics 12 Exploratory visualizations 13 Dashboards 14 Learning about data visualization 15 Introducing the D3 library 16 Summary 20 Chapter 2: Reusable Charts 21 Creating reusable charts 21 Creating elements with D3 22 Binding data 23 Encapsulating the creation of elements 25 Creating the svg element 26 The barcode chart 27 Accessor methods 28 Chart initialization 29 Adding data 30 Adding the date accessor function 32 Updating the dataset 35 Fixing the enter and exit transitions 36 Using the barcode chart 37 Creating a layout algorithm 40 The radial layout 40 Computing the angles 43 Using the layout 45 Summary 47

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.