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

Manipulating datasets in arrays


In data visualizations, we will usually not display the raw data itself, but moreover aggregate and preprocess the data beforehand. Let me give you an example. You are given the access log from a web server that stores every single visitor with his IP address and user agent (a string that contains information about the browser). Rather than plotting all these rows on its own, you may want to sum up all visitors per minute (or per day) and plot a time series histogram of these sums. Or maybe, you want to group the data by different properties, for example, plotting visitors from Europe vs visitors from North America. It is important to know that your ability of plotting this aggregated data is directly dependent on your ability to manipulate datasets.

Most visualizations are backed by data that is stored in arrays. These datasets, for example, consist of simple arrays, associative arrays, or even nested maps. In many cases, the data that we want to visualize...