006 Métodos
006.6 Gráficos
006.68 Software

Acerca de este libro

Who should read this book

This book is for all those who want total creative freedom with their data visualization work, from customized classical charts to creating unique data visualization layouts. You might come from a data analysis background, be a journalist, a designer, or even a dataviz enthusiast. Congrats for considering learning D3.js! You’ll quickly realize that this is a wise investment of your time. By mastering D3, you’ll unlock a level of freedom and potential for creativity that is unmatched by the gazillion data visualization tools available today.

How this book is organized: A road map

As you may know, D3 lives within an ecosystem of frontend development tools: HTML, CSS, and JavaScript. Before you dive into chapter 2, you’ll want to ensure that you understand the basics of those tools and how we combine them to create beautiful and interactive web pages. By no means do you need to be an expert, but a little prior knowledge will make your D3 learning experience way more manageable. If you’re looking to brush up your frontend development skills, we recommend the following resources:

This book is organized in a progressive fashion. Part 1 covers the fundamentals such as working with data and creating simple charts, while part 2 focuses on meeting the new digital expectations by making our projects interactive and responsive, improving their accessibility, and combining D3 with a JavaScript framework such as React or Svelte. Each chapter in part 3 covers more advanced data visualizations: hierarchies, networks, and maps. Finally, in part 4, we invite you behind the scenes of the creation of a fully customized visualization layout, and we discuss performance and how to combine D3 with Canvas.

If you’re new to D3, we recommend you go through chapters 1 to 7 in order. Those early chapters will help you build your mental model of D3 and ensure you have all the building blocks in your toolbox before approaching more advanced topics. D3 has a bad reputation for having a steep learning curve, but by following the steps from those early chapters, it can become very intuitive.

If you have prior D3 knowledge and are comfortable with the basics, you might want to pick your own adventure. Chapters 8 to 15 focus on specific concepts or chart types, and it might be worth reading them when your current projects call for this knowledge.

But to all of you, we highly recommend that you not only READ the book but that you DO the book. Each chapter contains its own data visualization project(s), which were crafted to help you integrate the concepts explained in the text. Putting those notions into practice will make all the difference in the world, making your learning journey smoother and swifter.

For each project and exercise, you can access the starting code files and solutions on the book’s GitHub repository (http://mng.bz/Xqjv). You’ll also find the solutions to the exercises in appendix D. All the code files and code snippets in this book use D3 Version 7, which is the latest at the time of writing. To run and edit the code, you’ll need only a code editor and a browser. We recommend VS Code and Chrome or Firefox.

About the code

This book contains many examples of source code both in numbered listings and in line with normal text. In both cases, source code is formatted in a fixed-width font like this to separate it from ordinary text. Sometimes code is also in bold to highlight what has changed from previous steps in the chapter, such as when a new feature adds to an existing line of code.

In many cases, the original source code has been reformatted; we’ve added line breaks and reworked indentation to accommodate the available page space in the book. In rare cases, even this was not enough, and listings include line-continuation markers (↪). Additionally, comments in the source code have often been removed from the listings when the code is described in the text. Code annotations accompany many of the listings, highlighting important concepts.

You can get executable snippets of code from the liveBook (online) version of this book at https://livebook.manning.com/book/d3js-in-action-third-edition. The complete code for the examples in the book is available for download from the Manning website at www.manning.com/books/d3js-in-action-third-edition, and from GitHub at http://mng.bz/Xqjv.

liveBook discussion forum

The purchase of D3.js in Action, Third Edition, includes free access to liveBook, Manning’s online reading platform. Using liveBook’s exclusive discussion features, you can attach comments to the book globally or to specific sections or paragraphs. It’s a snap to make notes for yourself, ask and answer technical questions, and receive help from the author and other users. To access the forum, go to https://livebook.manning.com/book/d3js-in-action-third-edition/discussion. You can also learn more about Manning’s forums and the rules of conduct at https://livebook.manning.com/discussion.

Manning’s commitment to our readers is to provide a venue where a meaningful dialogue between individual readers and between readers and the author can take place. It isn’t a commitment to any specific amount of participation on the part of the author, whose contribution to the forum remains voluntary (and unpaid). We suggest you try asking the author some challenging questions lest their interest stray! The forum and the archives of previous discussions will be accessible from the publisher’s website as long as the book is in print.