Data Visualization with d3.js


Data Visualization with d3.js
eBook: $17.99
Formats: PDF, PacktLib, ePub and Mobi formats
$9.99
save 44%!
Print + free eBook + free PacktLib access to the book: $47.98    Print cover: $29.99
$29.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Support
Sample Chapters
  • Build blocks of web visualizations
  • Learn visualization with detailed walkthroughs
  • Learn to use data more effectively
  • Animate with d3.js
  • Design good visualizations

Book Details

Language : English
Paperback : 194 pages [ 235mm x 191mm ]
Release Date : October 2013
ISBN : 1782160000
ISBN 13 : 9781782160007
Author(s) : Swizec Teller
Topics and Technologies : All Books, Data, Web Development, Java, Open Source

Table of Contents

Preface
Chapter 1: Getting Started with d3.js
Chapter 2: A Primer on DOM, SVG, and CSS
Chapter 3: Making Data Useful
Chapter 4: Making Things Move
Chapter 5: Layouts – d3's Black Magic
Chapter 6: Designing Good Visualizations
Index
    • Chapter 2: A Primer on DOM, SVG, and CSS
      • DOM
        • Manipulating the DOM with d3.js
        • Selections
          • Selections example
        • Manipulating content
        • Joining data to selections
        • An HTML visualization example
      • SVG
        • Drawing with SVG
          • Manually adding elements and shapes
          • Transformations
          • Using paths
      • CSS
        • Colors
      • Summary
      • Chapter 3: Making Data Useful
        • Thinking about data functionally
          • Built-in array functions
          • Data functions of d3.js
        • Loading data
          • The core
          • Convenience functions
        • Scales
          • Ordinal scales
          • Quantitative scales
            • Continuous range scales
            • Discrete range scales
        • Time
          • Formatting
          • Time arithmetic
        • Geography
          • Getting geodata
          • Drawing geographically
            • Using geography as a base
        • Summary
        • Chapter 4: Making Things Move
          • Animating with transitions
            • Interpolators
            • Easing
            • Timers
          • Interacting with the user
            • Basic interaction
            • Behaviors
              • Drag
              • Zoom
              • Brushes
          • Summary
          • Chapter 5: Layouts – d3's Black Magic
            • What are layouts and why should you care
              • Built-in layouts
                • The dataset
                • Using the histogram layout
                • Delicious pie
                • Showing popularity through time with stack
                • Highlighting friends with chord
                • Drawing with force
                • Hierarchical layouts
                • Drawing a tree
                • Showing clusters
                • Partitioning a pie
                • Packing circles into circles
                • Subdividing with treemap
            • Summary

              Swizec Teller

              Swizec Teller is a geek with a hat. Founding his first startup at 21, he is now looking for the next big idea as a full-stack web generalist focusing on freelancing for early-stage startup companies. When he isn't coding, he's usually blogging, writing books, or giving talks at various non-conference events in Slovenia and nearby countries. He is still looking for a chance to speak at a big international conference. In November 2012, he started writing Why Programmers Work at Night, and set out on a quest to improve the lives of developers everywhere.
              Sorry, we don't have any reviews for this title yet.

              Code Downloads

              Download the code and support files for this book.


              Submit Errata

              Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


              Errata

              - 6 submitted: last submission 24 Mar 2014

              Errata Type: Typo | Page No: 12

              Similarly, the y scale is going to map a yet unknown linear domain to a range between  height-pad and pad , that is,  880  and 20. 

              should be 

              Similarly, the y scale is going to map a yet unknown linear domain to a range between  height-pad and pad , that is,  280  and 20.

              Errata Type: Technical | Page No: 43

              The following line:

              To create a rectangle, we might write something as follows

              should be:

              To create a triangle, we might write something as follows

              Errata Type: Typo | Page No: 12

              Switching quickly to the  Elements tab, you'll notice a new HTML element with a width of 900 and a height of 100.

              should be 

              Switching quickly to the  Elements tab, you'll notice a new HTML element with a width of 900 and a height of 300.


              Errata Type: Code-related | Page No: 23

              The line 

              d3.selectAll('tbody tr').selectAll('td')

                .style('color', function (d, i) { return i%2 ? 'green' : 'red'; })

              should be 

              d3.selectAll('tbody').selectAll('tr').selectAll('td')

                .style('color', function(d, i ){ return i%2 ? 'green' : 'blue'; }) 

              Errata Type: Code-related | Page No: 30

              var svg = d3.select('#graph')
              .append('svg')
              .style('width', 1024)
              .style('height', 768);

              As per other documentation and to get the example to work in Firefox style() needs to be replaced with attr(). The correct should be as follows:

              var svg = d3.select('#graph')
              .append('svg')
              .attr('width', 1024)
              .attr('height', 768);

              Sample chapters

              You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

              Frequently bought together

              Data Visualization with d3.js +    Data Visualization with D3.js Cookbook =
              50% Off
              the second eBook
              Price for both: A$31.95

              Buy both these recommended eBooks together and get 50% off the cheapest eBook.

              What you will learn from this book

              • Draw with SVG shapes and path generators
              • Add styles with HTML and CSS
              • Use data structures effectively
              • Dynamically update visualizations as data changes
              • Animate visualizations
              • Let the user explore your data
              • Use layouts to create complex drawings
              • Learn to identify what makes a good visualization good

              In Detail

              d3.js. provides a platform that help you create your own beautiful visualization and bring data to life using HTML, SVG and CSS. It emphasis on web standards that will fully utilize the capabilities of your web browser.

              Data Visualization with d3.js walks you through 20 examples in great detail. You can finally stop struggling to piece together examples you've found online. With this book in hand, you will learn enough of the core concepts to conceive of and build your own visualizations from scratch.

              The book begins with the basics of putting lines on the screen, and builds on this foundation all the way to creating interactive animated visualizations using d3.js layouts.

              You will learn how to use d3.js to manipulate vector graphics with SVG, layout with HTML, and styling with CSS. You'll take a look at the basics of functional programming and using data structures effectively – everything from handling time to doing geographic projections. The book will also help make your visualizations interactive and teach you how automated layouts really work.

              Data Visualization with d3.js will unveil the mystery behind all those beautiful examples you've been admiring.

              Approach

              This book is a mini tutorial with plenty of code examples and strategies to give you many options when building your own visualizations.

              Who this book is for

              This book is ideal for anyone interested in data visualization. Some rudimentary knowledge of JavaScript is required.

              Code Download and Errata
              Packt Anytime, Anywhere
              Register Books
              Print Upgrades
              eBook Downloads
              Video Support
              Contact Us
              Awards Voting Nominations Previous Winners
              Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
              Resources
              Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software