探索d3.js:数据可视化第二版入门

需积分: 9 33 下载量 154 浏览量 更新于2024-07-19 收藏 7.92MB PDF 举报
"Learning d3.js Data Visualization, 2nd Edition.pdf" 本书是关于第二版的《学习d3.js数据可视化》的详细指南,旨在帮助读者掌握使用d3.js库进行数据可视化的技能。d3.js是一个强大的JavaScript库,它允许开发者通过数据操作文档对象模型(DOM),从而创建交互式的、基于Web的数据可视化。 在本书中,作者首先介绍了d3.js的核心概念,包括它的设计哲学和如何与ES2016(ECMAScript 2016)版本的JavaScript协同工作。ES2016是JavaScript的一个重要更新,引入了许多新特性,如默认参数、模板字符串和类,这些都对d3.js的编写提供了便利。 第一章节“开始使用D3, ES2016, 和Node.js”涵盖了开发环境的设置,包括Node.js和Git的基础知识,以及如何使用Chrome开发者工具进行调试。此外,本章还通过一个经典的条形图例子,展示了d3.js的基本用法。 第二章节“DOM, SVG, 和CSS基础”深入讨论了数据可视化的三个关键技术。DOM是HTML和XML文档的结构化表示,d3.js利用它来操作页面元素。本章讲解了如何使用d3.js选择和操作DOM元素,创建表格,并介绍了数据绑定的概念。SVG是一种用于绘制矢量图形的XML标准,本章展示了如何使用d3.js绘制各种形状,如文本、线条、区域、弧形、符号等。此外,还涉及了CSS在样式控制和颜色处理中的应用。 第三章节“让数据变得有用”引导读者思考如何从功能角度处理数据,为可视化做准备。这包括理解数据结构,预处理数据,以及如何有效地将数据映射到视觉属性上。 后续章节将逐步深入到更复杂的可视化技术,如动态更新图表、交互性设计、多维数据处理和自定义插件的开发。书中还包括了大量的示例代码和实践项目,以帮助读者巩固所学知识,并激发创新思维。 这本书是d3.js初学者和有一定经验的开发者的宝贵资源,它不仅提供了一套完整的d3.js学习路径,还强调了数据可视化背后的理论和最佳实践。通过学习,读者可以构建出富有洞察力和吸引力的数据可视化作品,从而更好地传达复杂信息。
2017-05-04 上传
D3.js 4.x Data Visualization - Third Edition by Andrew Rininsland English | 28 Apr. 2017 | ASIN: B01MG90SSJ | 308 Pages | AZW3 | 6.6 MB Key Features Build interactive and rich graphics and visualization using JavaScript`s powerful library D3.js Learn D3 from the ground up, using the all-new version 4 of the library Gain insight into producing high-quality, extensible charts and visualizations using best practices such as writing testable, extensible code and strong typing Book Description Want to get started with impressive interactive visualizations and implement them in your daily tasks? This book offers the perfect solution-D3.js. It has emerged as the most popular tool for data visualization. This book will teach you how to implement the features of the latest version of D3 while writing JavaScript using the newest tools and technique You will start by setting up the D3 environment and making your first basic bar chart. You will then build stunning SVG and Canvas-based data visualizations while writing testable, extensible code,as accurate and informative as it is visually stimulating. Step-by-step examples walk you through creating, integrating, and debugging different types of visualization and will have you building basic visualizations (such as bar, line, and scatter graphs) in no time. By the end of this book, you will have mastered the techniques necessary to successfully visualize data and will be ready to use D3 to transform any data into an engaging and sophisticated visualization. What you will learn Map data to visual elements using D3's scales Draw SVG elements using D3's shape generators Transform data using D3's collection methods Use D3's various layout patterns to quickly generate various common types of chart Write modern JavaScript using ES2017 and Babel Explore the basics of unit testing D3 visualizations using Mocha and Chai Write and deploy a simple Node.js web service to render charts via HTML Canvas Understand what makes a good data visualization and how to use the tools at your disposal to create accurate charts About the Author Andrew Rininsland is a developer and journalist who has spent much of the last half a decade building interactive content for newspapers such as The Financial Times, The Times, Sunday Times, The Economist, and The Guardian. During his 3 years at The Times and Sunday Times, he worked on all kinds of editorial projects, ranging from obituaries of figures such as Nelson Mandela to high-profile, data-driven investigations such as The Doping Scandal the largest leak of sporting blood test data in history. He is currently a senior developer with the interactive graphics team at the Financial Times. Swizec Teller, author of Data Visualization with d3.js, is a geek with a hat. He founded his first start-up at the age of 21 years and is now looking for the next big idea as a full-stack Web generalist focusing on freelancing for early-stage start-up 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. Table of Contents Getting Started with D3, ES2017, and Node.js A Primer on DOM, SVG, and CSS Shape Primitives of D3 Making Data Useful Defining the User Experience - Animation and Interaction Hierarchical Layouts of D3 The Other Layouts D3 on the Server with Canvas, Koa 2, and Node.js Having Confidence in Your Visualizations Designing Good Data Visualizations