Book Image

Data Visualization with D3 and AngularJS

By : Erik Hanchett, Christoph Körner
Book Image

Data Visualization with D3 and AngularJS

By: Erik Hanchett, Christoph Körner

Overview of this book

Table of Contents (16 chapters)
Data Visualization with D3 and AngularJS
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 3. Manipulating Data

In this chapter, you will learn how to manipulate data in order to preprocess it for visualization and to extract statistical information.

We will start with discussing arrays and array functions in general because this is the canonical representation of data in D3.js. The presented techniques for array manipulation will form a basic toolset to extract relevant data for the visualization and to transform and adapt the structures of flat datasets.

In the following section, we will see very useful string formatting techniques. You will learn how to format numbers on one hand and dates and times on the other hand.

Then, we will discuss scales for numbers, strings, and times in order to map datasets to specific ranges, for example, to linear, logarithmic, or time ranges.

In the last section, we will see the built-in representation for axes in D3.js. With the previously seen techniques, we will be able to construct axes that automatically scale and format the data according...