Email the Author

You can use this page to email Peter Cook about D3 Start to Finish (2nd Edition).

Please include an email address so the author can respond to your query

This message will be sent to Peter Cook

This site is protected by reCAPTCHA and the Google  Privacy Policy and  Terms of Service apply.

About the Book

D3 Start to Finish (2nd edition) teaches you how to build a custom, interactive and beautiful data visualisation using the JavaScript library D3.js (versions 6 and 7).

The book covers D3 concepts such as selections, joins, requests, scale functions, event handling and transitions. It also covers general web development techniques such as state management and modularisation. In other words, everything you need to know to build a real world, custom data visualisation.

You'll also learn how these concepts are put into practice by seeing how an interactive data visualisation called Energy Explorer is built. This is a custom data visualisation that visualises the energy mix of 141 countries. There are 15 separate build steps and you're taken through each step in detail. There's also a code download link for all 15 steps.

The 2nd edition supports ES modules. It's generally revised and updated from the original edition. It also includes appendices on data transformation and adding responsivity and dark mode to Energy Explorer.

Some of the topics covered are:

  • requesting CSV data using D3
  • D3 data joins (including joining nested data)
  • architecting a data visualisation using a layout function
  • detailed styling using CSS
  • adding a tooltip using the Tippy.js library
  • state management
  • animations using D3 transitions
  • data manipulation using Lodash
  • adding a menu, legend and footer
  • ES modules
  • how to transform the raw data from the World Bank into the required format
  • how to make Energy Explorer responsive to different device widths
  • how to add a dark mode to Energy Explorer

To get the most out of this book you need to be familiar with HTML, SVG, CSS and JavaScript. If you need to get up to speed with these languages I recommend my book Fundamentals of HTML, CSS, SVG & JavaScript for Data Visualisation. I've bundled both books together at a reduced cost (visit bundle).

You also need a text editor (such as VS Code), a web browser and Node.js installed on your computer. The book contains appendices that help you get these set up.


About the Author

Peter Cook’s avatar Peter Cook

@createwithdata

Peter Cook has built data visualisations for Carbon Tracker, London Datastore and McGraw Hill Education. He currently works as a senior visualisation developer at Flourish and also writes about the how-to of data visualisation for Create With Data.

He's run training courses for clients such as the BBC and The Economist and written data visualisation tutorials for Flowing Data and Creative Bloq. He created D3 in Depth and Create With Data.

He's the author of four books: Visualising Data with JavaScript, Data Dashboards with JavaScript, D3 Start to Finish and Fundamentals of HTML, CSS, SVG & JavaScript for Data Visualisation.

Logo white 96 67 2x

Publish Early, Publish Often

  • Path
  • There are many paths, but the one you're on right now on Leanpub is:
  • D3-start-to-finish › Email Author › New
    • READERS
    • Newsletters
    • Weekly Sale
    • Monthly Sale
    • Store
    • Home
    • Redeem a Token
    • Search
    • Support
    • Leanpub FAQ
    • Leanpub Author FAQ
    • Search our Help Center
    • How to Contact Us
    • FRONTMATTER PODCAST
    • Featured Episode
    • Episode List
    • MEMBERSHIPS
    • Reader Memberships
    • Department Reader Memberships
    • Author Memberships
    • Your Membership
    • COMPANY
    • About
    • About Leanpub
    • Blog
    • Contact
    • Press
    • Essays
    • AI Services
    • Imagine a world...
    • Manifesto
    • More
    • Partner Program
    • Causes
    • Accessibility
    • AUTHORS
    • Write and Publish on Leanpub
    • Create a Book
    • Create a Bundle
    • Create a Course
    • Create a Track
    • Testimonials
    • Why Leanpub
    • Services
    • TranslateAI
    • TranslateWord
    • TranslateEPUB
    • PublishWord
    • Publish on Amazon
    • CourseAI
    • GlobalAuthor
    • Marketing Packages
    • IndexAI
    • Author Newsletter
    • The Leanpub Author Update
    • Author Support
    • Author Help Center
    • Leanpub Authors Forum
    • The Leanpub Manual
    • Supported Languages
    • The LFM Manual
    • Markua Manual
    • API Docs
    • Organizations
    • Learn More
    • Sign Up
    • LEGAL
    • Terms of Service
    • Copyright Policy
    • Privacy Policy
    • Refund Policy

*   *   *

Leanpub is copyright © 2010-2025 Ruboss Technology Corp.
All rights reserved.

This site is protected by reCAPTCHA
and the Google  Privacy Policy and  Terms of Service apply.

Leanpub requires cookies in order to provide you the best experience. Dismiss